JMeter Installation and Use in Windows Linux

Source: Internet
Author: User

JMeter Installation and Use in Windows Linux
1. Test in Windows environment 1. Download:

Address: http://apache.fayea.com//jmeter/binaries/apache-jmeter-2.12.zip

2. open:

Run jmeter. bat in the bin directory.

3. Use:

0>. Add a thread group to the test plan.

1> Configure the thread group, which is mainly the execution action, number of threads, and number of cycles after the samplezer Error

2> Add a test object, that is, the samplezer. Main Parameters: IP, Port, protocol, method, path, and transmitted parameters.

In the parameter section, you can directly enter the parameter name + parameter value in the Parameters box. You can also write the Parameters to the. CSV file and enter the parameter and reference parameter variable names in the Parameters box. To meet the needs of each request to change parameters.

In this test, I wrote the parameters in zset. CSV. See figure 2.1. In the. CSV file, parameters are separated by commas (,) for each behavior.

2.1> note the. CSV file format and parameter variable name.

2.2> response assertions are used to verify whether the request is successful before the test result can be obtained. Select ky "http://www.bkjia.com/kf/web/php/" target = "_ blank" class = "keylink"> PHP7NOm19a2ztPrsuLK1MSjyr2hozwvcD4KPHA + pgltzybzcm9 "http://www.2cto.com/uploadfile/Collfiles/20141230/20141230105851252.png" alt = "\">

2.3> assertion result, that is, whether each request meets the assertion requirement. If an error occurs, it is printed.

2.4> graphic results: displays test results

2.5> the summary report displays the test results

Java (TM) SE Runtime Environment 1.7.0 _ 67-b01, ISO-8859-1, en
[14-12-29 16:12:45. 601] {main} Java HotSpot (TM) Server VM 24.65-b04, 32, mixed mode, Oracle Corporation
[14-12-29 16:12:45. 601] {main}
[14-12-29 16:12:45. 601] {main} user. name = root
[14-12-29 16:12:45. 686] {main}
[14-12-29 16:12:45. 693] {main} server listening to localhost. localdomain: 6800
[14-12-29 16:12:45. 698] {main}
[14-12-29 16:12:45. 808] {main}
[14-12-29 16:12:45. 809] {main} resin. home =/usr/local/resin-4.0.41/
[14-12-29 16:12:45. 809] {main} resin. root =/usr/local/resin-4.0.41/
[14-12-29 16:12:45. 809] {main} resin. conf =/usr/local/resin-4.0.41/conf/resin. xml
[14-12-29 16:12:45. 809] {main}
[14-12-29 16:12:45. 809] {main} server = 127.0.0.1: 6800 (app: app-0)
[14-12-29 16:12:45. 810] {main} stage = production
[14-12-29 16:12:46. 234] {resin-32} WebApp [production/webapp/default/resin-admin] active
[14-12-29 16:12:46. 262] {resin-33} WebApp [production/webapp/default/ROOT] active
[14-12-29 16:12:46. 696] {resin-34} WebApp [production/webapp/default/resin-doc] active
[14-12-29 16:12:46. 697] {main} Host [production/host/default] active
[14-12-29 16:12:46. 697] {main} ServletService [id = app-0, cluster = app] active
[14-12-29 16:12:46. 697] {main}
[14-12-29 16:12:46. 698] {main} http listening to *: 8080
[14-12-29 16:12:46. 698] {main}
[14-12-29 16:12:46. 699] {main} Resin [id = app-0] started in 2685 ms

Access the server ip Address: port on your pc. If you see the default welcome page of resin, the installation is successful.

Resin? Default Home Page


This is the default page for the Resin web server.
Documentation is available at/resin-doc.


Administration is available at/resin-admin.

Then, copy the war package of the web project in Windows to the webapps folder under the ren directory to access the web project on the Internet.

3> install jmeter

Download: also download the corresponding installation package on the jemeter Official Website

Decompress:

Run:./jmeter-n-t ../ssdb_test.jmx-l ../log. jtl

Note:

A.-n parameter description does not need to verify whether the graphic library is installed

B.. jmxfile can be generated using jmetergraphics in windows. For example, to test the final. CSV file path, you can directly use notepad ++ vi to modify the. jmx file to ensure that the file path relative to. jmx is correct.

C. log. jtl Save the test result. Since the graphic interface library is not installed, the test result. jtl file can only be viewed using jmeter in windows.

[@ Zjm_44_250 bin] # jmeter
-Bash: jmeter: command not found
[@ Zjm_44_250 bin] #./jmeter
An error occurred:
No X11 DISPLAY variable was set, but this program was med an operation which requires it.
[@ Zjm_44_250 bin] #./jmeter. sh
An error occurred:
No X11 DISPLAY variable was set, but this program was med an operation which requires it.
[@ Zjm_44_250 bin] #./jmeter-n-t ../ssdb_test.jmx-l ../log. jtl
Creating summariser <summary>
Created the tree successfully using ../ssdb_test.jmx
Starting the test @ Mon Dec 29 18:43:20 CST 2014 (1419849800772)
Waiting for possible shutdown message on port 4445
Summary = 100 in 0.3 s = 289.9/s Avg: 105 Min: 3 Max: 285 Err: 0 (0.00%)
Tidying up .... @ Mon Dec 29 18:43:21 CST 2014 (1419849801734)
... End of run
[@ Zjm_44_250 bin] #

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.