Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a way to conditionally exclude a test?
Message
From
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:
01567787
Views:
47
This message has been marked as a message which has helped to the initial question of the thread.
>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.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform