CN104572469A - Automatic interface testing method and system based on simulative http requests - Google Patents

Automatic interface testing method and system based on simulative http requests Download PDF

Info

Publication number
CN104572469A
CN104572469A CN201510036707.2A CN201510036707A CN104572469A CN 104572469 A CN104572469 A CN 104572469A CN 201510036707 A CN201510036707 A CN 201510036707A CN 104572469 A CN104572469 A CN 104572469A
Authority
CN
China
Prior art keywords
test
interface
center
http request
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510036707.2A
Other languages
Chinese (zh)
Other versions
CN104572469B (en
Inventor
余敬龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
GUANGDONG NENGLONG EDUCATION Co Ltd
Original Assignee
GUANGDONG NENGLONG EDUCATION Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by GUANGDONG NENGLONG EDUCATION Co Ltd filed Critical GUANGDONG NENGLONG EDUCATION Co Ltd
Priority to CN201510036707.2A priority Critical patent/CN104572469B/en
Publication of CN104572469A publication Critical patent/CN104572469A/en
Application granted granted Critical
Publication of CN104572469B publication Critical patent/CN104572469B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses an automatic interface testing method and system based on simulative http requests. The automatic interface testing system comprises a request center, an interface agency center and a verifying center. The request center requests for testing of certain interface to the interface agency center, the interface agency center transmits parameter definition and response data format of the interface to the request center, the request center matches the parameter definition and requests for http simulation of the appointed interface according to user-input rules, and the verifying center verifies formats and content of the response data. Users only need to set rules and input a few data, then accuracy and extensibility of the http interface can be automatically verified, and interface testing efficiency is greatly improved.

Description

a kind of automatic interface testing method based on simulation http request and system
Technical field
The invention belongs to mobile technology field, be specifically related to a kind of automatic interface testing method based on simulation http request and system.
Background technology
Testing process is generally divided into 5 steps: formulate test plan, test case preparation, test execution, submission defect, testing evaluation report.
Wherein, test case the behavioral activity of software test is done a scientific tissue to conclude, and object the behavior of software test can be changed into manageable pattern; Test case is also that different classes of software, test case is different by one of concrete for test method quantized simultaneously.
In the test execution stage, the object in this stage is perfectly clear, and finds defect exactly, supervises everybody to find out defect exactly.The execution of test case should be help us to find defect quickly.In theory, if defect has all been found out, quality is also just guaranteed.So at this one-phase, at all hazards, defect to be found exactly, so not only also highly beneficial to development teams, most of defect can be revised as soon as possible; Favourable to test, testing efficiency is high, and regression test below also can be stablized, and confidence is more abundant.
The test case of existing test prepares, measuring executing process, need the ability of tester high, the ability of the ability of building of the ability of being familiar with of code, the use ability of interface testing framework, interface testing environment, interface testing design, the ability of writing of foundation code, basis look for defect ability etc., thus exist to tester require high, take time and effort, the problem such as testing efficiency is low, test code coverage rate is low.
Summary of the invention
Write to overcome the robotization of test case in interface testing, robotization request server, and reduce the technical matters such as workload of result verification, the object of the present invention is to provide a kind of automatic interface testing method based on simulation http request and system.
The technical solution used in the present invention is:
Based on an automatic interface testing method for simulation http request, comprise the following steps:
A) the user's input rule needed for setting test;
B) user's input is for the test data of target interface;
C) test request of target interface is submitted to;
D) according to parameter definition and the response data format of configuration file reflectance target interface;
E) utilize user's input rule by described test data, parameter definition and the automatic generating test use case of response data format;
F) concurrent of described Test cases technology is utilized to simulate http request;
G) verification test cases feedback test result.
Further, in described step e, test case builds test case dictionary after repeatedly testing, and directly searches test case after submitting the test request of target interface to for step C when testing next time.
Further, described step G verifies for the content of test case and form respectively, and content and form meet the requirements simultaneously, return the test result that interface is correct.
Wherein, contrast answer when verifying in described step G presets.
The present invention also comprises the technical scheme with the same design of above-mentioned reading method, i.e. a kind of interface automatization test system based on simulation http request, comprising:
Please centering, for receiving the test data for target interface of user's input, submit to the test request of target interface to interface proxy center, and utilize user's input rule by the definition of the parameter of described test data, interface proxy foveal reflex and the automatic generating test use case of response data format, utilize concurrent of described Test cases technology to simulate http request to verification center;
Interface proxy center, defines and response data format for the parameter according to configuration file reflectance target interface;
Verification center, for verification test cases and feedback test result.
Further, the test case at described request center builds test case dictionary after repeatedly testing, for test next time submit to target interface test request after directly search test case.
Further, described verification center is verified for the content of test case and form respectively, and content and form meet the requirements simultaneously, return the test result that interface is correct.
Wherein, contrast answer during described verification central authentication presets.
The invention has the beneficial effects as follows:
The present invention's robotization of test case in interface testing is write, and robotization request server reduces the test job amount of tester 80%, and realize high coverage rate, high-level efficiency completes test job.
Accompanying drawing explanation
Below in conjunction with accompanying drawing, the specific embodiment of the present invention is described further.
Fig. 1 is the process flow diagram of the automatic interface testing method that the present invention is based on simulation http request;
Fig. 2 is the theory diagram of the interface automatization test system that the present invention is based on simulation http request.
Embodiment
Shown in figure 1, be a kind of automatic interface testing method based on simulation http request of the present invention, comprise the following steps:
A) the user's input rule needed for setting test;
B) user's input is for the test data of target interface;
C) test request of target interface is submitted to;
D) according to parameter definition and the response data format of configuration file reflectance target interface;
E) utilize user's input rule by described test data, parameter definition and the automatic generating test use case of response data format;
F) concurrent of described Test cases technology is utilized to simulate http request;
G) verification test cases feedback test result; This step is verified for the content of test case and form respectively, and contrast answer during checking presets, and content and form meet the requirements simultaneously, returns the test result that interface is correct.
As the optimization of this programme, in described step e, test case builds test case dictionary after repeatedly testing, and directly searches test case after submitting the test request of target interface to for step C when testing next time.
As shown in Figure 2, the present invention also comprises the technical scheme with the same design of above-mentioned reading method, i.e. a kind of interface automatization test system based on simulation http request, comprising:
Request center 10, for receiving the test data for target interface of user's input, submit to the test request of target interface to interface proxy center 20, and the parameter utilizing user's input rule to be reflected in described test data, interface proxy center 20 defines and the automatic generating test use case of response data format, concurrent of described Test cases technology is utilized to simulate http request to verification center 30;
Interface proxy center 20, defines and response data format for the parameter according to configuration file reflectance target interface;
Verification center 30, for verification test cases and feedback test result; Concrete, verification center 30 is verified with form for the content of test case respectively, and contrast answer and preset, content and form meet the requirements simultaneously, return the test result that interface is correct.。
In addition, the test case at request center 10 builds test case dictionary after repeatedly testing, for test next time submit to target interface test request after directly search test case.
The foregoing is only preferred embodiments of the present invention, the present invention is not limited to above-mentioned embodiment, as long as the technical scheme realizing the object of the invention with basic same approach all belongs within protection scope of the present invention.

Claims (8)

1., based on an automatic interface testing method for simulation http request, it is characterized in that: comprise the following steps
A) the user's input rule needed for setting test;
B) user's input is for the test data of target interface;
C) test request of target interface is submitted to;
D) according to parameter definition and the response data format of configuration file reflectance target interface;
E) utilize user's input rule by described test data, parameter definition and the automatic generating test use case of response data format;
F) concurrent of described Test cases technology is utilized to simulate http request;
G) verification test cases feedback test result.
2. a kind of automatic interface testing method based on simulation http request according to claim 1, it is characterized in that: in described step e, test case builds test case dictionary after repeatedly testing, submit the test request of target interface to for step C when testing next time after, directly search test case.
3. a kind of automatic interface testing method based on simulation http request according to claim 1, it is characterized in that: described step G verifies for the content of test case and form respectively, and content and form meet the requirements simultaneously, return the test result that interface is correct.
4. a kind of automatic interface testing method based on simulation http request according to claim 3, is characterized in that: contrast answer when verifying in described step G presets.
5., based on an interface automatization test system for simulation http request, it is characterized in that: comprise
Please centering (10), for receiving the test data for target interface of user's input, submit to the test request of target interface to interface proxy center (20), and the parameter utilizing user's input rule to be reflected in described test data, interface proxy center (20) defines and the automatic generating test use case of response data format, concurrent of described Test cases technology is utilized to simulate http request to verification center (30);
Interface proxy center (20), defines and response data format for the parameter according to configuration file reflectance target interface;
Verification center (30), for verification test cases and feedback test result.
6. a kind of interface automatization test system based on simulation http request according to claim 5, it is characterized in that: the test case of described request center (10) builds test case dictionary after repeatedly testing, for test next time submit to target interface test request after directly search test case.
7. a kind of interface automatization test system based on simulation http request according to claim 5, it is characterized in that: described verification center (30) is verified for the content of test case and form respectively, and content and form meet the requirements simultaneously, return the test result that interface is correct.
8. a kind of interface automatization test system based on simulation http request according to claim 5, is characterized in that: contrast answer during described verification center (30) checking presets.
CN201510036707.2A 2015-01-23 2015-01-23 A kind of automatic interface testing method and system based on simulation http request Active CN104572469B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510036707.2A CN104572469B (en) 2015-01-23 2015-01-23 A kind of automatic interface testing method and system based on simulation http request

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510036707.2A CN104572469B (en) 2015-01-23 2015-01-23 A kind of automatic interface testing method and system based on simulation http request

