plaidshirt
plaidshirt

Reputation: 5671

Execute Groovy script after SOAP request in SoapUI

I execute a script from a Groovy script in SoapUI project.

def tCase = testRunner.testCase.testSuite.testCases["TC1"]
def tStep = tCase.testSteps["attachIt"]
tStep.run(testRunner, context)

There is another loop in this script, which is to execute a SOAP request. After that two more Groovy scripts should be executed to process output. These are in same testcase after SOAP request step, but aren't executed automatically.

Upvotes: 1

Views: 366

Answers (1)

Gaurav Khurana
Gaurav Khurana

Reputation: 3891

lets Assume you have a testcase which has 5 steps

As per my understanding you are trying to execute few steps(say Step1,step2) of the testcase via a groovy(step 3) and you are expecting that step4 and step5 should execute automatically.

That will not happen

So you can disable step 1 & step 2

So now what will happen when you run the test case(not step) system will execute step 1 & step2 via step3 and once step 3 is done step4 & step5 will run automatically.(since you ran the test case_

In case you like that step4 & step5 should execute automatically you can use the same code as you have shared and use groovy script teststep names in it and disable those steps

Upvotes: 1

Related Questions