Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Performance testing-setting up JMeter installation environment

2025-01-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Stand-alone environment construction

Here is an example of installing the latest version of JMeter5.1.1 on Windows 10 (64bit).

The installation steps are as follows:

1. Install JDK 11 (Oracle JDK 11 is ok for learning purposes)

The installation path defaults to C:\ Program Files\ Java\ jdk-11.0.3

2. Configure JDK 11 environment variables

2.1.Create the environment variable JAVA_HOME and set its value to:

C:\ Program Files\ Java\ jdk-11.0.3

Modify the environment variable Path, and append the following after its value:

;% JAVA_HOME%\ bin

2.3.Test JDK 11

Run the java,javac,java-version command separately

If the first two commands display the syntax information of the command, and the last command displays the version information of JDK 11, the JDK installation is successful.

3. Install JMeter5.1.1

Extract the apache-jmeter-5.1.1.zip to any directory, for example: d:\ Program Files\ apache-jmeter-5.1.1

4. Start JMeter5.1.1 (GUI mode)

Go to the bin subdirectory under the unzipped directory, find jmeter.bat, and double-click to start.

Distributed environment building

Program list

1. Jdk-8u212-linux-i586.tar.gz (JDK8 32bit)

2. Apache-jmeter-5.1.1.zip (JMeter Master is the same as Slave installation package)

Server list

This paper introduces the deployment process by taking the control of two Slave by Master as an example. The server information is shown in the following table:

Operation steps

1. Deploy and configure multiple Slave

2. Deploy and configure Master

3. Start the Master test verification in GUI mode.

Deploy and configure multiple Slave

Detailed steps for Slave1 deployment:

1. Install JDK8

[root@localhost] # mkdir-p / usr/local/java

[root@localhost] # tar-zxvf jdk-8u212-linuxi586.

Tar.gz-C / usr/local/java

two。 Configure JDK environment variables

[root@localhost ~] # vi / etc/profile

Add the following at the end of the file:

Export JAVA_HOME=/usr/local/java/jdk1.8.0_212

Export PATH=$JAVA_HOME/bin:$PATH

3. Install Slave

[root@localhost] # mkdir-p / usr/local/jmeter

[root@localhost ~] # unzip apache-jmeter-5.1.1.zip

-d / usr/local/jmeter

4. Configure Slave

Find the configuration file bin/jmeter.properties in the installation directory of JMeter and edit:

Server_port=1099 # default port is 1099, which can be changed to another port

Server.rmi.ssl.disable=true # uncomment and change false to true

5. Start jmeter-server

[root@localhost ~] # cd / usr/local/jmeter/apachejmeter-5.1.1/bin/

[root@localhost bin] # nohup. / jmeter-server-

Djava.rmi.server.hostname=192.168.126.129 &

# multiple NICs need to specify IP addresses

Slave2 deployment is the same as Slave1, just repeat this process.

(Djava.rmi.server.hostname=192.168.126.130 needs to be specified when starting in the background)

Deploy and configure Master

1. Install JDK8

two。 Configure JDK8 environment variables

3. Install Master

The above steps are the same as the stand-alone environment, so I won't go into details.

4. Configure Master

Find the configuration file bin\ jmeter.properties in the installation directory of jmeter and edit:

Will:

Remote_hosts=127.0.0.1

This line is modified as follows:

Remote_hosts=192.168.126.129:1099192.168.126.130:1099

# Note: IP and save_port of Slave are used to connect and separate multiple key-value pairs.

Server.rmi.ssl.disable=true # uncomment and change false to true

5. Start Master

Go to apache-jmeter-5.1.1\ bin in the unzipped directory and find the

Jmeter.bat, double-click to start.

three。 Start Master test verification in GUI mode

Start Master in GUI mode, and you can see the configuration in the menu Run-- > Remote Start

As shown in the following figure, the remote Slave information of

Matters needing attention

1.Master is consistent with the version of Java used by each Slave

2.Master is consistent with the version of JMeter used by each Slave

3. If a plug-in is referenced in the test plan, the plug-in should be included in both Master and each Slave

4. The test plan only needs to be placed on the Master, and will be automatically distributed to each Slave during execution. There is no need for each Slave to make a copy.

5. If the parameterized file is referenced in the test plan, the parameterized file needs to be copied to each Slave, and the directory path to be stored needs to be consistent.

6. Number of threads of distributed execution = number of threads of execution assumed to be deployed on a single machine * Slave. For example, 50 threads are running in a stand-alone deployment

First run in a distributed manner, with 4 Slave, then the total number of threads executed is: 50 / 4 / 200.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report