One, the Windows environment Test 1. Download:
Website address: Http://apache.fayea.com//jmeter/binaries/apache-jmeter-2.12.zip
2. Open:
Go to the Bin directory to run Jmeter.bat
3. Use:
0> Add a thread group to the test plan
1> Configuring thread groups, mainly performing actions after sampler errors, number of threads, loop count
2> Add a test object that is the sampler. Main parameters: Ip,port, protocol, method, path, passed parameters.
In the Parameters section, the parameter name + parameter value can be filled directly into the parameters box body. You can also write the parameters. CSV file, fill in the Parameters box body with parameters and reference parameter variable names. To meet the need to change parameters for each commit.
In this test I wrote the parameters in Zset. CSV, see Figure 2.1, in the. csv file, each behavior of a parameter group, separated by parameters.
2.1> note. CSV file format and parameter variable name.
The 2.2> responds to assertions to verify that the request was successful in order to produce the test results. Select the response field and test mode according to the actual situation.
2.3> asserts the result, that is, each request satisfies the assertion requirement. If something goes wrong, it will print out.
2.4> graphical results, showing test results
2.5> Summary report showing test results
Problems encountered during testing:
Can save the response to a file (which can be added to the sampler), but the error% is always 100% and the assertion result is all wrong. The reason is that I will assert that the result of the graphical result Summary report is added to the thread group layer. Should be added to the sampler layer. There the sample is where the assertion is set, and the listener asserts.
Second, the Linux environment test
I got an almost blank Redhat server. Only the SSDB to be tested are installed. Complete the test by configuring the environment in Java-resin-jmeter order.
1> Configuring the Java Environment
Check the system 32/64:uname-a first
Download jdk:http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html from Oracle website . tar.gz Files can
Installing the JDK
To configure a Java environment variable:
Vi/etc/profile
Additional:
Java_home=/opt/jdk1.6.0_20
Path= $JAVA _home/bin: $PATH
Classpath=.: $JAVA _home/lib/tools.jar: $JAVA _home/lib/tools.jar
Export Java_home
Export PATH
Export CLASSPATH
Where the java_home is the installation path for the JDK
Verify echo $PATH or java-version
2> Installation Resin
Download: http://caucho.com/products/resin/download/gpl#download
Extract
Run the./resin.sh Console
Print out:
Resin-4.0.41 (built Mon, Sep 09:54:25 PDT)
Copyright (c) 1998-2012 Caucho technology. All rights reserved.
Using Resin (R) Open Source under the GNU public License (GPL).
See http://www.caucho.com for information on Resin Professional,
including caching, clustering, JNI acceleration, and OpenSSL integration.
[14-12-29 16:12:45.169] {main} Using Resin (R) Open Source under the GNU public License (GPL).
See http://www.caucho.com for information on Resin Professional,
including caching, clustering, JNI acceleration, and OpenSSL integration.
Starting Resin on Mon, +0800 Dec 16:12:44 (CST)
[14-12-29 16:12:45.446] {main} <proxy-cache> requires Resin Professional. Please see http://www.caucho.com for Resin Professional information and licensing.
[14-12-29 16:12:45.600] {main}
[14-12-29 16:12:45.600] {main} Resin-4.0.41 (built Mon, Sep 09:54:25 PDT)
[14-12-29 16:12:45.600] {main}
[14-12-29 16:12:45.600] {main} Linux 2.6.18-371.3.1.el5xen i386
[14-12-29 16:12:45.601] {main} 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, 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 2685ms
Then visit the server Ip:port on your own PC to see the Resin default Welcome page that indicates the installation was successful.
Resin? Default Home Page
The default page for the Resin Web server.
Documentation is available at/resin-doc.
Administration is available at/resin-admin.
After that, the war package of the Web project under Windows is copied into the WebApps folder under the Ren directory, and the Web project on the server can be accessed outside the network.
3> Installation JMeter
Download: also download the corresponding installation package on the Jemeter website
Extract:
Execute:./jmeter-n-T. /ssdb_test.jmx-l. /log.jtl
Description
A.-n parameter description do not verify that the graphics library is installed
B... jmx files can be graphically generated in the Windows environment using JMeter, and the. csv file path involving parameters and test results can be modified directly with notepad++ VI. jmx files, making sure that they are the correct path relative to the. jmx file.
C.LOG.JTL Save test results since the GUI library is not installed, the test result. jtl file can only be viewed under Windows with JMeter.
[@zjm_44_250 bin]# jmeter
-bash:jmeter:command not found
[@zjm_44_250 bin]#./ JMeter
An error occurred:
No X11 DISPLAY variable is set, but the program performed an operation which Requi Res it.
[@zjm_44_250 bin]#./jmeter.sh
an error occurred:
No X11 DISPLAY variable is set Performed 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 18:43:20 CST (1419849800772)
waiting for possible shutdown MESSAG E on port 4445
Summary = 100 in 0.3s = 289.9/s AVG: Min: 3 Max: &nbs P 285 ERR: 0 (0.00%)
tidying up ... @ Mon Dec 18:43:21 CST (1419849801734)
... end of Run
[@zjm_44_250 bin]#
JMeter installation in the Windows Linux environment