CN104572469B - A kind of automatic interface testing method and system based on simulation http request - Google Patents

A kind of automatic interface testing method and system based on simulation http request Download PDF

Info

Publication number
CN104572469B
CN104572469B CN201510036707.2A CN201510036707A CN104572469B CN 104572469 B CN104572469 B CN 104572469B CN 201510036707 A CN201510036707 A CN 201510036707A CN 104572469 B CN104572469 B CN 104572469B
Authority
CN
China
Prior art keywords
test
interface
center
http request
verification
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.)
Active
Application number
CN201510036707.2A
Other languages
Chinese (zh)
Other versions
CN104572469A (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 a kind of automatic interface testing method and system based on simulation http request, including asking centering, interface proxy center and verification center, request center is tested some interface to interface proxy center requests, the parameter definition and response data format of Acting Center's reflective interface are asked centering, request center is according to user's input rule, match parameter defines and carries out http request simulation to specified interface, enters row format and content verification to reply data by verification center.The present invention only needs user to set rule, inputs low volume data, it is possible to realizes correctness, extension of automation verification http interfaces etc., greatly improves the efficiency of interface testing.

Description

A kind of automatic interface testing method and system based on simulation http request
Technical field
The invention belongs to mobile technology field, and in particular to a kind of interface automatic test side based on simulation http request Method and system.
Background technology
Testing process is generally divided into 5 steps:Formulate test plan, test case preparations, test execution, submission defect, Test assessment report.
Wherein, test case is that the behavioral activity of software test is done into a scientific tissue to conclude, it is therefore an objective to can The behavior of software test is changed into manageable pattern;Test case is also one of method for specifically quantifying test simultaneously, Different classes of software, test case are different.
Test execution stage, the purpose in this stage are perfectly clear, and exactly find defect, supervise everybody be exactly find out it is scarce Fall into.The execution of test case, it should be to aid in us and quickly find defect.In theory, if defect is all found out, Quality is also just guaranteed.So in this stage, defect is exactly found, so not only to development teams at all hazards It is highly beneficial, most of defect can be corrected as soon as possible;Favourable to testing, testing efficiency is high, and regression test below can also stablize, Confidence is more abundant.
The test case of existing test prepares, measuring executing process is, it is necessary to which the ability height of tester, code are familiar with energy Power, interface testing framework using ability, interface testing environment build ability, interface testing design ability, foundation code Write ability, defect ability etc. is looked on basis, thus exist and high required to tester, take time and effort, testing efficiency is low, test The problems such as code coverage is low.
The content of the invention
In order to overcome the automation of test case in interface testing to write, request server is automated, and reduce result The technical problems such as the workload of checking, it is an object of the invention to provide a kind of interface automation based on simulation http request Method of testing and system.
The technical solution adopted by the present invention is:
A kind of automatic interface testing method based on simulation http request, comprises the following steps:
A)User's input rule needed for setting test;
B)Test data of user's input pin to target interface;
C)Submit the test request of target interface;
D)According to the parameter definition and response data format of configuration file reflectance target interface;
E)The test data, parameter definition and response data format are automatically generated into test using user's input rule to use Example;
F)Simulation http request is concurrently played using the Test cases technology;
G)Verification test cases and feedback test result.
Further, test case builds test case dictionary after multiple test in the step E, for testing next time When step C submit after the test request of target interface directly lookup test case.
Further, the step G is verified that content accords with simultaneously with form with form for the content of test case respectively Close and require then to return to the correct test result of interface.
Wherein, contrast answer when being verified in the step G is preset.
It is present invention additionally comprises the technical scheme with above-mentioned reading method same design, i.e., a kind of based on simulation http request Interface automatization test system, including:
Please centering, for receive user input the test data for target interface, submit the test of target interface Ask to give interface proxy center, and utilize user's input rule by the test data, the parameter of interface proxy foveal reflex Definition automatically generates test case with response data format, and simulation http request is concurrently played using the Test cases technology to school Test center;
Interface proxy center, for the parameter definition and response data format according to configuration file reflectance target interface;
Verification center, for verification test cases and feedback test result.
Further, the test case for asking centering builds test case dictionary after multiple test, for next time Test directly searches test case after submitting the test request of target interface.
Further, the verification center is verified that content is same with form with form for the content of test case respectively When meet the requirements then return the correct test result of interface.
Wherein, the contrast answer during verification central authentication is preset.
The beneficial effects of the invention are as follows:
Present invention automation of test case in interface testing is write, and automation request server reduces tester 80% test job amount, and realize that high coverage rate, high efficiency complete test job.
Brief description of the drawings
The embodiment of the present invention is described further below in conjunction with the accompanying drawings.
Fig. 1 is the flow chart of automatic interface testing method of the present invention based on simulation http request;
Fig. 2 is the theory diagram of interface automatization test system of the present invention based on simulation http request.
Embodiment
It is a kind of automatic interface testing method based on simulation http request of the present invention with reference to shown in figure 1, including with Lower step:
A)User's input rule needed for setting test;
B)Test data of user's input pin to target interface;
C)Submit the test request of target interface;
D)According to the parameter definition and response data format of configuration file reflectance target interface;
E)The test data, parameter definition and response data format are automatically generated into test using user's input rule to use Example;
F)Simulation http request is concurrently played using the Test cases technology;
G)Verification test cases and feedback test result;This step is tested for the content of test case with form respectively Card, contrast answer during checking are preset, and content meets the requirements simultaneously with form then returns to the correct test result of interface.
As the optimization of this programme, test case builds test case dictionary after multiple test in the step E, for Step C directly searches test case after submitting the test request of target interface when testing next time.
As shown in Fig. 2 present invention additionally comprises the technical scheme with above-mentioned reading method same design, i.e., it is a kind of based on simulation The interface automatization test system of http request, including:
Request center 10, for receiving the test data for target interface of user's input, submit the survey of target interface Examination request is reflected the test data, interface proxy center 20 to interface proxy center 20, and using user's input rule Parameter definition and response data format automatically generate test case, simulation http is concurrently played using the Test cases technology please Ask to verification center 30;
Interface proxy center 20, for the parameter definition and response data format according to configuration file reflectance target interface;
Verification center 30, for verification test cases and feedback test result;Specifically, verification center 30 is respectively for surveying The content of example on probation is verified that contrast answer is preset with form, and content meets the requirements simultaneously with form, returns to interface Correct test result..
In addition, the test case at request center 10 builds test case dictionary after multiple test, for testing next time Test case is directly searched after submitting the test request of target interface.
The preferred embodiments of the present invention are the foregoing is only, the present invention is not limited to above-mentioned embodiment, as long as with Essentially identical means realize that the technical scheme of the object of the invention is belonged within protection scope of the present invention.

Claims (8)

  1. A kind of 1. automatic interface testing method based on simulation http request, it is characterised in that:Comprise the following steps
    A)User's input rule needed for setting test;
    B)Test data of user's input pin to target interface;
    C)Submit the test request of target interface;
    D)According to the parameter definition and response data format of configuration file reflectance target interface;
    E)The test data, parameter definition and response data format are automatically generated into test case using user's input rule;
    F)Simulation http request is concurrently played using the Test cases technology;
    G)Verification test cases and feedback test result.
  2. A kind of 2. automatic interface testing method based on simulation http request according to claim 1, it is characterised in that: Test case builds test case dictionary after multiple test in the step E, and step C submits target during for testing next time Test case is directly searched after the test request of interface.
  3. A kind of 3. automatic interface testing method based on simulation http request according to claim 1, it is characterised in that: The step G is verified that content meets the requirements simultaneously with form, and return connects for the content of test case with form respectively The correct test result of mouth.
  4. A kind of 4. automatic interface testing method based on simulation http request according to claim 3, it is characterised in that: Contrast answer when being verified in the step G is preset.
  5. A kind of 5. interface automatization test system based on simulation http request, it is characterised in that:Including
    Please centering(10), for receiving the test data for target interface of user's input, submit the test of target interface Ask to give interface proxy center(20), and user's input rule is utilized by the test data, interface proxy center(20)Instead The parameter definition penetrated automatically generates test case with response data format, and simulation http is concurrently played using the Test cases technology Request extremely verification center(30);
    Interface proxy center(20), for the parameter definition and response data format according to configuration file reflectance target interface;
    Verification center(30), for verification test cases and feedback test result.
  6. A kind of 6. interface automatization test system based on simulation http request according to claim 5, it is characterised in that: It is described to ask centering(10)Test case build test case dictionary after multiple test, for testing submission target next time Test case is directly searched after the test request of interface.
  7. A kind of 7. interface automatization test system based on simulation http request according to claim 5, it is characterised in that: The verification center(30)Verified respectively for the content of test case with form, content meets the requirements then simultaneously with form Return to the correct test result of interface.
  8. A kind of 8. interface automatization test system based on simulation http request according to claim 5, it is characterised in that: The verification center(30)Contrast answer during checking is preset.
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 CN104572469A (en) 2015-04-29
CN104572469B true 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)

