Use of the interface test tool-jmeter

Source: Internet
Author: User
Tags http cookie http request soap
This paper introduces the whole workflow of interface testing, mainly using JMeter for interface testing.
Interface test defines interface testing is a test of the interface between components of a test system. Interface testing is primarily used to detect the interaction points between external systems and systems, as well as within each subsystem. The focus of testing is to examine the exchange of data, the transfer and control of management processes, and the mutual logical dependencies between systems.
Second, the meaning of the interface test 1, to ensure the correctness and stability of the system interface.   2, reduce the regression test manpower and time costs, improve testing efficiency, shorten the test cycle. 3, relative UI Automation is more stable, relatively easy to achieve automated continuous integration.
Third, the interface test application Scenario 1, test access
After the development of the background interface, the function test for the interface, ensure the basic function is normal, can carry on the subsequent test.
2. Regression test
After a bug fix, re-test to make sure that the problem is fixed and that no new issues are introduced.

Iv. test flow 1, requirements Review 2, interface test case design 3, writing test script 4, development self-Test 5, 6, admittance test 7, Interface Test 8, writing Interface test report
Five, interface test content 1, parameter check 1) parameter format check 2) parameter accuracy Check 3) must lose and than output item check 4) Boundary value Analysis 2, business function test 1) normal scene 2) Anomaly scenario 3, performance test
Vi. test Preparation 1, requirements document 2, Flowchart 3, Interface document interface test requirements for the interface definition document is very high, all the interface data types and business branches resulting from the message return structure needs to be defined beforehand, so to form the habit of the document, to facilitate access to minimize the communication between the team and team costs. 4. Test data
Seven, the tool choice 1, 3 commonly used interface test tool will compare
Tools Interface type Test Type
Jmeter Extensible WebSocket, sockets for Rest, soap, etc. Features, performance
Postman Rest Function
Soupui Soap, Rest functionality, performance, security
2. Advantages of JMeter 1) supported protocols more 2) Maximum benefits: High scalability, many plugins available.
Eight, simple interface test creation process 1, open jmeter download unzip, double-click the Jmeter.bat file in the bin directory.
2. Add thread groups Right-click on the test plan to add-->threads (Users) to the thread group. Interface tests typically use the default configuration, and the thread group name is changed as needed.
3. Add Information header management right-click on the thread group on the previous step and configure the component-->http Information header Manager generally add fixed information header parameters, which is added here is the content request format and the interface authentication parameters of the Hundred orchard.
4. Add the HTTP request default value on the thread group right-click on the Configure Symbol-->http request default worth all interface test access domain name and port are the same, you can use the symbol, once the server address changes, only need to modify the request default value. Fill in the domain name and port of the system under test, protocol type.
5. Add the HTTP cookie Manager right-click on the thread group and configure the component-->http Cookie Manager is used primarily to keep the login status.
6. Add Listener Thread Group right--add-on listener--View results Tree interface tests are usually added to view the results tree to make it easier to see the results after the run.
7, add HTTP request thread group right--add-->samlper-->http request on the HTTP Request Settings page, input the details of the tested interface, including the request path, the corresponding request method, and the parameters sent along with the request, configured as follows:
8. Set the checkpoint: Right-click on the HTTP request with an assertion-and-response assertion, configured as follows: The response assertion is typically chosen to determine whether the returned data meets expectations.

View results after running:

The above steps complete the creation of a simple test script, and the complex test cases are expanded on this basis. Using the interface test script written by JMeter, a subsystem is recommended to be placed in the same "thread group", and one module recommends using "Simple controller" to differentiate.
Reference: 1, using Jmeter for HTTP interface Test http://www.cnblogs.com/puresoul/p/4740436.html 2, SoapUI, Jmeter, postman three kinds of Interface test tools comparative analysis-- Grey Blue http://blog.csdn.net/huilan_same/article/details/75413482

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.