Forum Discussion

WaveyDavey's avatar
WaveyDavey
Occasional Contributor
15 years ago

Noob: will it do this?

LoadUI and SoapUI look absolutely amazing, and I *think* I'm starting to grasp it, but... can it do this?
We have a REST api, for mapping phone numbers, so we need to make a sequence of calls, each dependent on the results of the previous call.
Data returned is primarily JSON, and we use SESSIONS to retain login status.

Call 1) https://url/rest/123/login?un=fred&pw=pw123&rt=json
if return contains JSON loggedIn : true
Call 2) http://url/rest/123/planNumber/0844/?pa ... =b&rt=json
returns more JSON, including number : 2721234
extract that number, and do
Call 3) http://url/rest/123/mapNumber/0844/2721 ... 1=x&par2=y

i.e. only do call 2 if login went ok
only do call 3 if we got a number from call 2 , and use that number to drive call 3

Then I'd be looking at loadUI to stress test the api for large numbers of these tests. (well, one login call 1, then lots of calls 2&3 together).

Am I understanding soapUI - is this what it's for, and can it be done as above? I don't mind investing some time learning this if it's the tool I need, but I'd hate to reach a blind alley due to misunderstanding it.
Some rough pointers would be welcome, though I'm not expecting all the answers on a plate.

Regards
David
  • WaveyDavey's avatar
    WaveyDavey
    Occasional Contributor
    Sorry to pester, anyone got any ideas on this ?
    Would not be an issue to go to Pro, company will pay for it if it will do the job.
  • It sure can do that.

    Each test step can have (in fact it's a good idea to always have) assertions. After a test steps completes all the assertions for that test step are evaluated. So for example your first step could have a 'contains' assertion that would look for some specific string in the response. If the string is not found, then the assertion fails.

    If any of the assertions in a test step fail, then the test case will halt execution and the test case is marked as failed. If the need arises, there is a configurable on each test case that allows you to continue test case execution when assertions fail.