Service Virtualization

  • 1.  How to pass wildcards into Operation and basepath

    Posted Nov 06, 2017 06:18 PM

    Hi,

     

    I am working on virtualizing a service using CA devTest. I have an operation 

    POST /tst/cars/HONDA/test

    This works fine to virtualize one service. I have plenty of other requests that can match the same Operation. Like this

    POST /tst/cars/TOYOTA/test

    For me, I just need to match any incoming request that matches this:

    POST /tst/cars/.*/test

    How can I achieve this under Operation and BasePath for Image and Model respectively?

     

    Thanks



  • 2.  Re: How to pass wildcards into Operation and basepath
    Best Answer

    Posted Nov 06, 2017 07:27 PM

    Actually, you need to research the use of URI rules. See REST Data Protocol Handler - DevTest Solutions - 10.1 - CA Technologies Documentation  

     

    In the above, your URI rule would parameterize the car make and form a rule allowing it to pass into the VSI.

    POST /tst/cars/HONDA/test       

    POST /tst/cars/TOYOTA/test

    POST /tst/cars/BMW/test    

    Would contain a URI Rule parameterizing the make into POST /tst/cars/{URLPARAM0}/test.  This would be the operation in the VSI. Each specific transaction (HONDA, TOYOTA, and BMW) will show up as specific transactions under the POST /tst/cars/{URLPARAM0}/test operation.  The value of the car make will be in an argument called URLPARAM0.