Service Virtualization

 View Only
  • 1.  Two responses for one request

    Posted Jun 13, 2017 10:21 AM

    Hello All,

     

    I have requirement , team wants two responses for single request on two different response queues with slight delay. Some one urgently can help, how we can achieve this?

     

    Thanks..

     

    Shivam Garg



  • 2.  Re: Two responses for one request
    Best Answer

    Posted Jun 13, 2017 11:50 AM

    Shivam ,

    This is very basic need from SV and we can achieve this by adding multiple response for same request. If you already have SV recorded with one response then you can add response manually and copy/paste the first one and make changes as require.  In case of RR pair you can add one request and multiple response like the following list contains an example of the file names in a request/response pair:

    • test-req.xml
    • test-rsp1.xml
    • test-rsp2.xml
    • test-rsp3.xml
    • test-rspN.xml  ( N is number of times)

    A request/response pair consists of one request file and one or more response files.

    Please note to check out the "Allow Duplicate Specific Transactions" options in the Transaction Basics tab. 

    This feature enables multiple specific transactions for the same request.  

     

    More on this link: Transactions Tab for Stateless Transactions - DevTest Solutions - 10.0 - CA Technologies Documentation   

     

    lets us know in case you looking for something else. 

     

    Hope this help. 

     

    Thanks, 

    Rajesh k Singh



  • 3.  Re: Two responses for one request

    Posted Jun 16, 2017 02:22 PM
      |   view attached

    Hi Rajesh,

    I was able to make the VS with single request and multiple response.But when I am hitting the service with postman,rest easy and jmeter,I am getting the same response(Response-1) again and again.

    Is there a different way to test our service than postman where it can behave accordingly?Below is attached MAR file for the same just to verify if things are done right

    Attachment(s)



  • 4.  Re: Two responses for one request

    Posted Jun 28, 2017 04:13 AM

    Another way to do it is to add an 2 additional step in the VSM after the VSE Responder Step,

    1) to run a query to find the correct 2nd response message using beanshell script

    2) to send the 2nd response message back.