Service Virtualization

 View Only
  • 1.  testing a virtulaised rest service

    Posted Nov 03, 2015 02:40 AM

    Hi,

     

    i have virtulaised a REST service using RRpairs.

    i have the VSM and VSI created.

    But when i try to hit the service iam getting meta repsonse

     

    <html>

       <head>

          <meta content="HTML Tidy for Java (vers. 27 Sep 2004), see www.w3.org" name="generator"/>

          <title>404 Not Found</title>

       </head>

       <body>

          <h1>Not Found</h1>

          <p>The requested URL was not found on this server.</p>

          <hr/>

          <p>

             <i>The DevTest VSE service could not match your request to a recorded request.  Consider expanding your service image.</i>

          </p>

          <br/>

          <font size="-2">Produced by a DevTest virtualized web server.</font>

       </body>

    </html>

     

    Can somebody help me on how to test the service virtualised.

    Mine is a POST operation with JSON request and response.

    I have used REST,JSON data protocol for virtualising.

     

    Thanks,

    Jenifer.V



  • 2.  Re: testing a virtulaised rest service

    Posted Nov 03, 2015 12:46 PM

    when you use the REST and JSON protocol handlers, you should get VSM entries that contain EXACTLY the number of parameters as elements in your json messages.

     

    SV/DT will want to match that there are EXACTLY the same NUMBER and NAME of each parameter. you can use Magic string to say you don't care about the CONTENTS of some fields,

    but they MUST be there. add one, no match, take one away, no match.

     

    also make sure you have or not, the trailing / on your URL string. it matters too. needs to match whatever is in the VSM set of operations and url strings.

    (to get with and without traiiling /) you have to duplicate the list of the other kind. (with and then remove / or without and then add /)

     

    you can also turn on VSI matching debugging to help,

    in lisa_home/logging.properties

    log4j.logger.VSE=DEBUG, VSEAPP



  • 3.  Re: testing a virtulaised rest service

    Posted Nov 04, 2015 12:58 AM

    Thanks.

     

    Iam able to test the service.

    I removed the REST protocol and used only JSON.

    on the top of the request while virtualizing I added

     

    POST /v1/memos HTTP/1.1

    Content-Type: application/json

     

    Now my operation name was set to POST /v1/memos and the arguments in JSON as lisa service image arguments.