Forum Discussion
PaulDonny
12 years agoRegular Contributor
muralidhar7,
The nullPointerException is originating from the script not being able to find "GetOffersDetails_script"
Try and do the following script and see what the results are:
It will fail. Next try the following script:
If the script is in the same testCase this will not fail. From testRunner you have to access the correct location of your script. If it's in a different testCase, you have to go up to your testSuite level and then get the correct testCase and then run the testStep. If in a different testSuite, go to project level. If in a different project, go to workspace level, if in a different workspace just build it in as an extension.
I hope this helps you a bit with future endeavors with groovy.
The nullPointerException is originating from the script not being able to find "GetOffersDetails_script"
Try and do the following script and see what the results are:
log.info testRunner.getTestStepByName("GetOffersDetails_script") It will fail. Next try the following script:
log.info testRunner.testCase.getTestStepByName("GetOffersDetails_script")If the script is in the same testCase this will not fail. From testRunner you have to access the correct location of your script. If it's in a different testCase, you have to go up to your testSuite level and then get the correct testCase and then run the testStep. If in a different testSuite, go to project level. If in a different project, go to workspace level, if in a different workspace just build it in as an extension.
I hope this helps you a bit with future endeavors with groovy.