Reply
Highlighted
Contributor
Posts: 39
Registered: ‎07-20-2011

Is it possible to get rawRequest and rawResponse into PDF report in easy way?

Hi @All:

 

    Tried to create a new TestStepResultsReport associate with a new Report to get rawRequest and rawResponse data into it.

 

    If someone knows something like insert following stuff into TestStepResultsReport:

 

       <field name="rawResponse" class="java.util.List"/>
       <field name="rawRequest" class="java.util.List"/>

 

    Then will get job done.

 

 

     It is hard to get more information regarding which field you can use from which Datasource when you design you customized report.

 

Thanks in advance.

 

Moderator
Posts: 247
Registered: ‎03-17-2016

Re: Is it possible to get rawRequest and rawResponse into PDF report in easy way?

Hi kingsmartbear,

 

Thank you for the post. The following topics could be useful for you:

Also, I know that some users use the following approach:

They add a local testcase property, for example 'rawresponse' and use the following Groovy script:

 

 

myRequestStep = testRunner.testCase.getTestStepByName('MyTestStep')
def GetrequestData = new String(myRequestStep.testRequest.messageExchange.rawRequestData)
def GetresponseData = new String(myRequestStep.testRequest.messageExchange.rawResponseData)

testRunner.testCase.setPropertyValue( "rawresponse", somGetresponseData)
Anastasia
Customer Care Team