Automatic test method and system based on protocol interface

A technology of automated testing and protocol interface, applied in transmission systems, digital transmission systems, electrical components, etc., can solve problems such as inability to meet temporary changes, limited test integrity, and inflexibility, to meet the needs of rapid iterative upgrades and save manpower The effect of testing cost and improving test efficiency

Active Publication Date: 2016-06-15
ALIBABA (CHINA) CO LTD
View PDF5 Cites 35 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In the prior art, interface testing is mainly divided into the following two methods: one is manual testing, where various types of parameter values ​​and parameter combinations are input by manual operation. This method requires a lot of human resources, and the completeness of the test coverage is limited; The second is to use the form of a data warehouse to generate or copy a piece of online data in advance, and call the online data during testing. The disadvantage of this method is that generating data in advance is not flexible enough to meet the needs of temporary changes. Therefore, copying online data for testing may not fully cover all logic rules, nor can it guarantee the integrity of test data
[0004] There is no http interface testing technology that saves manpower and ensures data integrity in the prior art. Therefore, it is urgent to develop an automated testing method and system based on protocol interfaces, which can parameterize the interface according to manual testing requirements. After that, the test data can be generated according to the rules, and the interface automation test can be completed

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Automatic test method and system based on protocol interface
  • Automatic test method and system based on protocol interface
  • Automatic test method and system based on protocol interface

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0036] Example 1: image 3 It is the demand classification diagram of the interface test provided by the embodiment of the present invention. It can be seen from the figure that the flow of the interface test includes routine test, boundary test, abnormal test and fault test, etc., and each test unit includes many details. Classification: the routine test includes data source field verification, data source field value verification and test data preparation; the boundary test includes parameter boundary test and business boundary test; the abnormal test includes memory exhaustion test, insufficient disk space The test and the network connection are smooth but the service does not respond to the test; the failure test includes a Redis shutdown test and a mongoDB shutdown test.

[0037] The automated testing method based on the protocol interface provided by this embodiment can replace manual input of various types of test data for testing, figure 1 It is a schematic flow chart...

Embodiment 2

[0046] Embodiment 2: On the basis of S1 and S2 in Embodiment 1, this embodiment saves the test data design rules extracted from the interface design document, that is, the test data configuration rules, and waits until the next regression test, in the In the above regression test, the saved test data configuration rules are used to automatically generate test data for regression testing.

Embodiment 3

[0047] Embodiment 3: In this embodiment, it is possible to further classify the returned test results: if the execution of the test request fails, the test result is recorded in the log and analyzed; if the execution of the test request is successful, all The above test results are classified and counted, and the classified statistical results are generated into a report, specifically: when the execution of the test request fails, the http address of the service, the interface name, the http status code returned by the interface request, the content returned by the interface, and the error code Recorded as a log, wherein the error code can be defined in advance in the interface design document, for example, an error code of 1 means that the test data is blocked, an error code of 2 means that the test data is lost, and so on; when the execution of the test request is successful , classify statistics according to the returned error codes, and generate reports for system testers o...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to the field of test data, discloses an automatic test method based on a protocol interface. The automatic test method comprises the following steps: S1, receiving a test request, wherein the test request comprises an interface design document; S2, analyzing the interface design document, and extracting a service interface and a test data configuration rule thereof; S3, generating test data according to the test data configuration rule, and executing the test request; and S4, returning a test result. The invention further discloses an automatic test system based on the protocol interface. The automatic test method based on the protocol interface disclosed by the invention can be used for configuring the parameter of the interface according to manual test demand and generating the test data according to the rule to complete the automatic test work of the interface.

Description

technical field [0001] The invention relates to the field of data testing, in particular to an automatic testing method and system based on a protocol interface. Background technique [0002] The http interface test needs to be tested according to the test flow of routine test, boundary test, abnormal test and fault test. Each unit test of the test flow includes many sub-categories. Therefore, the http interface test work is multi-dimensional, which requires Testers do analysis before testing and prepare test data in advance to ensure more comprehensive coverage. [0003] In the prior art, interface testing is mainly divided into the following two methods: one is manual testing, where various types of parameter values ​​and parameter combinations are input by manual operation. This method requires a lot of human resources, and the completeness of the test coverage is limited; The second is to use the form of a data warehouse to generate or copy a piece of online data in adv...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): H04L12/26
CPCH04L43/50
Inventor 林起开范媛冯伟荆凤山
Owner ALIBABA (CHINA) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products