Forum Discussion
SmartBear_Suppo
Alumni
17 years agoHello Usha,
I'm not quite sure why it's not working. Please make sure that the TestStep is enabled when you try to run it. (If you need it disabled for the test you can enable it during the TearDown script). However, if you are trying to run a TestStep in another TestCase then you will need to take some additional steps to get it to work. Here is an example of doing so:
Dalimonster,
Yes, you should be able to run a TestCase in a similar way.
Note that the parameters for the method call is a bit different:
The first argument is an optional String to Object map for the context, the second is whether to run asynchronously or not.
Regards,
Dain
eviware
I'm not quite sure why it's not working. Please make sure that the TestStep is enabled when you try to run it. (If you need it disabled for the test you can enable it during the TearDown script). However, if you are trying to run a TestStep in another TestCase then you will need to take some additional steps to get it to work. Here is an example of doing so:
def testStep = testRunner.testCase.testSuite.testCases['TestCase 2'].testSteps['DataSink']
testStep.prepare(testRunner, context)
testStep.run(testRunner, context)
testStep.finish(testRunner, context)
Dalimonster,
Yes, you should be able to run a TestCase in a similar way.
Note that the parameters for the method call is a bit different:
testCase.run(null, false)
The first argument is an optional String to Object map for the context, the second is whether to run asynchronously or not.
Regards,
Dain
eviware