You need to return the exit code from the mstest in the batch. Otherwise it
just ignores it and CC.NET thinks the task was successful.


Craig

-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of kazim mehdi
Sent: Monday, 15 June 2009 10:17 p.m.
To: ccnet-user
Subject: [ccnet-user] Mstest: test failed but build passed?


Hi

I am using version : 1.4.3.4023 , i added mstest as a executing task
to the project . i am able to execute the mstest but the build is not
breaking when the test fails below is the extract of the exec section.


<exec>
        <description>Executing unit tests </description>
        <buildTimeoutSeconds>1800</buildTimeoutSeconds>
        <executable>c:\MyTests\RunTests.bat</executable>
        <baseDirectory>c:\MyTests\Tests</baseDirectory>
        <successExitCodes>0</successExitCodes>
      </exec>


contents of RunTests.bat
===================
if exist results.xml del results.xml

 "mstest.exe" /testcontainer:Bin\MyTests.Tests.dll /noisolation /
resultsfile:results.xml

any suggestion.

thank you


kind regards
kazim



Reply via email to