"Linux+jmeter, stress tests teach you a trick" __linux

Source: Internet
Author: User
Preface:

Probably February 5, 2017 formally participated in the Itoo test group, before due to the progress of the problem, missed such a chance to exercise their own, now very happy to get such a chance. Itoo Test group is divided into two groups, testing a group of daily manual testing, they need to understand the needs of the entire project, the use of Zen management bug, and also the previous self-study and soft test in the study of black box testing and white box application to practice they are great. This experience will extend to their future development, user experience and the quality of the software will be more than a chip. Give them a little praise. I was added later, and was assigned to test the two groups and perform some research on automated tests: Linux+jmeter. This blog post is a few days to study some of the small experience, follow the small weave together to see Bai. You can get to the.

Install JMeter Tools 1. Xshell: Connecting the server


2. WinSCP: Transmit the file environment to build JDK 1. Download Jdk:wget

http://download.oracle.com/otn-pub/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/ Jdk-8u121-linux-x64.tar.gz? AUTHPARAM=1487383224_A792235430C0B6304115C33B2F50325C 2. Decompression:

Tar zxf jdk-8u111-linux-x64.tar.gz

Or install directly using the following command:

Yum Install java-1.8.0-openjdk.x86_64

PS: Download and decompression using the Wget/tar/yum command, if the input after the display does not have the command, you need to install the Wget/tar/yum command before you can perform successfully.
3. Configure Environment variables:

Input vi/etc/profile, open profile This file, and then press "I", enter the following configuration information, and then press "ESC", enter the English state of the colon ":", and then enter the "Wq", press "enter", exit, that is set up for environment variables.

Java_home=/usr/local/jdk

Classpath= $JAVA _home/lib/

Path= $PATH: $JAVA _home/bin

Export PATH java_home CLASSPATH

Jmeter 1. Download JMeter:

Wget

Mirrors.hust.edu.cn/apache//jmeter/binaries/apache-jmeter-3.1.zip

2. Decompression:

Unzip Apache-jmeter-3.1.zip

PS: If the input unzip command does not show this command, then you need to install the Unzip command before you can run successfully.
3. Configure Environment variables:

Open file: Vi/etc/profile, press "I", edit, enter:

Export path=/opt/apache-jmeter-3.1/bin/: $PATH

Export jmeter= "/opt/apache-jmeter-3.1"

Export classpath= "$JMETER/lib/ext/apachejmeter_core.jar: $JMETER/lib/jorphan.jar: $JMETER/lib/logkit-2.0.jar:$ CLASSPATH "

Then press ESC, enter the colon ":", enter Wq, press "Enter", that is, to exit edit 4.source/etc/profile: Make the configured environment variable take effect immediately

PS: When you perform this step, it is possible that the following behavior may occur:


The "No file or directory" Shown here does not necessarily mean that JMeter is not configured successfully because there are several configurations, possibly other files that are not found. When this behavior occurs, don't worry, enter: Jmeter–v


This diagram appears to indicate that the environment variable configuration was successful. The fifth step can be omitted. Go directly to step sixth, then navigate to the directory where the test plan TEST.JMX is located, and enter:

Jmeter–n–t test.jmx–l TEST.JTL, you can generate test reports:



Follow the steps of step eighth immediately after.

PS: If the third and fourth steps are not successful, can also be omitted, at this time need to find

jmeter.sh location, directly to the fifth step can be. 5. See if successful:./jmeter.sh–v


6. Use tool WINSCP:

After successfully connecting to the server with the tool WINSCP, first enter the CD ..., navigate to the root directory of the server, and then transfer the test Plan TEST.JMX on Windows to the server



7. Test Report:

Command:./jmeter.sh–n–t test.jmx–l TEST.JTL, you can generate a test report:

PS: Put the test plan test.jmx in the same directory as jmeter.sh, enter this command to be successful, otherwise it will show that the test plan could not be opened TEST.JMX

8. Test Report Transmission:

WINSCP Transfer test report TEST.JTL to Windows

9. View Test Report:

Open jmeter, open test Plan, add view result tree, add aggregation report, and select Test.jtl in browse to view.



PostScript:

Don't mind it.

Forget the wind and the Rain

Be yourself

Laughing at the disappointments

As long as not afraid of rain

Life is beautiful.





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.