Runner.Stop(true) clears variables and ignores further breakpoints
Hi,
My project currently has the following test items:
Testcase A
Testcase B //this one fails intentionally
Testcase C
Log results to excel file
The logger keeps track of the testcases that have been run in a global array variable. It then loops over the testcases in this array, finds the result of each testcase in the log file, and then writes the result to my own excel file.
I also want to stop a test item from continuing further when an error occurs, but I still want the following test items to be run. To do that, I have disabled 'Stop execution on error' for the project. And I created an event OnLogError that calls Runner.Stop(true). According to the documentation, this should only stop the execution of the current test (which it does). However, I am noticing some unwanted side effects when I use this function.
After I call Runner.Stop(true), the global variable that holds the testcases has been emptied. I made this conclusion when I did the following:
Running test A and C results in both results being written.
Running test A and B results in no results being written.
Running test B and C results in only C being written.
Running all tests results in only C being written.
So when B fails, it continues running, but I lose the contents of the array.
It was difficult to debug this, because I also noticed that after calling Runner.Stop(true), all breakpoints are no longer triggered.
Is this intended behaviour?
Regards,
Kevin