Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there a way to conditionally exclude a test?
Message
 
 
À
07/03/2013 15:10:30
Information générale
Forum:
ASP.NET
Catégorie:
Test et débogage
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01567786
Message ID:
01567795
Vues:
36
>That's a poor unit test. You should not rely on cached data for anything, and doing it this way is not unit testing, it's closer to integration testing. Each of those tests should set up the data in the way it needs, modify the data, test that the modification worked, and then destroy the data. If setup takes too long, rethink how you're doing it and what the method being tested is doing.
>
>Here's another book for your reading: The Art of Unit Testing
>
>Conditionally excluding tests is dangerous because there is a good probablity it will always be excluded.
>
The test itself does setup the data the way I want. My current problem is that our class uses cached table data and at the moment we do not yet have a method to refresh that cached copy on demand.

In other words, even if I update that preference table, the class will not see my update.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform