Service Virtualization

Expand all | Collapse all

Base Path Problem

  • 1.  Base Path Problem

    Posted Nov 23, 2017 08:31 AM

    Hello All,

     

    I want to us below base path with variable deviceId reason behind I want to hit base path with different values of it like 102, 103 etc..

     

    /api/mdm/devices/{{deviceId}}/apps

     

    But not able to achieve this. How this can be done?

     

    Please let me know.

     

    Cheers..

    Shivam Garg



  • 2.  Re: Base Path Problem

    Posted Nov 23, 2017 08:44 AM

    Hi Shivam,

     

    Assuming you are doing this using RRPairs then in your request file mentioned base path URL as below 

     

    /api/mdm/devices/12345678/apps

     

    While creating the VS, Lisa will automatically update the URL Param with variable as {{URLPARAM0}}

     

    Thanks,

    Vinay 



  • 3.  Re: Base Path Problem

    Posted Nov 23, 2017 09:07 AM

    Hello Vinay,

     

    Thanks for your reply. So we have created Virtual Service using GET /api/mdm/devices/102/apps and in URI rules , we are getting as above. Now let me know , how we can prepare base url with variable so that if every time we are changing value of that variable i.e. 102, 103 ,104 then it hit the same service and give us result.

     

    Hope you clear with my it.

     

    Cheers..

    Shivam



  • 4.  Re: Base Path Problem

    Posted Nov 23, 2017 09:17 AM

    Hi Shivam,

     

    In VSI select comparison operator as regular expression in request  and right the regular expression which will accept 3 digit. And test it with different value.

     

    Thanks,

    Vinay



  • 5.  Re: Base Path Problem

    Posted Nov 23, 2017 09:31 AM

    Vinay,

     

    Sorry to say, can you share screen shot end to end with Base path URL having variable as I mentioned.

     

    Please.

     

    Shivam



  • 6.  Re: Base Path Problem

    Posted Nov 23, 2017 09:38 AM

    I am not infront of my system.

     

    In your image file, go to request, you will see the URLPARAM0 there.

     

    Or you share your VSi screen shot 



  • 7.  Re: Base Path Problem

    Posted Nov 23, 2017 09:33 AM

    I want to make BASE path with dynamic variable so that if we are changing value during it should run.



  • 8.  Re: Base Path Problem

    Posted Nov 23, 2017 09:41 AM

    You can call me on +918770861002



  • 9.  Re: Base Path Problem

    Posted Nov 23, 2017 10:02 AM

    Did it works now or still facing issue?



  • 10.  Re: Base Path Problem

    Posted Nov 23, 2017 10:06 AM

    No luck. I think I am doing some thing wrong. can you share step by step Screen shot once you in front of your system?



  • 11.  Re: Base Path Problem
    Best Answer

    Posted Nov 24, 2017 01:44 AM

    Step 1:- Select req-rsp file and transfer protocol 

    2) Click next and configure data protocol 

     

    3) Click next and below screen will display 

     

     

    4) Click next and below screen will display 

    6) Click next and click on Finish button 

     

    Open VSI and VSM file 

    VSM Listener step 

     

    VSI :-

     

    Deploy VSM and run with different input value. 

    Below is the console output

     

    Thanks 

    ,

    Vinay 



  • 12.  Re: Base Path Problem

    Posted Nov 24, 2017 03:47 AM

    Thank you so much.

     

    yesterday I tried same steps and wrong part was in regex i.e. regular expression that I was using was wrong one. I corrected it and it worked.

     

    Cheers..

     

    Shivam Garg