Adding global and local init and cleanup to test cases
Last edited on
For sake of easier maintenance/more flexibility one should consider introducing an init/cleanup mechanism on a global level for the test scripts.
For this a small change to any test script is require, but this can be done en masse by using the search & replace functionality of text editor (or any other tool of your choice) to add the required source(findFile("scripts", "...")) command to all your scripts at once.
Test script example:
Shared test suite resource or global script example:
Log Global/shared init() before test case init()
Log Test case init()
Log Global/shared init() after test case init()
Log Global/shared cleanup() before test case cleanup()
Log Test case cleanup()
Log Global/shared cleanup() after test case cleanup()