Forum Discussion
- Tylhadras
Alumni
Hey vijperum. What exactly are you trying to accomplish? Do you want to run a Test Case from another test suite as a Test Step in your current Test Case? Please describe what you want to do a bit more in detail please.
Regards
Gustav Lundström
- vijperumOccasional Contributor
Assuming I have a TestSuite A is run first via test runner which has a Test Case whose test step is having a dependency in another Test Suite B that is not yet run. I would like to set that run this test case after the dependent Test Case is run. Like we do in the ant task where we set the dependency.
- Tylhadras
Alumni
What you'll need to do is create a Groovy Script Test Step that runs the dependent Test Case.
I've created an example:
import com.eviware.soapui.support.types.StringToObjectMap def externalTestCase = testRunner.testCase.testSuite.project.getTestSuiteByName("Test account creation").getTestCaseByName("accountcreation TestCase") return externalTestCase.run(new StringToObjectMap(), false))
Where the new StringToObjectMap() can be replaces with a map of properties for the dependent Test Case and the second argument (true/false) says wheter to run the external Test Case asynchronously.
- vijperumOccasional Contributor
Thank you will try this and let you know