Determining if a test passed or failed
"Clive Pottinger" <[email protected]> Mon, 28 Jul 2008 09:50:19 -0700
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <[email protected]> |
Hello everyone, My problem has 2 parts: 1) In a [SetUp], I would like to be able to determine which test is about to be executed (either by using Reflection to obtain the test's name or to obtain an attribute of the test). 2) In a [TearDown], I would like to be able to do the same as 1) AND be able to determine if the test succeeded for failed. Are there any ways to accomplish this? Here is my situation: We have a class that contains many methods. I have to write a test suite to that covers all the methods in the class. Because of the sheer number of methods involved, the test suite is broken up into a number of [TestFixture]s, each one covering a different aspect of the class's methods. However, the programmers could add new methods to this class at any time. My test suite must be smart enough to know that a new method has been created and that a corresponding test does not yet exist (obviously it would not do to have a test suite that properly test class.A() and class.B(), and shows all green when there is a new class.C() that has never been called). It must also know when a test does exist but has not been executed or did execute and failed. The suite will then notify the tester that not all methods in the class have been exercised and which ones have/have not been successful. This is why I need to tell which tests are executing or have just finished executing and whether or not the test was successful. -- Clive Pottinger Victoria BC. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Nunit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nunit-users