Forum Discussion

sridevihiranya's avatar
sridevihiranya
Occasional Contributor
7 years ago
Solved

How to run a specific testSuite using groovy script?

I have multiple testSuites, eg: A,B,C I want to run A TestSuite from B TestSuite. How can I do this in readyAPI?
  • nmrao's avatar
    7 years ago

    Here is the groovy script which does what you are looking for.

     

    import com.eviware.soapui.support.types.StringToObjectMap
    
    //Provide the name of the suite you want to run
    def suiteNameToExecute = 'TestSuite1'
    
    def runSuite = { suiteName, async = true ->
    	def suite = context.testCase.testSuite.project.testSuites[suiteName]
    	suite.run([] as StringToObjectMap, async)
    }
    
    runSuite(suiteNameToExecute, false)