CN110245090A - A kind of interface test method - Google Patents

A kind of interface test method Download PDF

Info

Publication number
CN110245090A
CN110245090A CN201910547313.1A CN201910547313A CN110245090A CN 110245090 A CN110245090 A CN 110245090A CN 201910547313 A CN201910547313 A CN 201910547313A CN 110245090 A CN110245090 A CN 110245090A
Authority
CN
China
Prior art keywords
test
interface
test case
case
report
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.)
Pending
Application number
CN201910547313.1A
Other languages
Chinese (zh)
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.)
Beijing Shouqi Zhixing Technology Co Ltd
Original Assignee
Sichuan Shou Automobile Trading Automobile Sharing Technology 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 Sichuan Shou Automobile Trading Automobile Sharing Technology Co Ltd filed Critical Sichuan Shou Automobile Trading Automobile Sharing Technology Co Ltd
Priority to CN201910547313.1A priority Critical patent/CN110245090A/en
Publication of CN110245090A publication Critical patent/CN110245090A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

Interface test method disclosed by the invention, is related to technical field of data processing, passes through design timed task automatic trigger and completes interface testing work, reduce repeated work, time and human cost are reduced, test case and test data are isolated, realize more flexible test effect.

Description

A kind of interface test method
Technical field
The invention belongs to software testing technology fields, and in particular to a kind of interface test method.
Background technique
Interface testing is mainly realized by using testing tool such as postman, jmeter etc. in the industry, is not considered to interface Test fully achieves automation and since interface testing tool flexibility ratio is not high, cannot achieve test business and data separating, Manual initialization data is easy error before test, generates a large amount of hashes after the completion of test, leads to that flexibility is not strong, repeats work Work amount is big, and time and human cost are higher.
Summary of the invention
In view of the defects existing in the prior art, the embodiment of the invention provides a kind of interface test method, this method includes Following steps:
One or more interface documents are periodically obtained from specified directory or version management library;
One or more of interface documents are analyzed, based on the analysis results, it is corresponding to generate each interface document Test case generates test use cases;
Concentrate content, parsing environment, account and the executive mode creation of each test case corresponding according to test case Test data generates test data set;
The test data set is traversed, for test data needed for the matching of each test case;
According to pre-set timed task, the test use cases are traversed, each test case is tested, are generated The corresponding test report of each test case.
Preferably, one or more of interface documents are analyzed, based on the analysis results, generates each interface document Corresponding test case, generating test use cases includes:
Each interface document is parsed using regular expression, obtains the corresponding parsing result of each interface document, Generate parsing result collection, wherein the parsing result includes the corresponding request address of each interface document, request type, request Head, interface description, required parameter list, request format and response parameter list;
Parsing result collection is analyzed using equivalence class classifying method and boundary analysis;
According to division result, the corresponding test case of each interface document is created.
Preferably, after generating the corresponding test report of each test case, this method further include:
Test report and its corresponding log recording are packaged, compressed package is generated and send the compressed package by mail To project team member.
Preferably, the format of the test case is excel table.
Preferably, the method also includes:
The test report is shown by html webpage.
Interface test method provided in an embodiment of the present invention has the advantages that
(1) pass through design timed task automatic trigger and complete interface testing work, reduce repeated work, reduce the time And human cost.
(2) test case and test data are isolated, realize more flexible test effect.
Detailed description of the invention
Fig. 1 is interface test method flow diagram provided in an embodiment of the present invention.
Specific embodiment
Specific introduce is made to the present invention below in conjunction with the drawings and specific embodiments.
As shown in Figure 1, interface test method provided in an embodiment of the present invention the following steps are included:
S101 periodically obtains one or more interface documents from specified directory or version management library;
S102 analyzes one or more interface documents, based on the analysis results, it is corresponding to generate each interface document Test case generates test use cases;
S103 concentrates content, parsing environment, account and the executive mode of each test case to create phase according to test case The test data answered generates test data set;
S104 traverses test data set, for test data needed for the matching of each test case;
S105 traverses test use cases, tests each test case according to pre-set timed task, raw At the corresponding test report of each test case.
Optionally, one or more interface documents are analyzed, based on the analysis results, it is corresponding generates each interface document Test case, generate test use cases include:
Each interface document is parsed using regular expression, obtains the corresponding parsing result of each interface document, Generate parsing result collection, wherein parsing result includes the corresponding request address of each interface document, request type, request header, connects Mouth description, required parameter list, request format and response parameter list;
Parsing result collection is analyzed using equivalence class classifying method and boundary analysis;
According to the division result, the corresponding test case of each interface document is created.
Optionally, after generating the corresponding test report of each test case, the method also includes:
Test report and its corresponding log recording are packaged, compressed package is generated and are sent to the compressed package by mail Project team member.
Optionally, the format of test case is excel table.
Optionally, this method further include:
Test report is shown by html webpage.
Interface test method provided in an embodiment of the present invention by design timed task automatic trigger and completes interface testing Work reduces repeated work, reduces time and human cost, and test case and test data are isolated, realized more flexible Test effect.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, reference can be made to the related descriptions of other embodiments.
It is understood that the correlated characteristic in the above method and device can be referred to mutually.The technology people of fields Member can be understood that, for convenience and simplicity of description, the specific works mistake of the system, apparatus, and unit of foregoing description Journey can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
Algorithm and display are not inherently related to any particular computer, virtual system, or other device provided herein. Various general-purpose systems can also be used together with teachings based herein.As described above, it constructs required by this kind of system Structure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use various Programming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this hair Bright preferred forms.
In addition, memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM), memory includes extremely A few storage chip.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/ Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable Jie The example of matter.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including element There is also other identical elements in process, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product. Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The above is only embodiments herein, are not intended to limit this application.To those skilled in the art, Various changes and changes are possible in this application.It is all within the spirit and principles of the present application made by any modification, equivalent replacement, Improve etc., it should be included within the scope of the claims of this application.
It should be noted that the above embodiments do not limit the invention in any form, it is all to use equivalent replacement or equivalent change The mode changed technical solution obtained, falls within the scope of protection of the present invention.

