shaijujanardhan
4 years agoOccasional Contributor
Is it possible to use contents from a file within setup/teardown
I have a testsuite where I need to do a setup and teardown for each of the testcases. Currently I have the same code copy pasted in all the tests. But from a maintenance point of view this is not scalable. Is there a way I can load contents of an external groovy script from disk and then use it within setup or teardown?
- Possible.
Another way is to use events, however, need to see what the script is doing as certain objects might or might not be available in that context. Would you please show what the scripts are doing?
Please take a look at the events page, "List of events"
https://support.smartbear.com/readyapi/docs/testing/handling-events.html