Forum Discussion
- VJ19 years agoOccasional Contributor
Hi Rao,
Thanks for getting back to me on this. I will do my best and explain my use case below.
1. Project Structure -- MyProject (project)
- PreReq1(suite)
- PreReq2(suite)
- PreReq3(suite)
- Feature(Fsuite1)
- Feature(Fsuite2)
- etc.,
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.
Hope I am clear. Please get back with me if not.
Thanks!
VJ
Related Content
Recent Discussions
- 4 days agominhng