shiva_kakarla
16 years agoContributor
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)
def request = testRunner.testCase.getTestStepByName( "HTTP_Test_Request" );
log.info("*********request values::::"+request)
def property = request.getProperty("request");
def records = new groovy.util.XmlParser(false,false).parseText(property.value);
Thanks
Shiva
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)
def request = testRunner.testCase.getTestStepByName( "HTTP_Test_Request" );
log.info("*********request values::::"+request)
def property = request.getProperty("request");
def records = new groovy.util.XmlParser(false,false).parseText(property.value);
Thanks
Shiva