Publications (2)

Publication Number Publication Date
CN104572469A true CN104572469A (en) 2015-04-29
CN104572469B CN104572469B (en) 2017-12-05

Family

ID=53088601

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510036707.2A Active CN104572469B (en) 2015-01-23 2015-01-23 A kind of automatic interface testing method and system based on simulation http request

Country Status (1)

Country Link
CN (1) CN104572469B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105099811A (en) * 2015-06-03 2015-11-25 北京金山安全软件有限公司 Interface testing method and device
CN106021118A (en) * 2016-06-20 2016-10-12 深圳充电网科技有限公司 Test code generation method and device and test framework code execution method and device
CN106874176A (en) * 2015-12-14 2017-06-20 阿里巴巴集团控股有限公司 Intelligent test method and device
CN107749808A (en) * 2017-10-30 2018-03-02 北京车万家科技有限公司 Simulate implementation method, the apparatus and system of request
CN108183962A (en) * 2018-01-04 2018-06-19 上海瀚之友信息技术服务有限公司 A kind of simulated testing system
CN108228457A (en) * 2017-12-29 2018-06-29 广州品唯软件有限公司 The test agent method and device of mobile terminal, computer readable storage medium
WO2018120722A1 (en) * 2016-12-30 2018-07-05 上海壹账通金融科技有限公司 Asynchronous interface testing method, terminal, device, system, and storage medium
CN108512710A (en) * 2017-02-24 2018-09-07 腾讯科技(深圳)有限公司 Test method based on testing tool and testing tool
CN108600034A (en) * 2018-05-28 2018-09-28 腾讯科技(深圳)有限公司 Traffic pressure management method, device, equipment, system and storage medium
CN111651342A (en) * 2019-03-04 2020-09-11 复旦大学 HTTP interface automation testing framework based on Charles recording session
CN112650689A (en) * 2020-12-31 2021-04-13 五八有限公司 Test method, test device, electronic equipment and storage medium
CN113656268A (en) * 2021-07-30 2021-11-16 北京百度网讯科技有限公司 Performance test method and device of business service, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101576843A (en) * 2008-05-07 2009-11-11 阿里巴巴集团控股有限公司 Method and device for testing application program interface
CN102932205A (en) * 2012-11-19 2013-02-13 深圳市亚特尔科技有限公司 Automatic test method and test platform of network server-side interface
CN103136095A (en) * 2011-11-28 2013-06-05 阿里巴巴集团控股有限公司 Method, device and system of test application program interface

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101576843A (en) * 2008-05-07 2009-11-11 阿里巴巴集团控股有限公司 Method and device for testing application program interface
CN103136095A (en) * 2011-11-28 2013-06-05 阿里巴巴集团控股有限公司 Method, device and system of test application program interface
CN102932205A (en) * 2012-11-19 2013-02-13 深圳市亚特尔科技有限公司 Automatic test method and test platform of network server-side interface

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105099811B (en) * 2015-06-03 2019-01-22 北京金山安全软件有限公司 Interface testing method and device
CN105099811A (en) * 2015-06-03 2015-11-25 北京金山安全软件有限公司 Interface testing method and device
CN106874176B (en) * 2015-12-14 2021-04-27 创新先进技术有限公司 Intelligent test method and device
CN106874176A (en) * 2015-12-14 2017-06-20 阿里巴巴集团控股有限公司 Intelligent test method and device
CN106021118B (en) * 2016-06-20 2018-09-25 深圳充电网科技有限公司 Test code generating method and device, test frame code execution method and device
CN106021118A (en) * 2016-06-20 2016-10-12 深圳充电网科技有限公司 Test code generation method and device and test framework code execution method and device
WO2018120722A1 (en) * 2016-12-30 2018-07-05 上海壹账通金融科技有限公司 Asynchronous interface testing method, terminal, device, system, and storage medium
CN108512710A (en) * 2017-02-24 2018-09-07 腾讯科技(深圳)有限公司 Test method based on testing tool and testing tool
CN108512710B (en) * 2017-02-24 2022-05-24 腾讯科技(深圳)有限公司 Test method based on test tool and test tool
CN107749808A (en) * 2017-10-30 2018-03-02 北京车万家科技有限公司 Simulate implementation method, the apparatus and system of request
CN108228457A (en) * 2017-12-29 2018-06-29 广州品唯软件有限公司 The test agent method and device of mobile terminal, computer readable storage medium
CN108228457B (en) * 2017-12-29 2021-04-20 广州品唯软件有限公司 Test agent method and device of mobile terminal and computer readable storage medium
CN108183962A (en) * 2018-01-04 2018-06-19 上海瀚之友信息技术服务有限公司 A kind of simulated testing system
CN108183962B (en) * 2018-01-04 2021-05-25 上海瀚之友信息技术服务有限公司 Simulation test system
CN108600034A (en) * 2018-05-28 2018-09-28 腾讯科技(深圳)有限公司 Traffic pressure management method, device, equipment, system and storage medium
CN108600034B (en) * 2018-05-28 2020-07-03 腾讯科技(深圳)有限公司 Service pressure management method, device, equipment, system and storage medium
CN111651342A (en) * 2019-03-04 2020-09-11 复旦大学 HTTP interface automation testing framework based on Charles recording session
CN112650689A (en) * 2020-12-31 2021-04-13 五八有限公司 Test method, test device, electronic equipment and storage medium
CN113656268A (en) * 2021-07-30 2021-11-16 北京百度网讯科技有限公司 Performance test method and device of business service, electronic equipment and storage medium
CN113656268B (en) * 2021-07-30 2024-02-06 北京百度网讯科技有限公司 Performance test method and device for business service, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN104572469B (en) 2017-12-05

