Forum Discussion

depeche's avatar
depeche
Contributor
16 years ago

Problem getting request or response xml from other testcase in different TSuite

Following is the code to get the request xml from the current executing test case:
     
      def requestName = 'RSQ_and';   

    def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );
holder = groovyUtils.getXmlHolder( requestName+"#Request"  );



How do we get the request xml of a test step present inside different testcase and also in different testsuite?

Regards,
depeche

1 Reply

  • Hi all!

    Finally I got the solution for above stated query:

    def testStep =  testRunner.testCase.testSuite.project.testSuites['yourTestSuiteName'].testCases['yourTestCaseName'].testSteps['yourTestStepName'];

    def holder = groovyUtils.getXmlHolder( testStep.testRequest.requestContent );

    log.info holder.xml;


    regards!
    depeche