Bloggers have been in the software testing industry since graduation 1.5 time, most of the time in dealing with a variety of APIs, the use of the interface test tools are also many, this article records the use of the tools of the experience, and focus on how I work in the use of JMeter to do the test, are performed under the Windows operating system.
The first use of postman, the advantage of the tool is that you can save the test process used in the request data, can be tested system all the interface requests are saved in the tool, for troubleshooting location problems, the tool is very useful, the disadvantage is that the efficiency is too low, encountered a business process involving the execution of multiple interfaces, Manual filling of parameters is really slow.
First, install the JMeter
1.JAVA Environment
jdkhttp://java.sun.com/javase/downloads/index.jsp
To configure system variables:
(1) Java_home, the variable value is: You install the directory of the JDK locally.
C:\Program files\java\jdk1.6.0_10;
(2) CLASSPATH, the value of the variable is:
C:\Program Files\java\jdk1.6.0_10\lib\dt. JAR; C:\Program Files\java\jdk1.6.0_10\lib\tools. JAR; C:\Program Files\java\jdk1.6.0_10\bin;
(3) Modifying the PATH variable
Add C:\Program files\java\jdk1.6.0_10\ bin;
Detect if the JDK installation was successful: Run-->cmd--> input "Java" If you can see the help message stating that the JDK installation was successful.
2.JMETER Environment
: http://jmeter.apache.org/download_jmeter.cgi
Unzip the Apache-jmeter-2.11.zip to local (any directory can), such as I downloaded it to: "E:\Jmeter\apache-jmeter-2.3.4".
To configure system variables:
(1) Jmeter_home, the value of the variable is:
C:\jakarta-jmeter-2.3.4
(2) Modify the CLASSPATH variable
Add %jmeter_home%\lib\ext\apachejmeter_core.jar;% jmeter_home%\lib\jorphan.jar;%jmeter_home%\lib\ Logkit-1.2.jar;
Operating mode: Click on the JMeter directory under the Bin folder Jmeter.bat can open JMeter.
Second, run an HTTP request
1. Add a group of threads
The thread property {ramp-up Period (in seconds)}: means that all threads within this thread (HTTP requests to me) are executed in the same time, with a value of 0, which means that all requests under the thread group are executed concurrently.
2. Add an HTTP request
"Thread Group" right-click Add->sampler->http Request
3. Add "View results tree"
"Thread Group" right-click Add-a listener-view results tree
4. Running
Interface test Tool-jmeter using notes (one: running an HTTP request)