In Execution Plan can one testcase be made contingent upon the successful completion of another?
I have a testcase that reverses the transaction entered by the preceding testcase. if the preceding testcase fails then I don't want the reversal testcase to even run. Is there a way to make the running of one test case contingent upon the success of another.
also, sort of the opposite situation, if a failure occurs within a given testcase is there a way (instead of it just ending and moving on to the next testcase) to have it run some closing statements before moving on? My concept of this is that I would have a few boolean variables that are false at the start of the testcase and are set to true as the testcase progresses. if a failure occurs at one point it might not need to run anything if all the variables are still false but if one is true then it needs to run certain code. this is how i picture it using pseudocode
blnHasLaunched = false
blnHasOpened = false
blnHasSignedIn = false
Run LaunchApp keyword test
blnHasLaunched = trud
Run Open keyword test
blnHasOpened = true
Run SignIn keyword test
blnHasSignedIn = true
(Run several other keyword tests that perform transaction)
* if HasSignedIn then
Run SignOut keyword test
* if HasOpened then
Run Close keyword test
* if HasLaunched then
Run CloseApp keyword test
if there is no error all the final keyword tests will still run because the if logic will be true but if an error occurs during the several other tests then control passes directly to the the first if statement and performs an orderly end of testcase rather than just abruptly ending and moving on to the next. if the error occurs while signing in and it never gets to the final statement that sets the boolean value to true then there is no need to sign out but it still needs to close some other things that were opened and then close the application
Let me know if you have any questions. my main concern right now is the first question but the second question would be nice to know. Thanks!