Command line testRunner.testCase.getTestStepByName( "Request 1" ); does not work
Hi I am running below statement in my groovy script and "request" variable is always null. It works when I execute in UI but not in commandline. I am using 2.5.1 version. Both the groovy step and HTTP request step are in same testsuite and testcase. Please let me know if there is anything missing.
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
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
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️Please mark my answer as a solution if it was helpful