Is there a way to exit a test case when the first step fails?
I'm creating tests for an API that updates an existing DB2 row. The first step of the test is a DataSource with an SQL query to select a specific row to update. For example, I may want to test what happens when the API updates rows where timeOfDay='1200'. However, there are times when there are no rows on the database that match the criteria, so the DataSource does not find any data to use in the test, the API request fails, and the test case fails. Instead, I want to exit (or pass) the test without recording a failure.
I've tried playing around with the "Fail on Empty" and "Skip Loop on Empty" options, but I haven't been able to get them to do what I need. Is there a way to skip or pass a test case when the first step fails?
I added the JDBC count step and a groovy script with a conditional "testRunner.gotoStepByName", and it looks like it's working the way I want. Thanks for the help!