AnsweredAssumed Answered

How to create virtual service when http request and java object response

Question asked by tommy_jp on Mar 2, 2015
Latest reply on Sep 1, 2015 by tommy_jp

When virtualizing API that has http request and java object response, I virtualized the API by specifying the HTTP transport protocol.

 

In this case, the response of the VSI, byte data sequence is stored.

Maintenance in Workstation is difficult, also is bad readability.

 

I will do the following approach. Are there any other good idea?

 

When recording...

  • Use Custom DPH.
  • Convert the response from the API to JSON or XML, and update response of VSI.

 

When playback...

  • Use Custom DPH.
  • Convert the response from the VSI (JSON or XML) to byte array, and update response.

 

In this method, it is considered to be necessary to maintain the Custom DPH, depending on the type of Java objects responses.

It is concerned with the maintenance might lower.

Outcomes