Similar Documents

Publication Publication Date Title
CN104572469A (en) Automatic interface testing method and system based on simulative http requests
US10318412B1 (en) Systems, methods, and apparatus for dynamic software generation and testing
US9934129B1 (en) Determining application test results using screenshot metadata
CN108959068B (en) Software interface testing method, device and storage medium
WO2017181591A1 (en) Testing method and system
US20190034318A1 (en) Hardware-Software Co-Verification for Debugging Firmware on a Hardware Simulator
CN111859832B (en) Chip simulation verification method and device and related equipment
US8898522B2 (en) Automated operating system test framework
US20190324768A1 (en) Generating an execution script for configuration of a system
CN103268289A (en) Method and system for transcribing and applying test script on mobile terminal
TWI837026B (en) Verification system, verification method, electronic device and storage medium
CN111597114A (en) Method, device and equipment for verifying small program and storage medium
CN109558316A (en) A kind of HTTP interface mobilism parameter test method of Test Strategy automatic configuration
US20130013283A1 (en) Distributed multi-pass microarchitecture simulation
KR20230088252A (en) Method and apparatus for generating and applying deep learning model based on deep learning framework
EP2992419A1 (en) Program testing service
US20150160955A1 (en) Dynamically modifiable component model
CN109191078A (en) A kind of traffic flow modeling method, device and equipment
CN105005572A (en) Database mapping method and device
CN112860587B (en) UI automatic test method and device
CN105320510A (en) Method and device for automatically tracking data relation
CN117933306A (en) Training method, device, equipment and storage medium based on travel field large model
CN103279408A (en) RAID (redundant array of inexpensive disk) performance testing method
CN106773785B (en) Method for realizing nuclear safety level intelligent simulation verification platform based on FPGA technology
US10055516B1 (en) Testing open mobile alliance server payload on an open mobile alliance client simulator

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Automatic interface testing method and system based on simulative http requests

Effective date of registration: 20200708

Granted publication date: 20171205

Pledgee: China Everbright Bank Zhongshan branch

Pledgor: GUANGDONG NENGLONG EDUCATION Co.,Ltd.

Registration number: Y2020980003904

PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20210817

Granted publication date: 20171205

Pledgee: China Everbright Bank Zhongshan branch

Pledgor: GUANGDONG NENGLONG EDUCATION Co.,Ltd.

Registration number: Y2020980003904