Forum Discussion

ccdssv1's avatar
ccdssv1
Contributor
12 years ago

Requests don't respect the parameters order set in resource

The issue that I want to present is not something new and was introduced I think with SoapUi 3.5 release if I'm remember correctly. Was also pointed in the pro section of the forum some time ago (viewtopic.php?f=2&t=5953&p=18258&hilit=parameters+order#p18258) and as considered only an UI issue.

Issue: The parameters order set at the REST Resources level is not respected at TestStep level (UI) and Rest - HTTP REQUEST level;
Effect: If there is an WebServer that require an specific order for request parameters that cannot be accomplished via TestSteps that all parameters defined at the same level (Rest Resource or Method);

I will use the "Place Search" - Google Public API to show the effect of this issue, even this is not affected by the request parameter order;
Steps to reproduce:
1. Create an Rest Resource and an Method for it;
- here we can have multiple ways to define the parameters so I will present some cases:
Case a) - parameters defined at resource level;

Case b) - parameters defined at method level;

Case c) - parameters defined at resource and method level;


Expected result UI for all cases: the display order of the parameters at testStep level respect the order defined in resources/methods;
Actual result UI: the display order of parameters at testStep can't be controlled by user;

Expected result HTTP REQUEST CALL: the call is sent with parameters using the order defined at resource/method level;
Actual result: the call is sent with parameters having the order displayed at TestStep level

Note: - in a HTTP TestStep the order of the parameter can be changed and the request call will respect that order;
- I found today an real case where this was the reason why the server keep returned error message; it was an post call for an upload operation where some entities require to be sent before the actual file and it took me some hours before I discovered that this is the root cause;

Attached can be also found the demo project that I used to create the screenshots. Please let me know if I need to provide more info.

Thanks,
Ovidiu

3 Replies

  • In 4.6.0, you are given up and down arrows that allow you to modify the order that the parameters show up on the screen. *But* they are not remembered by the code. Since I have hundreds of parameters, it's really annoying that it does not keep them sorted. Especially since the UI implies that it will be remembered.

    Just to be clear, I think SOAPUI is a great program, and I happily depend on it. This failure to keep the rest parameters in order may be my only complaint.