Load Test Configuration
What is a user and what states can it have?
What kind of load profiles can you run
Fully flexible is effectively a combination of steady and ramp-ups.
Two factors and time determine the load profile
Basically you always define how often a test case should be executed aka a transaction should run.
What is arrival rate and why is it so useful
Imagine a super-market. You visit the store despite the fact that the checkout lines are long, because you do not know that when entering. Real world users do not know that the site is down or parts of it are slow. Therefore the traffic hits the infrastructure.
This is the most preferable way of running tests.
A nice way to define individual workloads by having ready to run files configured. Avoids accidental overwriting of configurations.
## The file with test run specific settings.
com.xceptance.xlt.testPropertiesFile = test-max.properties
./mastercontroller.sh -testPropertiesFile=test-max.properties
See the property hierarchy concept.
The minimal set of definitions for a test
## Typically in project.properties
## Map the test case aka name the test case and connect it
## with the test class. Name and class name often match but
## don't need too.
# com.xceptance.xlt.loadtests.TCheckout.class = com.company.tests.TCheckout
com.xceptance.xlt.loadtests.TTest.class = com.company.tests.TCheckout
com.xceptance.xlt.loadtests.TSearcher.class = com.company.tests.TSearch
## Announce the test to the load test setup
## This is a list of tests typically.
com.xceptance.xlt.loadtests = TTest TSearcher
## Define the test execution time and we will measure the entire
## time as well as the load comes up immediately.
## The 'default' indicates that this is for all tests configured.
com.xceptance.xlt.loadtests.default.measurementPeriod = 10m
## Set the load for the test mapping TTest
## Constant user rate set
com.xceptance.xlt.loadtests.TTest.users = 5
## TSearcher is arrival rate based
com.xceptance.xlt.loadtests.TSearcher.users = 50
com.xceptance.xlt.loadtests.TSearcher.arrivalRate = 1000
This is about the minimum. Everything extra is fun.
How to set and change the different runtimes
## In case the test should not start immediately
com.xceptance.xlt.loadtests.default.initialDelay = 1h
## No measurement will take place during the first five minutes
com.xceptance.xlt.loadtests.default.warmUpPeriod = 5m
## We will measure for 10 minutes
com.xceptance.xlt.loadtests.default.measurementPeriod = 10m
## and shutdown the test over period of 5 minutes. Again without
## measuring anything during that time.
com.xceptance.xlt.loadtests.default.shutdownPeriod = 5m
## Over what period of time the load should be gradually increased?
## This clock starts after the initialDelay is over, so we rampup during
## warmup and half of measurement.
com.xceptance.xlt.loadtests.default.rampUpPeriod = 10m
Warmup is not really helpful, because you can remove any time period from reports during report creation if desired. This feature is here to match other tools.
Fine-tune the behavior with individual settings per user
## Announce the test to the load test setup
## This is a list of tests typically.
com.xceptance.xlt.loadtests = TTest TSearcher
## Define the test execution time and we will measure the entire
## time as well as the load comes up immediately.
## The 'default' indicates that this is for all tests configured.
com.xceptance.xlt.loadtests.default.rampUpPeriod = 5m
com.xceptance.xlt.loadtests.default.measurementPeriod = 10m
## Set the load for the test mapping TTest
## Constant user rate set
com.xceptance.xlt.loadtests.TTest.users = 5
## TSearcher is arrival rate based
com.xceptance.xlt.loadtests.TSearcher.users = 50
com.xceptance.xlt.loadtests.TSearcher.arrivalRate = 1000
## Adjust the users to start later and rampup differently.
## Announce the test to the load test setup
## This is a list of tests typically.
com.xceptance.xlt.loadtests = TTest TSearcher
com.xceptance.xlt.loadtests.default.rampUpPeriod = 5m
com.xceptance.xlt.loadtests.default.measurementPeriod = 1h 30m
## TTest should start later
com.xceptance.xlt.loadtests.TTest.initialDelay = 30m
com.xceptance.xlt.loadtests.TTest.users = 50
## TSearcher should rampup longer to be less aggressive
com.xceptance.xlt.loadtests.TSearcher.rampUpPeriod = 30m
com.xceptance.xlt.loadtests.TSearcher.users = 50
com.xceptance.xlt.loadtests.TSearcher.arrivalRate = 1000
Don't overuse this, because it is hard to keep track and the more differences in load over the entire period the harder to evaluate and make sense of the collected data.
The setup of choice for best control
com.xceptance.xlt.loadtests.TTest.users = 50
Don't run this for real user load tests!
Arrival rate is a steady load profile despite the base concept
com.xceptance.xlt.loadtests.TTest.users = 50
com.xceptance.xlt.loadtests.TTest.arrivalRate = 1000
If you don't need the cap, give it more safety margin before being held back by too few users.
Make the traffic come up slowly
com.xceptance.xlt.loadtests.default.measurementPeriod = 1h 30m
com.xceptance.xlt.loadtests.default.rampUpPeriod = 15m
com.xceptance.xlt.loadtests.TTest.users = 50
com.xceptance.xlt.loadtests.TTest.arrivalRate = 1000
com.xceptance.xlt.loadtests.TTest2.rampUpPeriod = 5m
com.xceptance.xlt.loadtests.TTest2.users = 500
com.xceptance.xlt.loadtests.TTest2.arrivalRate = 20000
Ramp up time can be equal to measurement time.
Simulate changing traffic over longer periods of time
...arrivalRate = 0h/0 1h/1000 2h/500 4h/500 4h/1000 12h/0
Looks more difficult than it actually is.
Coolest way to adjust the defined workload quickly
tools/LoadProfileEditor/loadprofile.html
## Run half of it
com.xceptance.xlt.loadtests.default.loadFactor = 0.5
## Run twice as much
com.xceptance.xlt.loadtests.default.loadFactor = 2
## Turn it into a fancy day simulation
...measurementPeriod = 24h
...loadFactor = 0h/0 1h/1 2h/1 2h30m/1 3h30m/1 4h/2 4h30m/1 5h/1 6h/1 6h30m/2 \
7h/2 7h30m/3 8h/4 8h30m/4 9h/4 9h30m/3 10h/3 10h30m/5 11h/5 11h30m/8 \
12h/5 12h30m/5 13h/5 13h30m/4 14h/3 14h30m/3 15h30m/3 16h/3 16h/4 16h30m/5 \
17h/6 17h/7 17h30m/10 18h/10 19h/10 19h30m/9 20h/7 21h/9 21h30m/9 22h/9 \
22h30m/8 23h/7 23h30m/6 24h/2
You can also apply this to default.
If you need absolute execution certainty
## This will result in a total of 500 transactions
com.xceptance.xlt.loadtests.TTest.users = 5
com.xceptance.xlt.loadtests.TTest.iterations = 100
The measurement period is the ruling factor. If the iterations do not fit the time granted, the test might end without the total count reached.
Reuse a test case with different config
com.xceptance.xlt.loadtests.TStore1Checkout.class = \
com.company.tests.TCheckout
com.xceptance.xlt.loadtests.TStore2Checkout.class = \
com.company.tests.TCheckout
start-url = http://www.southfoobar.com/
TStore1Checkout.start-url = http://www.test1.com/
TStore2Checkout.start-url = http://www.test2.com/
## Announce the test to the load test setup
## This is a list of tests typically.
com.xceptance.xlt.loadtests = TStore1Checkout TStore2Checkout
## Define the test execution time and we will measure the entire
## time as well as the load comes up immediately.
## The 'default' indicates that this is for all tests configured.
com.xceptance.xlt.loadtests.default.measurementPeriod = 10m
## Config load
com.xceptance.xlt.loadtests.TStore1Checkout.users = 20
com.xceptance.xlt.loadtests.TStore1Checkout.arrivalRate = 100
## Store2 gets more traffic
com.xceptance.xlt.loadtests.TStore2Checkout.users = 50
com.xceptance.xlt.loadtests.TStore2Checkout.arrivalRate = 1000
Only makes sense if the test case supports different properties of course.
Your questions, your feedback.