Is there a way to run the same groovy script before running every test case?
Is there a way to have all scripts within a test suite or project run a groovy script before they execute? (Without having to put a groovy script inside every test case. I want to have only one groovy script that automatically runs any time any of the test cases run.)
Putting the script inside the project level/test suite level setup script doesn't work unless I run them at the project or test suite level. I want to run at the test case level and still have it call the groovy script everytime without any need to add something to every single test case.
Solved! Go to Solution.
You can Consider to use TestComplete events.
The one you need for now is event named "OnStartTest". You can find it inside project event manager.
If you do not have it on project list add it from menu using right mouse button.
Here is the documentation for this event:
Hope this help you,
If you need any more help, let me know
As mentioned above, events are the way to go, here is the Ready API documentation (The link above is for Test Complete, another SmartBear product):