Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a way to conditionally exclude a test?
Message
 
 
To
07/03/2013 14:24:34
General information
Forum:
ASP.NET
Category:
Testing and debugging
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01567786
Message ID:
01567788
Views:
29
>>I have lots of unit tests. I have all of them passing OK except for two. The problem right now is that we create a cached copy of the preference table. In my tests I change that preference table to be able to test two separate scenarios. So, when I ran each test individually, it passes OK, but then I ran both of them at the same time one passes and the other fails because it reads cached version of the preferences table.
>>
>>We're going to add a new method to be able to re-set preferences and get fresh copy from the server, but until then, is there a way to exclude one test from running when running All Tests without placing it in #if false #endif ?
>
>You might consider cloning the cached copy of the preference table. This is how I resolved such issue.

What exactly do you mean - can you explain?

Right now we're adding that table into the dictionary and then reading the column value from the dictionary. This is what my colleague wrote and I want him to add the method to "refresh" preferences but in the meantime I also want all my tests passing.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform