Re: nunit tests hold onto file handles after testsaredone

"David Jeske" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <[email protected]>
On Mon, Jun 23, 2008 at 7:14 AM, Pigneri, Rocco <[email protected]>
wrote:

>  In order to do this I need to be able to "ask for the name of the test
> which is about to run, or just finished running, from SetUp or TearDown",
> and "ask for the pass/fail result of the last test when in TearDown",
> alternatively, if there is a way to ask for the pass/fail result of any test
> by name, I could use the first result about the test name and then look up
> the test result.
>
>  Another possible way to solve this problem is to have the SetUp both tear
> down the old test bed and build the new one.  That way, all of your test
> output will be available after the run of the tests, thus allowing you to
> inspect all the test output on a whim.  The one downfall to this is that
> your test beds will be left around after your tests are run, which may not
> work in your situation.
>
That's a nifty idea, I'll have to try both.

My primary issue is inability to access the information about whether the
test passed or failed. I don't want to keep all the datafiles for tests that
passed, I only want to keep the failures, so I can inspect them. I guess as
a workaround I can put the body of every test in a try/catch block, and if
it catches anything, mark the test as failed in an instance field and
rethrow the exception I caught.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

_______________________________________________
Nunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nunit-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.