Ask your Voice Assistant

Alexa, tell VoxSnap to play posts from BlazeMeter

Automated Performance Tests in Jenkins Continuous Integration Environments

1. Why is Continuous Integration (CI) Important?
Continuous Integration (CI) is important for developers, as they can integrate code into a shared repository and verify each check-in with an automated build, deploy and test the process. This enables them to quickly find and remove bugs and measure the impact of each code change to application performance.

Users who want to add performance testing should identify their goals together with business analytics. This is important for determining which types of test should be run at each stage of the CI process.

Here are the types of tests you can run:
● Load Tests are conducted to understand the behavior of the system under a specific expected load.
● Stress Tests are used to understand the upper limits of capacity within the system.
● Soak Tests determine if the system can sustain the continuous expected load.
● Spike Tests determine if the system can sustain a suddenly increasing load generated by a large number of users.
● Isolation Tests determine if a previously detected system issue has been fixed by repeating a test execution that resulted in a system problem.

So for example, for Continuous Delivery, running soak and spike tests in a pre-production environment helps understand how applications perform with continuous expected loads and spikes, with each production deployment.

To simplify inclusion of load tests into CI we suggest to use the Open Source test automation tool called Taurus. Let’s understand how Taurus works.

2. Using Taurus to Easily Run Load Tests
Taurus simplifies the automation of performance testing, is built for developers and DevOps, and relies on JMeter, Selenium, Gatling and Grinder as underlying engines. It also enables parallel testing, its configuration format is readable and can be parsed by your version control system, it’s tool friendly and tests can be expressed using YAML or JSON.

If you don’t have Taurus yet, install it. Let’s look at a simple configuration in YAML.

This test ramps-up to 5 users for 30 seconds, then sustains this load for 1 more minute. The number of hits per second (throughput) is 3, and they send requests to a url.

The code consists of the following:

Line 1 execution
Line 2 concurrency 5
Line 3 throughput 3
Line 4 ramp-up 30 seconds
Line 5 hold-for 1minute
Line 6 scenario
Line 7 requests
Line 8 the URL

This is a clear and simple test. The same test in JMeter would be very long, with lots of text that is hard to understand, and changes made into it would be unclear.

You can also split the file into 2 (or more) config files, which will make it easier to maintain the test code with the source code, especially if many developers are working on the same test. The first config …

See the rest at blazemeter.com