Ask a Question

Ready API 2.3.0 How to run a specific testcases with tags using Groovy

helium86
Senior Member

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.

 

1 REPLY 1
Nastya_Khovrina
SmartBear Alumni (Retired)

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. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: