Service Virtualization

  • 1.  Format for RR pairs for a REST POST

    Posted Feb 02, 2017 02:10 PM

    Can someone show the format for RR pairs for a rest post?

     

    Here's the format for the request I've been trying:

    POST /rest/mvt/v0/membergroups HTTP/1.1

    Content-Type: application/json

    {
    "groupName": "jazzteam"
    }

     

    And the response looks like:

    {
    "groupDescription": "jazz unit test"
    }

    (Full example is attached.)

     

    When I create a virtual service from the portal with several different transactions, only the first transaction makes it into the virtual service. You can download the .mar file from the console, unpack it, and view the image. Only one transaction will be shown in the image. I'm hoping that I've missed something in the format of the RR pairs.

     

    Thank you

    Attachment(s)

    zip
    MemberGroup1-req.txt.zip   260 B 1 version
    zip
    MemberGroup2-req.txt.zip   261 B 1 version
    zip
    MemberGroup1-rsp.txt.zip   202 B 1 version
    zip
    MemberGroup2-rsp.txt.zip   203 B 1 version


  • 2.  Re: Format for RR pairs for a REST POST
    Best Answer

    Broadcom Employee
    Posted Feb 03, 2017 12:05 PM

    Brian,  I think the reason you are not seeing the second transaction is, you probably missed an extra step during recording.

     

    Enable  " Allow duplicate specific transactions".   Then Save & Deploy   or Save & Edit.   



  • 3.  Re: Format for RR pairs for a REST POST

    Posted Feb 03, 2017 02:08 PM

    Thanks, that works for the portal.

     

    Do you know if there is anything similar for the Invoke createService call? I don't see a setting for the serviceProperties.xml file to allow duplicate transactions, but perhaps a different protocol class or a using a separate bind would work.



  • 4.  Re: Format for RR pairs for a REST POST

    Broadcom Employee
    Posted Feb 03, 2017 03:05 PM

    Glad to hear that it worked for the portal !

     

    So,  In addition to the serviceProperties.xml configuration, a Virtual Recording Session (VRS) file can be included to configure the protocol handler to use when importing request/response pairs. This file must have a .vrs extension.

    What I would suggest is ,  First create a sample VSM/SI  from the Workstation using the R/R pair option.

    Enable " Allow duplicate " option in there.  Towards the end in the last screen ,  click on the ICON that lets you create  the .vrs file.   If you open this file , you will see that duplicate transactions is set to 'true'  

    <Transport allAreStateless="false" asObject="true" desensitize="false" duptxns="true">

    Enabling this property and including the .vrs  should do the trick! 

    Hope this helps.  

     

    Thanks

     

    Shiney.