cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a TestSuite from test step of another Test case

SOLVED
kannan
Occasional Contributor

Calling a TestSuite from test step of another Test case

 I have a requirement to call a Test suite from test step of another Testcases.  

 

Project structure

 

Our Project structure is 

1.TestSuite1
     1.1 TestSuite1_Positive  
     1.2 TestSuite1_Negative 

 

2. TestSuite2
     2.1 TestSuite2_Positive.
     2.2 TestSuite2_Negative 

 

3. TestSuite3
     3.1 Runner

 

Requirement is to run TestSuite 1 from TestSuite3 --> Runner . Is there any way to achieve this ? 

 

Thanks in advance .

 

1 ACCEPTED SOLUTION

Accepted Solutions
aaronpliu
Frequent Contributor

Re: Calling a TestSuite from test step of another Test case

Hi @kannan ,

 

yes, it should be easy to implement it with groovy scripts.

 

 

// groovy

def testSuiteList = ["TestSuite1", "TestSuite2", "TestSuite3"]

def ts= null

testSuiteList.each {

    ts = testRunner.testCase.testSuite.project.testSuites[it]

    ts.run(new com.eviware.soapui.support.types.StringToObjectMap(), false)

}

 

Thanks,

/Aaron

View solution in original post

4 REPLIES 4
richie
Community Hero

Re: Calling a TestSuite from test step of another Test case

Hey @kannan,

I use the Run TestCase step to achieve this.

Please see the following link: https://support.smartbear.com/readyapi/docs/functional/steps/run-test-case.html

Ta

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
nmrao
Community Hero

Re: Calling a TestSuite from test step of another Test case

You may want to take a look at the test case design to make each and every test is independent.
Just think what you are achieving by having dependency.


Regards,
Rao.
aaronpliu
Frequent Contributor

Re: Calling a TestSuite from test step of another Test case

Hi @kannan ,

 

yes, it should be easy to implement it with groovy scripts.

 

 

// groovy

def testSuiteList = ["TestSuite1", "TestSuite2", "TestSuite3"]

def ts= null

testSuiteList.each {

    ts = testRunner.testCase.testSuite.project.testSuites[it]

    ts.run(new com.eviware.soapui.support.types.StringToObjectMap(), false)

}

 

Thanks,

/Aaron

View solution in original post

kannan
Occasional Contributor

Re: Calling a TestSuite from test step of another Test case

Perfect @aaronpliu . This worked . One more question is there anyway to make it run in parallel ?
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors