TestCleanUp - How to set a project property value as a last step of execution?
I am very new to SoapUI and I would appreciate if any one can help me here. As a part of test clean up(last step of entire execution, whether the test is run at project level or test suite level), I want to set a project property to false, Where would I write project.setPropertyValue("MyProperty", "false") ?
Also, at run time, how do I know if the test is run at Project Level or TestSuite level ?
Re: TestCleanUp - How to set a project property value as a last step of execution?
Thanks for getting back to me on this. I will do my best and explain my use case below.
1. Project Structure -- MyProject (project)
2. Use Case 1 : Run the entire suite for the project like "testrunner.bat -Exx .....myproject.xml". Works perfect as the tests are executed sequentially
3. Use Case 2: Run only Fsuite1 like "testrunner.bat -s"Fsuite1" -Exx ......myproject.xml". To do this I have some groovy script in "TestSuiteRunListerner.beforeRun" event to run the required PreReq1, PreReq3 before running Fsuite1. Works fine as well by itself, but breaks Use Case1 and executes my pre-req's multiple times when exectuing Fsuite1, Fsuite2.... thus duplicating running my pre-reqs when not needed.
So I want to capture this exception and created a flag in project property. I set this flag to true when my pre-reqs are run, but not sure where I can reset this flag to false at the end of the execution which is applicable to both the use cases above. "ProjectRunListerner.afterRun" does not seem to be fired if the execution is at suite level. So I am stumped here.