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

Using Jenkins to automatically and remotely call the pressure measuring machine to realize concurrent testing in different user scenarios

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

Share

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

Requirement analysis: in the process of performance testing, due to the deficiency of the environment or the requirements of the project, the performance test needs to be performed in the wee hours of the morning, so it is necessary to automatically execute the performance test scenario, and can execute different user concurrency multiple times, and automatically generate results. This paper introduces how to use jenkins to call the pressure testing machine in the linux environment to achieve performance testing. 1. The environment configuration first goes into Jenkins > plug-in management. The SSH plugin plug-in needs to be installed in jenkins, and the remote host can be configured by installing the plug-in.

Then go to system Management > > system Settings, search for ssh, then enter the ip, port, user and password of the pressure measuring machine, and click apply.

Jmeter environment configuration, use Xshell to connect to the linux pressure machine, and then upload the apache-jmeter-4.0-performance to the server

Go to the apache-jmeter-4.0-performance/bin directory to execute chmod 777 jmeter and grant execution permission.

Use vi ~ / .bashrc to add user local variables, add the statement export PATH=$PATH:/home/pmoTest/apache-jmeter-4.0-performance/bin on the last line, and then save exit

Execute source ~ / .bashrc to make the configuration effective

After the execution, execute jmeter-v to see the following figure, which proves that the global variable configuration is successful, and you can use the command to perform the performance test.

Script development first adds a user-defined variable configuration element to the performance test script that needs to be run, and configures two user variables threadNum and duration. The default values are ${P (threadNum,1)} and ${P (duration,1)}, respectively. ${_ P (threadNum,1)} indicates that the default value is 1, as follows

two。 Click console, number of threads and Ramp-Up Period to enter ${threadNum}, and duration enter ${duration} to save the script

3. Upload the performance test script to the appropriate directory

Third, jenkins execution first creates a free-style software project

Go to the task setup page, check Execute shell script on remote host using ssh in the build environment, enter the shell command, and then click the save button

Click build now in the task interface, and the test results are as follows:

You can set the execution time as needed. For example, if you need to execute on Saturday or Sunday, you can check Build periodically in the build trigger and enter 00 08 6. 7.

    if the article is helpful to you, you can click on the follow function in the lower right corner. Welcome to forward and clap the brick. I will continue to launch articles related to the test and share the testing technology with you. Every original article is written attentively to put an end to plagiarism and copying. The official Wechat account is synchronized with the articles on this platform for easy reference.

QQ technology exchange group: please enter the verification information 51CTO to add the group.

Wechat QR code follow official account:

After following, reply to the resource download, and you can get the download address of all kinds of resources shared by yourself.

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