I have these tests:
using System; using NUnit.Framework;
namespace test {
[TestFixture] class NantTest1 {
[Test] public void t11() { System.Console.WriteLine("foo"); }
}
[TestFixture] class NantTest2 {
[Test] public void t21() { System.Console.WriteLine("bar"); }
} }
And heres the build file:
<project name="nanttest"> <target name="test"> <nunit2 failonerror="false"> <formatter type="Xml" usefile="true" extension=".xml" outputdir=".\results_1"/> <test assemblyname="bin\debug\test.dll" testname="test.NantTest2"/> </nunit2> </target> </project>
Running this buildfile like: nant test
using the old nant (before NUnit 2.1.4 integration):
yields the following result:
<?xml version="1.0" standalone="no"?>
<!--This file represents the results of running a test suite-->
<test-results name="NantTest2" total="1" failures="0" not-run="0" date="2003-10-10" time="08:56">
<test-suite name="NantTest2" success="True" time="0,0200288">
<results>
<test-suite name="NantTest2" success="True" time="0,0200288">
<results>
<test-case name="test.NantTest2.t21" executed="True" success="True" time="0.020" />
</results>
</test-suite>
</results>
</test-suite>
</test-results>
Which is ok, only the fixture NantTest2 has been run, which is also reflected in the name of the results file: NantTest2-results.xml
I also get the expected ouput, bar, on the console.
If I use the latest nant nunit 2.1.4) from cvs I get the following result:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!--This file represents the results of running a test suite-->
<test-results name="C:\source\ts1\Samples\nanttest\test\bin\debug\test.dll" total="0" failures="0" not-run="0" date="2003-10-10" time="08:50">
<test-suite name="C:\source\ts1\Samples\nanttest\test\bin\debug\test.dll" success="True" time="0">
<results />
</test-suite>
</test-results>
the name of the results file in this case is: test.dll-results.xml I also don' get the expected output, bar on stdout...
-- Daniel
Ian MacLean wrote:
Daniel,
Would it be possible to put together a small sample of tests that hang like this. All the tests inside nant itself run fine. Actually could you verify that this is the case on your machine by running :
nant test
thanks, Ian
I'm not talking about the test logs which nunit produce, (although I don't get them either in these latest builds). The 'outputdir' fix you made was working perfectly before I tried these new builds.
I'm talking about output which you write to stdout in the testcases themself, like using System.Console.WriteLine("...").
But more importantly like I said, tests which in prevous builds took a couple of seconds to run now takes forever (I haven't actually waited that long, but long enough to detect that something's wrong...)
-- Daniel
Gert Driesen wrote:
Daniel,
What output are you missing ?
I changed the way the nunit2 task is working with regards to the output results xml file, if you want the output result you need to specify a formatter for the output format you want.
when you want the output of the tests to be available in xml format (persisted to a file), you use :
<nunit2> <formatter type="Xml" usefile="true" extension=".xml" outputdir="${build.dir}/results" /> <test> <assemblies> <includes name="testassembly.dll" /> </assemblies> </test> </nunit2>
when you want output in plain text format, you use :
<nunit2> <formatter type="Plain" /> <test> <assemblies> <includes name="testassembly.dll" /> </assemblies> </test> </nunit2>
However, I think you may have encountered another issue... I'll do some tests with NUnit 2.1 later today ...
Gert
----- Original Message ----- From: "Daniel Granath" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 09, 2003 5:55 PM Subject: [Nant-users] NUnit2 and the latest nant (cvs and nightlies)
Hi,
I have gotten the latest stuff from cvs which includes the new Nunit2
2.1.4 integration, and something seems to have gone wrong.
Where previously I specified a NUnit2/Test/Testname which took 20
seconds to run, the same testname now goes on indefinitely with no
output whatsoever. I also tried it with the latest nightly, same result.
Is the ability to specify which test to run in an assembly broken? Also,
what's with the missing output?
Any clues?
-- Daniel
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users
smime.p7s
Description: S/MIME Cryptographic Signature