Unable to run setup script and tear down script while executing from command prompt
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unable to run setup script and tear down script while executing from command prompt
I have Setup script and Tear Down script in my SoapUI Pro Test Project which have multiple test suites inside of it.
While executing the project with a perticular suite name from command prompt, I am not able to run the Setup Script before the suite run and the Tear down script after the testrunner finishes the test run. Is there a way to run Setup script and tear down script from command prompt.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @SumitM,
I think in that case you need to write your TearDown and Setup Script at your TestSuite Level not on Project Level,
but you can achieve this via some groovy code:
testSuite.runSetupScript(context, runner)
In this case you need to set context and runner both. But i will suggest put your TearDown and Setup Script in appropriate place.
Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓
Thanks and Regards,
Himanshu Tayal
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @HimanshuTayal,
Thanks for the response.
Can you please provide a code snippet or any screen sorts on how to achieve this via
testSuite.runSetupScript(context, runner)
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You would have to put a groovy script test step in wherever you need to trigger that setup/tear down script.
---
Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
