I have some actions I want to perform before the first test of a projectsuite is run.
In order to do this I have created a projectsuitevariable called FirstTest which I manually set to True.
In the OnTestRun event I check the variable, and if it is True, I perform my actions and then set the variable to False.
On occassion it happens the variable is set to false when I run my test, before it hits the first OnTestRun. Almost as if the variable is refreshed from somewhere.... but I can not figure out from where... does anyone know?
That variable is set and then persisted after the script run. So, if you run a set of tests, it is set to false at the beginning. When the tests are complete, you may not be setting it back to true.
I'd suggest you add another event handler for OnStopTest (or something similar) to make a test to determine if it should set the FirstTest variable back to true. If those conditions are met, set it back to true and then it persists to the next test run.
FYI, these values, at least in TC 3 (not sure where in TC 4) are stored in the CFG file for the project.
Automated Testing Evangelists
Definition expert - noun - Unknown drip under pressure
This is not the issue. I know it persists after the last run. I set the variable to the proper value manually before I run the test. I save the suite when I do this so the variable should be stored. The value is TRUE on screen when I click the "Run" button, but before the OnStartTest procedure is called (and after clicking the run button) the value is changed to FALSE. hoe is this possible? in version 4 that is....