Captured data – convert link to text

  • Questions
  • Captured data - convert link to text
Question ID: 107152

I am testing REST services using UFT 11.50. After sending the request, HP test results viewer shows captured data. In it, 3 properties – RequestBody, HttpRawRequest and ResponseBody – are shown as links. Is there a way to show them as text in the run results viewer? Content type is set to application/xml. I tried with few other content types, but it did not change anything in run results viewer.

Marked as spam
Posted by (Questions: 44, Answers: 0)
Asked on October 12, 2016 7:49 am
Answers (1)
Private answer

You cannot suppress the links but you could write custom code to add the test to the report. Below is example of code that worked in my environment and will have to be customized for your environment to get the response you are looking for.

public void RESTActivityV215_OnAfterExecuteStepEvent(object sender, STActivityBaseEventArgs args)
//report the request and response in the results report differently
this.RESTActivityV215.Report(''HTTP REQUEST'',(this.RESTActivityV215.HttpRawRequest.ToString()));
this.RESTActivityV215.Report(''REQUEST BODY'',(this.RESTActivityV215.PostBody.ToString()));

this.RESTActivityV215.Report(''HTTP RESPONSE'',(this.RESTActivityV215.HttpRawResponse.ToString()));
this.RESTActivityV215.Report(''RESPONSE BODY'',(this.RESTActivityV215.ResponseBody.ToString()));

Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on October 12, 2016 7:49 am