Service Virtualization

  • 1.  How to give a range from a set of data for a response?

    Posted Feb 11, 2019 03:39 PM

    How to give a range from a setof data for a response?

     

    Meaning from a Data EXCEL:

     

    ID  1 to 10   gives Response1

    ID  11 to 20   gives Response2

    ID  21 to 30   gives Response3



  • 2.  Re: How to give a range from a set of data for a response?

    Posted Feb 11, 2019 03:50 PM

    I think we might need a little more definition as to what is meant by a Data Excel.  Are you saying this is a Data Driven virtual service?

     

    If the ID field you are referring to is in the VSI Argument List, you might consider using the Comparison Operator on the ID Argument.  For example, 

    If ID < 11, send response 1

    If ID < 21, send response 2

    every thing else sends from the META response which is response for 21 and above

    When using <, >, <=, >=, and regex comparisons, be mindful of the order in which the specific transactions occur in the VSI. The first one that returns true to all of the comparisons is the one that is used for the response. Hence, in the example above, if the specific transaction having ID < 21 occurs prior to the specific transaction having ID < 11, anything less that 21 is going to send response 2 -- the VSI will never select from ID < 11.



  • 3.  Re: How to give a range from a set of data for a response?

    Posted Feb 11, 2019 03:55 PM

    Thanks Joel

     

    Data Excel I meant DataDriven from Excel

     

    From Portal can we do the above ? Operation is only equal in the argument



  • 4.  Re: How to give a range from a set of data for a response?

    Posted Feb 11, 2019 04:00 PM

    Sorry I see the comparitors, but how response taken from the excel.

    currently it works like , If I select ID =1 m then response come from matching row (a xml)



  • 5.  Re: How to give a range from a set of data for a response?

    Posted Feb 11, 2019 04:04 PM

    I don't think Data Driven services within the Portal are intended to support significant overrides in the selection behavior. Perhaps, someone from the CA / Broadcom team can chime in with an example.