JMeter running under Linux

Source: Internet
Author: User

Before using JMeter to do performance testing, basically use their own laptop.

The following analysis is carried out considering the network transmission and utilization of system resources:

1 on the notebook, start-cmd "ping Server" to get the transfer time. "Ping the Server" on a Linux machine to get the transmission time, the two time is similar, think does not affect the test result

2 generally I used to test the Linux test machine and notebook computer, are 4 cores 8G.

But! Today the company network is very bad! Seriously affected my test. Endurance, simply on the Linux test calculation.

Just one line of command: SH jmeter.sh-n-T http.jmx-l result_*.jtl

Steps:

One installation JMeter

1 Add the JMeter of your notebook to the compression pack Jmeter.zip

2 uploading Jmeter.zip to a Linux server: I uploaded it to/opt/soft in RZ mode.

3 Unzip, enter path/opt/soft/jmeter/bin

4 See if Jmeter.sh is able to execute, and if it cannot add execute permission, I chmod 777 jmeter.sh directly, can use SH jmeter.sh-v to detect whether the command is available.

Ii. writing a test plan

1 in GUI mode, create a new test plan, save and upload to the Linux machine corresponding directory, can add the corresponding timer in the test plan, aggregation report and so on.

2 Find your test plan in the Linux directory, vim open for editing

<stringprop name= "Threadgroup.num_threads" >200</stringProp>    number of threads <stringprop name= " Constanttimer.delay ">100</stringProp> fixed timer at the time interval of the added components of the corresponding parameters can be found in the inside, for parameter adjustment as long as the edit here is OK. 

Three result files

The result file is a previously saved RESULT.JTL format file

The file can be viewed using the aggregated report in GUI mode, you can open the Add Aggregation report, click "Browse ..." on the Add a thread group, such as test plan, GUI interface, JMeter button to find the Jtl file you just generated. The statistics results are analyzed.

Four here are some of the commands we can use when running test scripts in non-GUI mode:

    • -H help print out useful information and exit
    • -N Non-GUI mode run JMeter in non-GUI mode
    • -t test file, JMeter test script file to run
    • Files that record results with-l log file
    • -R remote execution, starting remote service
    • -H proxy Host, setting up the proxy host used by JMeter
    • -p proxy port, setting the port number of the proxy host used by JMeter

Example:jmeter-n-t test1.jmx-l logfile1.jtl-h 192.168.1.1-p 8080

JMeter running under Linux

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.