Forum Discussion

SiKing's avatar
SiKing
Community Expert
14 years ago

race condition testing / parallel test steps

Hi all.

Has anyone successfully used SoapUI to test for a race condition?

What I would need is the ability to run only individual test steps (NOT entire test cases) in parallel. Real world example would be something like:
1. Create a unique user in a JDBC step.
2. Find an available flight in a SOAP step.
3. Find an available seat on the flight in a SOAP step.
4. Try to book the flight (a SOAP step), such that there is a unique user but each user books the same seat.
Step 4 should be "invoked" multiple times, all of them in parallel, and only one of them should succeed.

One idea that has been suggested is the use of CountDownLatch (http://www.javamex.com/tutorials/threads/CountDownLatch.shtml), however this is slightly out of my league.
Anyone have any other suggestions?

Thanx, Mark.

2 Replies

  • SiKing's avatar
    SiKing
    Community Expert
    It actually ended up that I could solve my situation with just SoapUI.
    I put the first three steps into one test suite, which pulled all the necessary information into global variables.
    The last step I replicated five times into another test suite, which I just ran in the parallel mode.
    The only Groovy I used was for validating the results, in the TearDown of the second suite.
    Works like a charm.