cancel
Showing results for 
Search instead for 
Did you mean: 

[Resolved] Multiple REST Requests, different parameters

Contributor

[Resolved] Multiple REST Requests, different parameters

I can only assume there's something I'm fundamentally misunderstanding about the UI here. Haven't not read through manuals or anything, I created a REST project and am trying to create multiple requests with different parameters and values, but when I change any one request's parameters, all of them change

Under my Project, I have a REST Service, which has a Resource.

Under that Resource, I have a Method for POST.

Under POST, I have multiple Requests with Request Parameters.

Several parameters are optional, so I want one Request with one subset of them, and some specific values, and another with the same subset but different values, and another with a different subset of parameters, etc, etc.

But when I create these multiple Requests and change parameters for one of them, they change for all of them. What am I missing?
5 REPLIES 5
Moderator

Re: Multiple REST Requests, different parameters

Contributor

Re: Multiple REST Requests, different parameters

Yes, I'd seen that article. I don't see it addressing my specific question. Unless you're saying that the only way to do what I'm asking is to create a Test Suite and Test Cases?

And if so, why can I even create multiple requests outside a Test Suite if they are all actually just one request? I have multiple Requests under a Method, and changing one changes the other. I swear it's behaving just like a bug. Either a UI bug (that shouldn't let me create multiple requests or should make it plain how to create multiple distinct ones) or an implementation bug (that shouldn't be overwriting the parameters).

In fact, while composing this reply, I tried creating the Test Suite and Cases, and changing my Request to generate a new Test Case *also* changed the original Test Case. So I don't think that article helped me at all.

Surely either there's a bug here or I'm misunderstanding something fundamental? I've tried creating multiple Requests (under my POST method) and multiple copies of a POST Method, and both behave the same way. Do I need a whole separate copy of the Resource, or will that behave the same way too?

Oh, I'm on 4.6.1, BTW.

Thanks for any help towards clearing up my confusion.
Moderator

Re: Multiple REST Requests, different parameters

Hi,

I was able to reproduce what you posted if you change the Name of the parameter in the Request editor. If you change the Value then the other requests are not changed. If you want to add a new parameter for the different requests then you should clone that resource, and then add\modify the parameters you want for the requests.
Contributor

Re: Multiple REST Requests, different parameters

Ahh, that seems to have done the trick. Thank you!
Occasional Visitor

Re: [Resolved] Multiple REST Requests, different parameters

First of all you should create New Method under your Resourse. 

Secondly add Parameter to your new Request  and set it's "Level" as METHOD, than it's will affect only this particular case. For better understanding take a look on screenshots Smiley Happy

2019-09-10 16_37_15-SoapUI 5.4.0.png2019-09-10 16_38_28-SoapUI 5.4.0.png

New Here?
Join us and watch the welcome video:
Join the exciting event
SeptemberHubBub
Top Kudoed Authors
Join the September Hub-bub to show off, learn and win