18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
_getDB haltonfailure process all applications
Hi,
I am using the _getDB to retrieve a number of test cases and loop through them and submit the records and then use asserts to verify results against know results in the database. I am using Ant to submit the script and have haltonfailure=false however if say the first record in the database fails an assert it is exiting the script and not processing the remaining records. How can I get it to mark the test as failed but still continue processing all the records
Thanks
Andrew
I am using the _getDB to retrieve a number of test cases and loop through them and submit the records and then use asserts to verify results against know results in the database. I am using Ant to submit the script and have haltonfailure=false however if say the first record in the database fails an assert it is exiting the script and not processing the remaining records. How can I get it to mark the test as failed but still continue processing all the records
Thanks
Andrew
Comments
You need to wrap the code inside the loop in a try catch block. It would look something like this:
You can also use the inbuilt API _dataDrive: http://sahi.co.in/w/data-driven-testing
Regards,
Narayan