mcbootus
14 years agoContributor
[R]Batch Script Continues When Assertion Fails In a Testcase
Dear Support,
I have a master batch script which calls many test cases in sequence using this code:
Each test case contains many assertions but when any assertions fail the batch script continues to run all the tests, even if a particular test case partially completed a testcase due to an assertion failure.
I have checked the setting "Fail on error" in the batch script and each test case being called by the batch script but this does not seem to stop the test when an assertion fails.
Thank you in advance.
Armen
I have a master batch script which calls many test cases in sequence using this code:
// <eventlist>
def eventlist = project.testSuites['E-GREFFE XML STRUCTURE'].testCases['eventList'].run( null, true )
eventlist.waitUntilFinished()
// <procedureIdentification>
def procedureIdentification = project.testSuites['E-GREFFE XML STRUCTURE'].testCases['procedureIdentification'].run( null, true )
procedureIdentification.waitUntilFinished()
// <tfueArticleList>
def tfueArticleList = project.testSuites['E-GREFFE XML STRUCTURE'].testCases['tfueArticleList'].run( null, true )
tfueArticleList.waitUntilFinished()
// <securityInfo>
def securityInfo = project.testSuites['E-GREFFE XML STRUCTURE'].testCases['securityInfo'].run( null, true )
securityInfo.waitUntilFinished()
etc .....................
Each test case contains many assertions but when any assertions fail the batch script continues to run all the tests, even if a particular test case partially completed a testcase due to an assertion failure.
I have checked the setting "Fail on error" in the batch script and each test case being called by the batch script but this does not seem to stop the test when an assertion fails.
Thank you in advance.
Armen