Showing results for 
Search instead for 
Did you mean: 

Load Testing Question

Super Contributor

Load Testing Question

I did some research on performance testing strategies and discovered that performance test scenario should be reflective of real world conditions that a web server might experience.

For example, I have a load test with three requests
--> User Login, Add Item to shopping cart, Browse Page.

Looking at my web server logs, I know that about 20% of my users use 'Login' 50% are browsing, and 30% are Adding Items to shopping carts.

Using soapUI, it is possible (now or in future releases) to designate different number of threads to each request in a load test. As of now (using thread strategy), it seems that all request in a load test will get the same number of threads.

Hopefully my question made sense.

- Ali
Super Contributor


I cant see straight on how this could be solved with threads, what you (for example) could do is a TestCase which contains:

1) A login request
2) A browse request (if it requires a login)
3) An add item request

and then insert groovy steps between these that loop back in X % of the executions (using Math.random() ), thus simulating a increased load on these steps in alignment with your measurements.. ie

if( Math.random() < 0.4))
  testRunner.gotoStepByName( ... )

would add another request in 40% of the executions (cumulatively though, so you would probably need to play with these values to get a good balance..)

Hope this helps!


Super Contributor

I am a little confused on how to accomplish this scenario and needed some help.

So I want the following scenario

1. Create Profile (25% of requests)
2. Login Profile (40% of requests)
3. Add Item (35% of requests)

I dont quite understand what you mean by looping back X% of the time. Do I insert this groovy between each step (so a total of 4). Would it possible to create a sample dummy project to show what you mean.


Super Contributor

on of the steps in my load test is to connect to the database and verify some email address

import groovy.sql.Sql

//update database to verify account
driver = Class.forName("").newInstance();
sql = Sql.newInstance("jdbc:sqlserver://servername;etc etc;") 
sql.execute("UPDATE dbo.aspnet_Membership set IsApproved = 1 where UserId=(select UserId from dbo.aspnet_membership where LoweredEmail=${Email})");

I notice that when I run my testcase under load I see various TCP/IP errors. Is this because I am not closing connections and the OS is maxing out connection ? any suggestions ?

Super Contributor


hmm..  maybe.. what kind of errors are you getting? How many threads are you running?


Super Contributor

Hi again Ali,

regarding your first question with the scenario, we will create a sample project for you.. I'll get back to you



Hmm yes, this can not be done with simple threads.

The numbers are as they are because a user (define by a log in)

Browses 2.5 items
Adds 1.5 items

What you can then use threads for is having 20 users (threads) doing this at the same time meaning we get

20 Logins
50 Browses
30 Adds

And here is where the systems we are testing can start showing irregular behaviour, maybe the browsing is resource demanding and slows down the rest.

Product Guy for Ready! API, SoapUI and all things API
New Here?
Join us and watch the welcome video:
TechCorner Leaderboard
Want a fun and easy way to learn ReadyAPI and show off your skills? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

Get a full Raw JMS request


Compare an expected JSON value and actual response in Events


Fetch value/data from JSON response using Groovy Script

See replies!

Get data from Petstore and add it to Excel sheets

Top Kudoed Authors