Re: Determining if a test passed or failed

"Charlie Poole" <[email protected]> Mon, 28 Jul 2008 10:02:53 -0700
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <007501c8f0d3$c81bcd10$6401a8c0@ferrari>
There's no way to do this yet, although it may come in the next release.
 
I usually don't get into process issues on this list, but the problem as you
describe it seems to indicate a rather serious problem of trust on your
team.
If folks are supposed to be writing tests, are they not doing it? If not,
why not.
 
Of course, you can catch this with coverage analysis, but I hope you'll
consider that any technical solution to this issue may be ignoring a much
more serious problem.
 
Charlie


  _____  

From: [email protected]
[mailto:[email protected]] On Behalf Of Clive
Pottinger
Sent: Monday, July 28, 2008 9:50 AM
To: [email protected]
Subject: [Nunit-users] Determining if a test passed or failed


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