TestSteps always Successful!

Mar 5, 2008 at 2:33 PM
Edited Mar 5, 2008 at 2:59 PM
Hi, since I'm using the new version of BizUnit released in february, even when test steps are not successful, they are displayed as 'passed' in NUnit or Visual Studio TestView... I set 'failOnError' to TRUE for the steps concerned, but this doesn't have any effect. Whatever I do, my test never get the status 'failed'... Anyone an idea how to solve this?

This might help (console output from BizUnit):
NOTE THAT AFTER THE EXCEPTION, THE TEST RESULT IS PASS

S T A R T

Test: BizUnitTest.Test started @ 15:23:42.151 05/03/2008 by DOSIM000\sidpebs
-------------------------------------------------------------------------------
Info: Adding context property: BizUnitTestCaseStartTime, value: 5/03/2008 15:23:42

Setup Test: BizUnitTest.Test

Execute Test: BizUnitTest.Test

Step: BizUnit.FilesExistStep started @ 15:23:42.167 05/03/2008, failOnError = True
*******************************************************************************
Error: Exception caught!
System.ApplicationException: Directory does not contain the correct number of files!
Found: 7 files matching the pattern *.xml.
at BizUnit.FilesExistStep.Execute(XmlNode testConfig, Context context) in C:\Kevin\Code-Projects\BizUnit\BizUnit3.0\Src\BizUnit\TestSteps\FilesExistStep.cs:line 84
at BizUnit.BizUnitTestStepWrapper.Execute(Context ctx) in C:\Kevin\Code-Projects\BizUnit\BizUnit3.0\Src\BizUnit\BizUnitTestStepWrapper.cs:line 118
at BizUnit.BizUnit.ExecuteTestStep(BizUnitTestStepWrapper stepWrapper) in C:\Kevin\Code-Projects\BizUnit\BizUnit3.0\Src\BizUnit\BizUnit.cs:line 1045
*******************************************************************************
*******************************************************************************
Error: Exception caught!
System.ApplicationException: Directory does not contain the correct number of files!
Found: 7 files matching the pattern *.xml.
at BizUnit.FilesExistStep.Execute(XmlNode testConfig, Context context) in C:\Kevin\Code-Projects\BizUnit\BizUnit3.0\Src\BizUnit\TestSteps\FilesExistStep.cs:line 84
at BizUnit.BizUnitTestStepWrapper.Execute(Context ctx) in C:\Kevin\Code-Projects\BizUnit\BizUnit3.0\Src\BizUnit\BizUnitTestStepWrapper.cs:line 118
at BizUnit.BizUnit.ExecuteTestStep(BizUnitTestStepWrapper stepWrapper) in C:\Kevin\Code-Projects\BizUnit\BizUnit3.0\Src\BizUnit\BizUnit.cs:line 1054
at BizUnit.BizUnit.ExecuteSteps(XmlNodeList steps) in C:\Kevin\Code-Projects\BizUnit\BizUnit3.0\Src\BizUnit\BizUnit.cs:line 1017
*******************************************************************************

Tear Down Test: BizUnitTest.Test
-------------------------------------------------------------------------------
Test: BizUnitTest.Test ended @ 15:23:45.182 05/03/2008
P A S S
Apr 1, 2008 at 2:26 AM
Take a look at BizUnit.ExecuteSteps(XmlNodeList steps) method : it seems that whenever an exception happens it's catched, logged but actually not being thrown up the stack. When I added a throw inside the catch block it started to work smoothly for me.
Apr 24, 2008 at 5:47 PM
Edited Apr 24, 2008 at 6:05 PM
Just ran into this. The default value for FailOnError for any test step has changed to false in BizUnit 3.0.1025.0 using XmlConfig. This was true in BizUnit 2.X. This only impacts you if you don't specify FailOnError in your XML.
Coordinator
Apr 28, 2008 at 8:36 AM
This is fixed in the next beta drop, I'm hoping to upload that later this week,

Thanks,

Kevin
Coordinator
May 8, 2008 at 12:01 AM
3.0.1026.0 is now available and fixes this, thanks,

Kevin