Once an assertion fails( typically API response ), the remaining test steps in a test case do not get executed. How do I get SoapUI to continue on and complete the rest of the test steps?
I am also looking for a way to retry that step again with the same set of data. If not possible, skip that and proceed to next set of items. Any idea on this ?
They don't throw an exception when an assert fails. The execution will continue with the next step after the assert statement. If you need/want to throw an exception (if such occurs) then you need to use assertAll() method as a last statement in the @Test and test suite again continue with next @Test as it is.
If an assertion fails, the assert() macro arranges to print a diagnostic message describing the condition that should have been true but was not, and then it kills the program. In C, using assert() looks this: #include <assert. h> int myfunc(int a, double b) { assert(a <= 5 && b >= 17.1); … }
Difference between Assert and Verify in selenium In the case of assertions, if the assert condition is not met, test case execution will be aborted. The remaining tests are skipped, and the test case is marked as failed. These assertions are used as checkpoints for testing or validating business-critical transactions.
1- Double click on the test case (not test step)
look at the provided picture and find the one shown below:
To continue tests executing after failed test step you need disable "Fail on error" option in TestCase options.
To control test execution flow you can use "Conditional Goto" test step (the easiest way) or "Groovy script" test step if you need more complex logic.
Detailed instructions here: http://www.soapui.org/Functional-Testing/controlling-flow.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With