Service Virtualization

  • 1.  GET Method (with random Value each time) recording in CA Lisa

    Posted Aug 02, 2018 01:57 PM

    Hi There,

     

    I have to record a Get Method that send a random app id each time to Lisa to get the response. I tried to using the below base path and it is not working

    /Dir/Application/{{app id}}

     

    It works when I hardcodes the App id in the base path. But not when I am trying to send random value each time.

     

    Appreciate any help here!

     

    Thanks!



  • 2.  Re: GET Method (with random Value each time) recording in CA Lisa

    Posted Aug 02, 2018 04:27 PM

    Can you post a picture of the base path and REST data protocol filter rules from the service's Listen Step?

    Also, you say recording but the description sounds more like a playback issue.

     

    Perhaps, the service is mixing two different concepts (i.e., basepath and URI Rules).

    I would expect to see something like:

    - VSM Listen Step, base path = /Dir/Application 

    - VSM Listen Step, Filter (Virtual Service Environment, Data Protocol, REST Protocol) having an URI rule such as:

    GET /Dir/Application/{app_id} or GET /Dir/Application/{URLPARAM0}  

    The VSI would also have the "app_id" or "URLPARAM0" appear as an argument.  



  • 3.  Re: GET Method (with random Value each time) recording in CA Lisa

    Posted Aug 03, 2018 10:54 AM

    thanks for the respose Joel. For some reason I am not able to select the comparison Operator and I am not able to hit the service through SOAP getting a 404 error . Below is the snip from listen step.

    My Get URI should be like Get/Application/summary/JSON/{App id}

     

    Also I was told that Application team would send CORS request before the Actual request that's the reason I have the OPTIONS recorded below. Not sure if LISA Can handle that.



  • 4.  Re: GET Method (with random Value each time) recording in CA Lisa
    Best Answer

    Posted Aug 03, 2018 01:08 PM

    On the OPTIONS call, set the Match Style to 'operation'. There is no real need to have specific transactions underneath this one.  Also, verify if the URLPARAM0 is actually sent during the OPTIONS call. I suppose it is possible for the client to ask for OPTIONs available for GET /ApplicationSummary/JSON - not sure.  In the OPTIONS response Meta Data, ensure that your response contains the exact meta data response headers the application is checking during the CORS processing.

     

    On the GET call, there is no comparison allowed on the META transaction. Try CLICKing on the GET /ApplicationSummary/JSON/{URLPARAM0} transaction instead. Then, you should be able to set URLPARAM0 to "anything" or some other value.



  • 5.  Re: GET Method (with random Value each time) recording in CA Lisa

    Broadcom Employee
    Posted Aug 03, 2018 04:56 PM

    I see selected GET /ApplicationSummary/JSON/{URLPARAM0} transaction-->Match Style is set to "Signature" that is why you are not seeing "Comparison Operator". Change the "Match Style" to "Exact" and then you can change the "Comparison Operator".



  • 6.  Re: GET Method (with random Value each time) recording in CA Lisa

    Broadcom Employee
    Posted Aug 02, 2018 04:45 PM