Apache JMeter 5.2 is out. You can check my YouTube video about what’s new in Apache JMeter 5.2. Last month, I have released Windows Docker Container for Apache JMeter 5.1.1, you can check my GitHub repository or Docker Hub for more details. This blog post will talk about Windows Docker Container for Apache JMeter 5.2.
I have created a GitHub page dedicated for Windows Container. Please check.
Windows Docker Container for Apache JMeter 5.2
This repository helps you to run Apache JMeter in your Windows container. It uses the JMeter 5.2 on Windows Server Core with OpenJDK.
If you want to build this image, download this repository and use the below command in docker.
docker build -t img_from .
How to run JMeter on Windows Container?
First you need to install Docker for Windows. You can use your laptop with Windows 10 Pro or spin up an AWS EC2 instance under free tier.
Second, you need compatible Windows version as your base OS. If there is a conflict, you may not be able to run it.
docker pull qainsights/windows-docker-jmeter command to pull the image. This will pull the image from Docker Hub.
docker run qainsights/windows-docker-jmeter command to run JMeter inside the container. Below is the sample command
which executes the sample JMeter test plan located in the
docker run qainsights/windows-docker-jmeter -n -t .\examples\CSVSample.jmx -l Run1.jtl
To run in interactive mode, use the below command.
docker run -it qainsights/windows-docker-jmeter -n -t .\examples\CSVSample.jmx -l Run1.jtl
To remove the container once the execution is completed, use the below command.
docker run -rm qainsights/windows-docker-jmeter -n -t .\examples\CSVSample.jmx -l Run1.jtl
If you want to mount your host machine, you can use the below sample command.
docker run -it -v
qainsights/windows-docker-jmeter -n -t .\examples\CSVSample.jmx -l
You can keep your JMeter files in your host machine and pass it to the container for execution. Once the execution is done, you can view the log/jtl files in your host machine.
- make sure you are adding
.\in front of the folder names, as the entry point leverages powershell.
- no need to add
jmetercommand, just append
-n -t <yourJMeterTestName>.jmxfile name.