Forum Discussion
SmartBear_Suppo
Alumni
16 years agoHi Shiva,
You code looks OK. The snippet:
should actually work from both UI and command-line (e.g. when testrunner.sh or testrunner.bat is invoked). It works on my machine.
Make sure you've entered the test step name correctly. You can, for example, click on a test step you want to access, hit F2 (as if to rename it). copy the name in clipboard and paste it right into your Groovy script.
If you're still getting a null, then download the latest nightly build and try the same script with it.
Cheers!
/Nenad Nikolic a.k.a. Shonzilla
You code looks OK. The snippet:
def request = testRunner.testCase.getTestStepByName( "HTTP_Test_Request" );
log.info("*********request values::::"+request)
should actually work from both UI and command-line (e.g. when testrunner.sh or testrunner.bat is invoked). It works on my machine.

Make sure you've entered the test step name correctly. You can, for example, click on a test step you want to access, hit F2 (as if to rename it). copy the name in clipboard and paste it right into your Groovy script.
If you're still getting a null, then download the latest nightly build and try the same script with it.
Cheers!
/Nenad Nikolic a.k.a. Shonzilla