Pass virtual assets ID? into the URL path

Favad001Favad001 Posts: 2
edited July 2018 in Virtualize

So I have this JSON responder...
The Input Mode is Multuple Responses and each of these has been giving a name matching what should be set in the URL so for instance;

List of Multiple Responses;

foo1
foo2
foo3

url example; server01..parasoft.local/data/layer/foo1/map
So in my application if url directs to ;
server01..parasoft.local/data/layer/foo2/map it should pull the data from foo2.

Im new with parasoft so I've no clue of how to deal with this.
I tried with URL Paths, under each json response (under Multiple responses)..
And set the URL Path Index to 2
And URL Path Name to foo1
So I thought this would switch the 2 index in the URL and replace it with foo1.

But this dosen't work.
Could someone navigate me in the right direction to solve this issue :-)?
Thanks

Comments

  • keegan_chankeegan_chan Posts: 56

    What is the actual behavior -- is it returning an error or the response for foo1? If you can attach the .pva file you're using, it may be helpful too.

  • Favad001Favad001 Posts: 2

    It dosen't return anything since I dont know how to configure this.
    How do I implement parameterized message responder with Multiple responses with a dynamic parameter in the URL.

    As asked in the question;
    // Url to retrieve the data; (Back end)
    server01..parasoft.local/data/layer/{fooValue}/map

    In parasoft;
    I've created multiple files for the input mode; Multiple Responses;
    Foo1
    Foo2
    Foo3 etc.
    The response of data should be correlated to the given file;
    So under Multiple Responses on each file you can create further configuration;
    I tried to set the HTTP Url paths;
    URL Path Index; 2 and the URL Path Name as Foo1.
    For some reason this not working when I hit the url in my application it dosen't show the corresponding data for Foo1.

    My expected behaviour is that it shows this data when I hit the specific URL and return the Mocked data.

  • keegan_chankeegan_chan Posts: 56

    Your configuration for the multiple responses sounds right. But it looks like your application is not invoking the virtual asset at all. Please check the url in your application to make sure it is pointing to the virtual asset. Please use Parasoft SOAtest or other HTTP client application to invoke the virtual asset, to see it responds as you expect.
    If you can attach the .pva file you're using in this thread, it may be helpful too.

Sign In or Register to comment.