Ready API 2.3.0 How to run a specific testcases with tags using Groovy
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ready API 2.3.0 How to run a specific testcases with tags using Groovy
Hi,
I have multiple test suites with test cases. I have tagged each test case with the backend it invokes. Now I need to run only those test cases that matches the tags using groovy.
The below groovy line runs all test suits & testcases in it.
testSuite = project.getTestSuiteByName("testSuite1"); runner = testSuite.run(new com.eviware.soapui.support.types.StringToObjectMap(), false);
Is there any way I can pass parameters to execute specific test cases matching those tags?
Thanks.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for your post! There are the following methods for working with tags:
at the project level:
* getTags()
* getTagId("TagName")
* getTagById(TagId)
at the testCase level:
* hasTags()
* getTagIds()
* isTagAssigned(String tagId)
Documentation:
Class WsdlTestCase: https://www.soapui.org/apidocs/com/eviware/soapui/impl/wsdl/testcase/WsdlTestCase.html
Class WsdlProject: https://www.soapui.org/apidocs/com/eviware/soapui/impl/wsdl/WsdlProject.html
Also, you can use the -T testRunner argument to run specific testCases: https://support.smartbear.com/readyapi/docs/soapui/running/automating/cli.html
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
