ahabib
6 years agoOccasional Contributor
How to run a testCase for each a testStep using tearDown script
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.
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.