Im trying to run a testCase (delete) before running any other testCase using tearDown script but i get scriptException: error in teardDown script.
this is the code :
def testStep = testRunner.testCase.testSuite.testCases['delete'].testSteps['deleteAll']
testSuite.getTestCaseList().each{
testStep.prepare(testRunner, context)
testStep.run(testRunner, context)
testStep.finish(testRunner, context)
}
any help would be really apperciated.
Solved! Go to Solution.
Can you provide the error that you get? That might help with troubleshooting. Also, a teardown script typically runs at the end of something. Maybe you need a setup script that'll run before anything else? Just a thought on that one. But if you can provide the errors that would be super helpful.
Can you provide the error that you get? That might help with troubleshooting. Also, a teardown script typically runs at the end of something. Maybe you need a setup script that'll run before anything else? Just a thought on that one. But if you can provide the errors that would be super helpful.
greetings,
thank you msiadal i found another way to do it
@ahabib: Can you post details of how you solved it? That way the solution is evident for anyone else who may come here looking for similar results. 🙂
Greetings,
i just added an assertion whenever i want to run the testStep.
the script :
import com.eviware.soapui.support.types.StringToObjectMap
import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner
def Runner = new WsdlTestCaseRunner(messageExchange.modelItem.testStep.testCase, new StringToObjectMap())
yourTestStep= messageExchange.modelItem.testStep.testCase.testSuite.project.testSuites["hDeliveries"].testCases["delete"].testSteps["deleteAll"]
yourTestStep.run(Runner,context)
Subject | Author | Latest Post |
---|---|---|