Service Virtualization

  • 1.  How to set different response for the same request

    Posted Jun 29, 2017 01:13 AM

    I am stuck with a unique problem where functional & Regression team is using the same environment to perform their testing in parallel. Now the environment is pointed to a virtual service and because of parallel execution it is found that both teams are using shared data. Due to functional teams unique requirement the response  for a certain request has been customized for them to validate certain new features. Regression team is using the same set of request where they are expecting a normal response. 

     

    The request would be exactly same and I could not use the argument matching feature to differentiate between request. 

     

    1) Having 2 instance of VS is not possible because switching would require URL change & Server bounces from the environment team - Time consuming process.

    2) Providing time slot option might not be feasible due to parallel nature of the work.

     

    Would be helpful if you can share some thoughts on how to overcome this situation. Is there any feature within DevTest tool which can be used here. 

     

    Thanks

    Ajay



  • 2.  Re: How to set different response for the same request

    Broadcom Employee
    Posted Jun 30, 2017 02:53 PM

    Shivam,  is there some info you can put in the Request  that differentiates  when  a request comes in from functional vs. Regression team.  If so,  then you can add an assertion in the VSM to check for that  and  set different responses.  



  • 3.  Re: How to set different response for the same request
    Best Answer

    Posted Jul 02, 2017 09:37 PM

    You will need to input different parameter values into the request message so that the Virtual Service has the chance to differentiate them and reply with the corresponding response. For example, Customer Name can be "David" for Functional Team, and "Daniel" for Regression Team.

     

    If you can do that, then you can use the data-driven Virtual Service to handle this particular scenario where the VS will reply the respective team's response based on the identifier.