Load test configuration with different test cases


#1

Hi there,

I have a question regarding the load test configuration with different test cases.

Given two different test cases A and B, is it possible to configure the target load scenario which is described below? If yes, how would an example of test.properties look like?

Target Load Scenario

  • 20% of the agents run Testcase A repeatedly
  • 80% of the agents run Testcase B repeatedly

Note: Both parts should run simultaneously, not sequentially.

Kind Regards,
Michael


#2

Hi Michael,

Sure, there are even several ways to do so, depending on the load model you want to use - user count or arrival rate.
Both models are explained in detail here.

And, you can either specify the load for each test case explicitly OR define a default load profile and use the loadFactor property to define a test case specific factor that should be applied to the default load for up/down scaling.

First of all, make sure that you have configured a proper test case mapping in your project.properties.
This should like this:

com.xceptance.xlt.loadtests.TestA.class = com.acme.tests.A
com.xceptance.xlt.loadtests.TestB.class = com.acme.tests.B

Now, lets define the load explicitly.

User count model:

com.xceptance.xlt.loadtests = TestA TestB

com.xceptance.xlt.loadtests.default.measurementPeriod = 30m

com.xceptance.xlt.loadtests.TestA.users = 2
com.xceptance.xlt.loadtests.TestB.users = 8

Arrival rate model:

com.xceptance.xlt.loadtests = TestA TestB

# make sure to configure enough users here
com.xceptance.xlt.loadtests.default.users = 5
com.xceptance.xlt.loadtests.default.measurementPeriod = 30m

# 300 iterations per hour -> one iteration every 12 seconds
com.xceptance.xlt.loadtests.TestA.arrivalRate = 300
# 1200 iterations per hour -> one iteration every 3 seconds
com.xceptance.xlt.loadtests.TestB.arrivalRate = 1200
# increase number of users for TestB to accomodate for higher load (number of users limit the concurrent iterations of a test case)
com.xceptance.xlt.loadtests.TestB.users = 15

Finally, lets define a default load profile that is scaled by a test case specific load factor.

User count model:

com.xceptance.xlt.loadtests = TestA TestB

# default load profile (run each test case with 10 users for 30 minutes)
com.xceptance.xlt.loadtests.default.users = 10
com.xceptance.xlt.loadtests.default.measurementPeriod = 30m

# TestA: scale by 20%
com.xceptance.xlt.loadtests.TestA.loadFactor = 0.2
# TestB: scale by 80%
com.xceptance.xlt.loadtests.TestB.loadFactor = 0.8

Arrival rate model:

com.xceptance.xlt.loadtests = TestA TestB

# default load profile 
# for each test case, limit its number of concurrent iterations to 10
com.xceptance.xlt.loadtests.default.users = 10
# start a new iteration every 30 seconds
com.xceptance.xlt.loadtests.default.arrivalRate = 120
com.xceptance.xlt.loadtests.default.measurementPeriod = 30m

# TestA: scale by 20% -> 24 iterations per hour (one iteration every 150 seconds) using 2 virtual users (max. 2 iterations concurrently)
com.xceptance.xlt.loadtests.TestA.loadFactor = 0.2
# TestB: scale by 80% -> 96 iterations per hour (one iteration every 37.5 seconds) using 8 virtual users (max. 8 iterations concurrently)
com.xceptance.xlt.loadtests.TestB.loadFactor = 0.8

Hope that helps.

Thanks,
Hartmut


#3

Hi Hartmut,

sorry, I was too tied up into scripting the test infrastructure, I should have taken a look at the documentation before bothering you. Thanks for your patience and the fast and detailed response!

Kind Regards,
Michael


closed #4

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.