Forum Discussion
balak84
14 years agoOccasional Contributor
This should help:
def utils = new com.eviware.soapui.support.GroovyUtils( context );
def project = testRunner.testCase.testSuite.project ;
def tc = project.testSuites["TestSuite"].testCases["TestCase_2"] //Can also pick value from a different Test Suite: if the test step in TS2 has run fine
def httpRespHeaders = tc.testSteps["TestCase2_TestStep_Name"]
.testRequest.response.responseHeaders;
def tstep1 = tc.getTestStepByName("TestCase2_TestStep_Name");
def response_other_TestCase = tstep1.getPropertyValue("Response");
log.info response_other_TestCase
return (response_other_TestCase)
Hope it helps.
Regards,
Bala.
def utils = new com.eviware.soapui.support.GroovyUtils( context );
def project = testRunner.testCase.testSuite.project ;
def tc = project.testSuites["TestSuite"].testCases["TestCase_2"] //Can also pick value from a different Test Suite: if the test step in TS2 has run fine
def httpRespHeaders = tc.testSteps["TestCase2_TestStep_Name"]
.testRequest.response.responseHeaders;
def tstep1 = tc.getTestStepByName("TestCase2_TestStep_Name");
def response_other_TestCase = tstep1.getPropertyValue("Response");
log.info response_other_TestCase
return (response_other_TestCase)
Hope it helps.
Regards,
Bala.