February 2022

brief introduction

This paper uses Docker to simulate and deploy JMeter distributed pressure testing on a physical machine.
In practical application, one or more slave nodes should be started on each physical machine and related ports should be opened, and then the master should distribute tasks for testing

 11111111111111111.svg

preparation

1. Create three slave nodes (to process tasks sent by the master)

 docker run -it -d --name slave01 runcare/jmeter-slave docker run -it -d --name slave02 runcare/jmeter-slave docker run -it -d --name slave03 runcare/jmeter-slave

Attention ⚠️ Yes, if your .jmx There is a CSV data file in the configuration file. You need to mount this configuration file to the slave node container, or your mster distribution task may fail!

Assuming that the path of the CSV data file you set is/data/dataset.csv, you need to map this file to each slave node container:

 docker run -it -d -v /data/dataset.csv:/data/PP-dataset.csv --name slave01 runcare/jmeter-slave docker run -it -d -v /data/dataset.csv:/data/PP-dataset.csv --name slave02 runcare/jmeter-slave docker run -it -d -v /data/dataset.csv:/data/PP-dataset.csv --name slave03 runcare/jmeter-slave

-Read the rest-