Claims (5)

1. a kind of interface test method characterized by comprising
One or more interface documents are periodically obtained from specified directory or version management library;
One or more of interface documents are analyzed, based on the analysis results, generate the corresponding test of each interface document Use-case generates test use cases;
Content, parsing environment, account and the corresponding test of executive mode creation of each test case are concentrated according to test case Data generate test data set;
The test data set is traversed, for test data needed for the matching of each test case;
According to pre-set timed task, the test use cases are traversed, each test case is tested, are generated each The corresponding test report of test case.
2. interface test method according to claim 1, which is characterized in that carried out to one or more of interface documents Analysis generates the corresponding test case of each interface document based on the analysis results, generates test use cases and includes:
Each interface document is parsed using regular expression, obtains the corresponding parsing result of each interface document, is generated Parsing result collection, wherein the parsing result includes the corresponding request address of each interface document, request type, request header, connects Mouth description, required parameter list, request format and response parameter list;
Parsing result collection is analyzed using equivalence class classifying method and boundary analysis;
According to the division result, the corresponding test case of each interface document is created.
3. interface test method according to claim 1, which is characterized in that generating the corresponding test of each test case After report, the method also includes:
The test report and its corresponding log recording are packaged, compressed package is generated and send the compressed package by mail To project team member.
4. interface test method according to claim 1, which is characterized in that the format of the test case is excel table Lattice.
5. interface test method according to claim 1, which is characterized in that the method also includes:
The test report is shown by html webpage.
CN201910547313.1A 2019-06-24 2019-06-24 A kind of interface test method Pending CN110245090A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910547313.1A CN110245090A (en) 2019-06-24 2019-06-24 A kind of interface test method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910547313.1A CN110245090A (en) 2019-06-24 2019-06-24 A kind of interface test method

Publications (1)

