Creating DevOps JMeter CI/CD pipeline Using Taurus
About JMeter
Apache JMeter is a highly versatile open-source integration testing tool. It is often used as a load testing tool for web applications, but can also be used for functional testing and for testing other types of services, such as databases.
About Taurus
Taurus is an open-source automation test framework, that can be used in particular to automate JMeter executions. Taurus can take an existing JMeter plan and define load profile and assertions through simple configuration. Taurus can export a test report in JUnit format, that can be published to an Azure DevOps pipeline.
About the JMeter extension
This extension provides the following components:
The JMeter tool installer task acquires a specified version of JMeter from the Internet or the tools cache and prepends it to the PATH of the Azure Pipelines Agent (hosted or private). This task can be used to change the version of JMeter used in subsequent tasks. Adding this task before the TaurusRunner in a build definition ensures you are using that task with the right JMeter version.
This extension is intended to run on Windows, Linux and MacOS agents.
Pre-requiste
1. You should have DevOps account free/paid
2. A jmx file with some apis
3. And repo of that jmx file in DevOps
JMeter tool installer task
Install python task
Ensure you have Python 3.6, 3.7 or 3.8 installed. Search for Use Python version and click on Add. Under Version spec, enter 3.8. Python 3.9 is reported not to work.
Pre-requisite to Install Taurus task
pip install --upgrade wheel setuptools Cython
pip install bzt
Recommended by LinkedIn
pip install --upgrade bzt
Taurus tool installer task
Taurus tool runner task
In the Taurus Arguments enter a space-separated list of files or websites to test. The following arguments can be passed:
execution:
- scenario:
script: website-test.jmx
reporting:
- module: junit-xml
filename: TEST-Taurus.xml
Yaml file link
Reference link
I'm seeing the jmeter test results in a build artifact, but they don't show up in azure devops. How do you enable that feature? - task: TaurusRunner@0 inputs: taurusConfig: | execution: - scenario: script: Jmeter/FunctionalTest.jmx concurrency: 5 iterations: 10 ramp-up: 2s reporting: - module: junit-xml filename: TEST-Taurus.xml jmeterHome: '$(JMeterInstaller.JMeterHome)' jmeterPath: '$(JMeterInstaller.JMeterPath)' jmeterVersion: '$(JMeterInstaller.JMeterVersion)' outputDir: 'taurus-output'
Such an amazing article :-)
This will be helpful to many, Good on you!