TestProject Forum

Buggy failed step handling within nested test steps

From my main Test, I am calling a Test Step (nested test). Within that Test Step, I have a Step that uses “invert test result” with a recovery test to handle an if-else condition. The On Failure Behavior for that Step is set to “Recovery Test --> [recoveryTest1] --> Continue”. When this is engaged within the Test Step, it is handled properly.

However, when the Test Step is completed, the main Test exits and skips the rest of the Test.

The way to get around this is set the On Failure Behavior to Continue from the main Test when calling the Test Step, but this is not desired, as there are other steps of the Test Step that could fail, which should fail the main test.

I think the expected behavior would be for a Step within a Test Step, when set to continue on failure, should also be handled in the same way by the main Test which calls the Test Step.

Hello @tim.rendall
Just to make sure ,after the nested test is done, and passes it returns to the nested test that calls it , continue , reaches the main test and then the main test fails and all other steps are skipped?
Can you please send the full PDF report of that test.

Hi Ran!

Yes. To try to be more clear -

  1. Test1 has 7 Steps. Test1>Step3 calls NestedTest1
  2. Let’s say NestedTest1 has 10 steps. NestedTest1>Step5 uses “Invert Step Result” to trigger RecoveryTest1 and then continue.
  3. When NestedTest1>Step5 fails as expected, RecoveryTest1 runs and the rest of NestedTest1 runs and passes as expected, returning to Test1.
  4. Test1>Step3 logs the expected failure from NestedTest1>Step5 and aborts the execution, skipping the rest of its steps.

If I set Test1>Step3 to continue on failure, it will successfully complete the the rest of the test, but will also ignore any unexpected failures in NestedTest1.

My expectation is that if the failure is handled by NestedTest1>Step5, it should be ignored by Test1.

Hi Tim, this issue was fixed on agent 0.65