Publication Number Publication Date
CN110245090A true CN110245090A (en) 2019-09-17

Family

ID=67889015

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910547313.1A Pending CN110245090A (en) 2019-06-24 2019-06-24 A kind of interface test method

Country Status (1)

Country Link
CN (1) CN110245090A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328503A (en) * 2020-11-30 2021-02-05 武汉空心科技有限公司 Task acceptance method for software development working platform
CN113064810A (en) * 2020-01-02 2021-07-02 北京京东尚科信息技术有限公司 Automatic testing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170052884A1 (en) * 2015-08-20 2017-02-23 Ca, Inc. Generic test automation for restful web services applications
CN108268379A (en) * 2018-02-02 2018-07-10 方欣科技有限公司 A kind of distributed automatization test method and device
CN108984400A (en) * 2018-07-03 2018-12-11 中国电子科技集团公司第十四研究所 Automation interface test method based on warnlng surveillance system
CN109614324A (en) * 2018-12-03 2019-04-12 北京云测网络科技有限公司 A kind of method for generating test case and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170052884A1 (en) * 2015-08-20 2017-02-23 Ca, Inc. Generic test automation for restful web services applications
CN108268379A (en) * 2018-02-02 2018-07-10 方欣科技有限公司 A kind of distributed automatization test method and device
CN108984400A (en) * 2018-07-03 2018-12-11 中国电子科技集团公司第十四研究所 Automation interface test method based on warnlng surveillance system
CN109614324A (en) * 2018-12-03 2019-04-12 北京云测网络科技有限公司 A kind of method for generating test case and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
蒋灵仙: "基于Testng的Web接口测试的自动化框架设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113064810A (en) * 2020-01-02 2021-07-02 北京京东尚科信息技术有限公司 Automatic testing method and device
CN112328503A (en) * 2020-11-30 2021-02-05 武汉空心科技有限公司 Task acceptance method for software development working platform

Similar Documents

Publication Publication Date Title
CN109889375A (en) Service message method of calibration, device and computer storage medium
CN110399352B (en) Method, device, equipment and storage medium for processing SVN log file
CN105808227B (en) A kind of fine arts resource file detection method and device
US20110307502A1 (en) Extensible event-driven log analysis framework
CN108984652A (en) A kind of configurable data cleaning system and method
CN104657274B (en) software interface test method and device
CN110895544B (en) Interface data processing method, device, system and storage medium
CN108595187A (en) Method, device and the storage medium of Android installation kit integrated software development kit
CN108984155A (en) Flow chart of data processing setting method and device
CN110245090A (en) A kind of interface test method
CN109582948A (en) The method and device that evaluated views extract
CN110457182A (en) A kind of load balancing cluster example operating index monitoring system
US11023420B1 (en) Real-time compression of log data
CN108062276A (en) The generation method and device of test case and the generation method and device of test report
CN109412604A (en) A kind of data compression method based on language model
CN109194483A (en) Data verification method based on block chain
US9336247B2 (en) Control data driven modifications and generation of new schema during runtime operations
CN109508791A (en) Vehicle damage management method
CN110187967A (en) A kind of memory prediction method and device suitable for dependency analysis tool
CN110532248A (en) A kind of server application acquisition of information and method of adjustment based on CMDB
CN110554867B (en) Application processing method and device
US20130111432A1 (en) Validation of a system model including an activity diagram
CN109086362A (en) The management method of multimode project
US10509659B1 (en) Input processing logic to produce outputs for downstream systems using configurations
CN110362316A (en) A kind of Source code management method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20191104

Address after: 100026 2 Zai Ying Road 3, Chaoyang District, Beijing 6009

Applicant after: BEIJING SHOUQI ZHIXING TECHNOLOGY Co.,Ltd.

Address before: 610000 No. 303, Unit 1, Unit 3, Building 163 Sanse Road, Jinjiang District, Chengdu City, Sichuan Province

Applicant before: Sichuan Shou Automobile Trading Automobile Sharing Technology Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190917