Service Virtualization

Expand all | Collapse all

Create virtual service with dynamic header values

  • 1.  Create virtual service with dynamic header values

    Posted 07-16-2018 03:27 AM

    I have a requirement to create virtual service with SOAP XML files which has header and body in the request. I need two responses, one for positive and one is error and I have prepared 2 R & R pairs. One value in the Header changes and nothing else in the request when compared to the positive and negative scenario. I have tried to create virtual service, but for both requests DevTest VS is giving only single response and not picking error response for error request, Maybe because value is in the request header ( I am not sure ). Please help to let me know how can I create virtual service by having dynamic changes in the values from header of the request.



  • 2.  Re: Create virtual service with dynamic header values

    Posted 07-16-2018 08:11 AM

    There are some options. We need to know some additional details.

     

    - You indicate the incoming requests are identical, except that a value in the header changes. Do you need to determine the response based upon this value in the header?

    If so, you might consider using a Request Data Manager DPH to move the key/value pair from the header into the request's argument list so the VSI can include it during request comparison.

    Request Data Manager Data Protocol - DevTest Solutions - 10.3 - CA Technologies Documentation  

     

    - If the header does not play a role in determining the response, then how do you know when you need to send the good response vs. the bad response. 

    VSIs allow the storage of more than one response to a request. You need to enable Allow Duplicate Specific Transactions option.

    This will cause a round robin situation where one time the good response will be sent and the next time, the negative response is sent.

    Transactions Tab for Stateless Transactions - DevTest Solutions - 10.3 - CA Technologies Documentation  



  • 3.  Re: Create virtual service with dynamic header values

    Posted 07-16-2018 08:17 AM

    I am using DevTest portal to create VS. Is there any possibility to achieve this via Portal instead of using workstation? 

    My requirement falls in first option and response should be based on header value.



  • 4.  Re: Create virtual service with dynamic header values