Families Citing this family (12)

* 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
CN106874176B (en) * 2015-12-14 2021-04-27 创新先进技术有限公司 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
CN107070735B (en) * 2016-12-30 2018-04-20 上海壹账通金融科技有限公司 Method, test terminal and the system of asynchronous interface test
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
CN108228457B (en) * 2017-12-29 2021-04-20 广州品唯软件有限公司 Test agent method and device of mobile terminal and computer readable storage medium
CN108183962B (en) * 2018-01-04 2021-05-25 上海瀚之友信息技术服务有限公司 Simulation test system
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
CN113656268B (en) * 2021-07-30 2024-02-06 北京百度网讯科技有限公司 Performance test method and device for 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

Also Published As

Publication number Publication date
CN104572469A (en) 2015-04-29

Similar Documents

Publication Publication Date Title
CN104572469B (en) A kind of automatic interface testing method and system based on simulation http request
US10642721B2 (en) Generation of automated testing scripts by converting manual test cases
CN107861871B (en) Gray scale publishing method, device, server and storage medium
CN106155906B (en) A kind of bank's host close beta system and method
CN105099811A (en) Interface testing method and device
CN106933745A (en) WEB automatic interface testing methods and system
CN104572122A (en) Software application data generating device and method
CN111859832B (en) Chip simulation verification method and device and related equipment
CN112783793B (en) Automatic interface test system and method
CN101996117A (en) Computer test system and method thereof
CN109684150B (en) Performance test system, test method and simulation platform of storage particle controller
US9098622B2 (en) System and method for automated and objective assessment of programming language code
CN111917603A (en) Client test method and device, computer equipment and storage medium
CN106354629A (en) Construction method of iOS system mobile application automatic test system based on multiple stages of servers
CN111104155A (en) Database script management platform and method, electronic equipment and storage medium
JP2023086678A (en) Method and apparatus for generating and applying deep learning model based on deep learning framework
CN109885390B (en) Molecular docking cloud computing flow control method
CN109582578A (en) System, method, computer-readable medium and the electronic equipment of software test case
US20130086126A1 (en) Testing sql query writing skills
CN112800063A (en) Automatic label passing method and device based on data structure
CN110717315B (en) System data batch modification method and device, storage medium and electronic equipment
CN116431522A (en) Automatic test method and system for low-code object storage gateway
CN110337118A (en) Customer complaint immediate processing method and device
CN115934559A (en) Testing method of intelligent form testing system
CN115576711A (en) Method and system for simulating returned data and computing equipment

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

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

PE01 Entry into force 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

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