For each action in Action Collection you can define a flow to support standard, multiple point of verification and negative test case flows. This is a powerful feature which allows you to keep actions and their code as is but have them do different things simply by specifying a different flow value. To change to a different value you just need to click on ‘Execution Flow’ value (by default it’s ‘Record Error Stop Test Case’) and select the one you need from a drop down.
Record Error Stop Test Case
- If this current action code does an assertion then fail the test case and DO NOT CONTINUE executing any other actions in this test case
- This is a default flow that is typical for positive test cases and appears every time you add/insert an action in to Action Collection
In the above example if action ‘Search Amazon’ fails and produces an assertion (for example because search field din’t appear so text couldn’t be entered) then test case will fail and not proceed forward to the next actions (eg: Select Item)
Ignore Error Continue Test Case
- If this current action does an assertion then DO NOT FAIL a test case and proceed to next step as if nothing happened
- This flow is typically used for negative test cases where you expect your action to fail while the next one validates if a valid error condition is met
In the above example a test case expects that Login action should fail and give an assertion because we are putting a bad username and password (so RedwoodHQ will not report this test case as failed) and will go to our next action step ‘Verify expected Error Message’ which will validate if proper error message has appeared.
Record Error Continue Test Case
- If this current action code does an assertion then fail the test case but still continue to the next step
- This one is typically used if you want to validate multiple things instead of just stopping on first verification error
In the above example even if the step #3 does an assertion because it’s not able to find ‘Star Trek the Final Frontier’ as the first returned index it will fail the test case but will still go to the next step to verify ‘Star Trek Wrath of Khan’ as second index and then to the next step afterwards. So this way it will be assured that all 3 verification’s are done and show failures for specific actions when assertion happens (since it’s possible that not all of them will fail).