In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Demand analysis
1. In daily work, it may be necessary to verify the user password of the linux server to verify whether the user password is normal, such as the user, the password error, or the prompt to change the password when connecting, which is considered an exception.
2. If only one or two servers need to be verified, it can be done manually, but if 50 or 100 servers are checked by hand, it will be very tedious and may make errors.
3. I will introduce the actual work that needs to verify 50 servers, how to automatically verify through jmeter, simple and efficient, manual verification may take half a day to achieve, the development of a jmeter script, only 10 minutes to complete, later have the same work, only need to modify the parameter file can be verified immediately
4. in the process of work, first think about whether there are any tools that can realize automation, so that you can save a lot of working time and improve efficiency.
1. Add SSH Command request
Right-click the Test Plan add Thread (user) thread group to add a thread group
SSH Command is a plug-in that jmeter uses to connect to linux and can execute commands. First, you need to add SSH Command, right-click the thread group "add" sampler "SSH Command"
First, parameterize Hostname, User Name and Password. The default port is 22, and the connection timeout is 5000 (ms). Enter ls for command.
Second, add parameterized files
First, add a user-defined variable, which is used to call the CSV component file path and to obtain the parameter file under the upper level data. The advantage is that using relative variables, regardless of the computer or environment, the script can execute normally. Right-click the test plan to add "configuration component" user-defined variables.
Add CSV data file settings, the component can be used to loop values, right-click the thread group "add" configuration component CSV data file settings, set file name, file code, variable name
Add param.csv to the data directory, and then copy the ip, user, and password to the file. The directory structure is as follows
Add view result tree, right-click thread group "add" listener to view result tree
Third, to execute the test, first set the thread group execution rules, 1 thread, the number of cycles can be 50, because there are 50 hosts, so set to 50 times
Click the execute button and the results are as follows. The red one is abnormal and the green one is normal. The file under the current connection user will be returned normally.
if the article is helpful to you, you are welcome to follow my official account, which is synchronized with the articles on this platform for easy reference. I will continue to publish articles related to testing and share testing techniques with you. Every original article is written attentively to put an end to plagiarism.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
Package com.jdbclearn.gbase8a.dataload;import java.sql.*;public class TestConnection {public static
© 2024 shulou.com SLNews company. All rights reserved.