rah
16 years agoOccasional Contributor
Cloning of Test Step
I tried to clone a mock response test step and then jumping with the testRunner to this new step. Unfortunately I always end up with a NullPointerException. What am I doing wrong?
Here the code of my groovy script:
def testCase = testRunner.getTestCase()
def wait_step = testCase.getTestStepByName("waiting")
def clone_step = testCase.cloneStep(wait_step,"wait_clone")
Integer index = testCase.getIndexOfTestStep(clone_step)
testCase.moveTestStep(index, -1)
testRunner.gotoStepByName("wait_clone")
Here the code of my groovy script:
def testCase = testRunner.getTestCase()
def wait_step = testCase.getTestStepByName("waiting")
def clone_step = testCase.cloneStep(wait_step,"wait_clone")
Integer index = testCase.getIndexOfTestStep(clone_step)
testCase.moveTestStep(index, -1)
testRunner.gotoStepByName("wait_clone")