Forum Discussion

Markus_F's avatar
Markus_F
Occasional Contributor
8 years ago

How to define a resource path with same parameter name

Hello,

 

I want to test with SOAPUI PRO a RESTful interface with the following target URL:

/interface;ip=1.2.3.4/rack;id=1/shelf;id=1/slot;id=1/port;id=1

 

The parameter "id" is used multiple times (in rack, in shelf, in slot and in port).

 

I created /rack, /shelf, /slot and /port as child resources of /interface but SOAPUI fails, when I try to add "id" as a parameter (Style MATRIX) to each of the childs.

It seems for me SOAPUI does not support two ore more parameters with the same name in one resource.

 

Any idea how to solve this issue?

 

Thanks in advance.

 

Regards

Markus

 

2 Replies

  • To my understanding you can't use like that. When SOAP UI see a web service URL which as 4 different parameters it has to assume that all these as separate parameters which should be able to take different values. Unless why would someone make the web service request complex by asking client to populate same values in many different parameters. And each parameter name is only a place holder ( or a variable name ) 

     

    Now for the sake of testing let's assume that there is certain logic why service is designed like this. So to make this work you might have to define parameters with different names.

    {rackId}, {shelfId}, {slotId}, {portId}

     

    So but to make testing easier you can just pass same value to all these fields from a single property ( probably stored at test case level for example

     

    rackId  :  {#TestCase#id}

    shelfId :  {#TestCase#id}

     

    Well, I know this is not what you asked for. Just putting across what came to my mind.

     

    Cheers!

    Gilu Gopi

    • Markus_F's avatar
      Markus_F
      Occasional Contributor

      Hello Gilu,

       

      thank you for your contribution. I will check your proposal.

       

      Best Regards

      Markus