CN112181813A - Interface automation test method, system and computer readable storage medium - Google Patents

Interface automation test method, system and computer readable storage medium Download PDF

Info

Publication number
CN112181813A
CN112181813A CN202010978198.6A CN202010978198A CN112181813A CN 112181813 A CN112181813 A CN 112181813A CN 202010978198 A CN202010978198 A CN 202010978198A CN 112181813 A CN112181813 A CN 112181813A
Authority
CN
China
Prior art keywords
interface
test
request
web platform
automated
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
CN202010978198.6A
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.)
Dilu Technology Co Ltd
Original Assignee
Dilu 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 Dilu Technology Co Ltd filed Critical Dilu Technology Co Ltd
Priority to CN202010978198.6A priority Critical patent/CN112181813A/en
Publication of CN112181813A publication Critical patent/CN112181813A/en
Pending legal-status Critical Current

Links

Images

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/3688Test management for test execution, e.g. scheduling of test suites
    • 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/368Test management for test version control, e.g. updating test cases to a new software version
    • 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/3696Methods or tools to render software testable
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Abstract

The invention discloses an interface automatic test method, a system and a computer readable storage medium, wherein the test method comprises the following steps: maintaining an interface test case set to be tested; constructing a web platform for interacting with testers; and constructing a universal interface test tool and monitoring a certain port through the RPC service. The test system comprises a processor and a memory, wherein the memory stores execution instructions of the processor, and the processor is configured to execute the execution instructions to realize the interface automatic test method. The computer-readable storage medium is used for storing a program, and the program is executed to realize the interface automation testing method.

Description

Interface automation test method, system and computer readable storage medium
Technical Field
The invention belongs to the technical field of computer application, and particularly relates to an interface automatic testing method, an interface automatic testing system and a computer readable storage medium.
Background
The conventional interface automatic testing method comprises the following steps:
1. using the existing enterprise version testing tool to perform interface testing;
2. using the existing open source version testing tool to carry out interface testing;
3. and editing the test frame by a tester to test the interface.
The solution 1 described above uses commercial software, which is fully functional, but needs to pay a high fee to the supplier of the software, and is relatively expensive. The open source software used in the method 2 has simple functions and low customizability, and cannot completely meet the requirements of interface testing. And 3, the testing personnel is required to have coding experience and write codes, which brings higher labor cost.
Disclosure of Invention
In order to solve the technical problems mentioned in the background art, the invention provides an interface automation testing method, system and computer readable storage medium.
In order to achieve the technical purpose, the technical scheme of the invention is as follows:
an interface automation test method comprises the following steps:
maintaining an interface test case set to be tested, and storing the interface test case set in the form of an Excel file, wherein the Excel file is maintained by a tester;
constructing a web platform for interacting with testers, wherein the testers test a case set file through an uploading interface of the web platform, the web platform downloads the file, the back end of the web platform analyzes the file into a parameter form which can be accepted by RPC service, the web platform serves as an RPC client to send a request to the RPC service, and a test result returned after the request is stored in a database;
and constructing a universal interface test tool and monitoring a certain port through the RPC service, wherein the RPC service transmits a received request to the interface test tool for execution, and the interface test tool returns a test result to the web platform through the RPC service after execution.
Further, the interface test case set comprises the name of the interface, an interface request method, an interface request URL, an interface request header, an interface request body and an expected response result.
Further, the interface test tool receives the parameters and sends a response request to the server to be tested according to the parameters, and the interface test tool verifies the received response result of the server to be tested to obtain a final test result.
Further, the parameters received by the interface test tool include a request method, a request URL, a request header, and an expected response result.
Further, when the tester accesses the test result page of the web platform, the web platform queries the latest test report from the database and displays the latest test report to the tester.
An interface automatic test system comprises a processor and a memory, wherein the memory stores execution instructions of the processor, and the processor is configured to execute the execution instructions to realize the interface automatic test method.
A computer-readable storage medium for storing a program, the program being executed to implement the above-mentioned interface automation test method.
Adopt the beneficial effect that above-mentioned technical scheme brought:
the invention designs an automatic interface testing method, which can realize automatic interface testing without setting up or compiling a testing frame by testers, does not need commercial software, and reduces the cost and the human resource cost.
Drawings
FIG. 1 is an overall flow diagram of the present invention;
FIG. 2 is a flow diagram of a web platform request response in the present invention;
FIG. 3 is a flow chart of the interface test tool service of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
As used herein, the singular forms "a", "an", "the" and "the" may include the plural forms as well, unless expressly stated otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The invention designs an automatic interface testing method, as shown in fig. 1, comprising:
maintaining an interface test case set to be tested, and storing the interface test case set in the form of an Excel file, wherein the Excel file is maintained by a tester;
constructing a web platform for interacting with testers, wherein the testers test a case set file through an uploading interface of the web platform, the web platform downloads the file, the back end of the web platform analyzes the file into a parameter form which can be accepted by RPC service, the web platform serves as an RPC client to send a request to the RPC service, and a test result returned after the request is stored in a database;
and constructing a universal interface test tool and monitoring a certain port through the RPC service, wherein the RPC service transmits a received request to the interface test tool for execution, and the interface test tool returns a test result to the web platform through the RPC service after execution.
In this embodiment, specifically, the interface test case set includes a name of the interface, an interface request method, an interface request URL, an interface request header, an interface request body, and an expected response result. And the interface testing tool receives the parameters and sends a response request to the tested server according to the parameters, and the interface testing tool checks the response result of the tested server after receiving the response result to obtain a final testing result. The parameters received by the interface test tool include a request method, a request URL, a request header, and an expected response result.
When a tester accesses a test result page of the web platform, the web platform queries the latest test report from the database and displays the latest test report to the tester.
Fig. 2 is a flow chart of web platform request response, which includes the following steps:
step 1, a tester uploads an interface test case set on a front-end page;
step 2 and step 3, finding out a corresponding function execution, downloading and serialization analysis interface test case set through route mapping;
step 4, after the View function analyzes the test case set, initiating an RPC request to a test tool RPC service, and waiting for a response result;
step 5, writing the test result into a database, and reading the test result in the database in real time;
and 6, when the tester checks the test result page again, reading the test result from the data set by the checking data set function in the View and displaying the test result in the page.
FIG. 3 is a flow chart of the test tool service, which is as follows:
the method comprises the steps that a web platform serves as a client side of RPC service to send a request to an RPC server, the RPC server triggers a testing tool to execute after receiving the request, the testing tool sends a response request (POST, GET, DELETE and the like) to a tested server according to input parameters, the testing tool checks a testing result after taking the response result of the tested server, and the testing result is returned to the RPC client side through the RPC service, namely the web platform.
In addition, the invention also desires to protect an interface automation test system, which includes a processor and a memory, where the memory stores execution instructions of the processor, and the processor is configured to execute the execution instructions to implement the foregoing interface automation test method.
Furthermore, the present invention also intends to protect a computer-readable storage medium for storing a program, which is executed to implement the above-mentioned interface automation test method.
One skilled in the art will appreciate that the present invention may be directed to an apparatus for performing one or more of the operations described in the present application. The apparatus may be specially designed and constructed for the required purposes, or it may comprise any known apparatus in a general purpose computer selectively activated or reconfigured by a program stored in the general purpose computer. Such a computer program may be stored in a device (e.g., computer) readable medium, including, but not limited to, any type of disk including floppy disks, hard disks, optical disks, CD-ROMs, and magnetic-optical disks, Random Access Memories (RAMs), Read Only Memories (ROMs), electrically programmable ROMs, electrically erasable ROMs (eproms), electrically erasable programmable ROMs (eeproms), flash memories, magnetic cards, or optical cards, or in any type of media suitable for storing electronic instructions, and each coupled to a bus. A readable medium includes any mechanism for storing or transmitting information in a form readable by a device (e.g., a computer). For example, a readable medium includes Random Access Memory (RAM), Read Only Memory (ROM), magnetic disk storage media, optical storage media, flash memory devices, signals propagating in electrical, optical, acoustical or other forms (e.g., carrier waves, infrared signals, digital signals), etc.
It will be understood by those within the art that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the methods specified in the block or blocks of the block diagrams and/or flowchart block or blocks.
Those of skill in the art will appreciate that the various operations, methods, steps in the processes, acts, or solutions discussed in the present application can be interchanged, modified, combined, or eliminated. Further, various operations, methods, steps in the flows, which have been discussed in the present application, may be interchanged, modified, rearranged, decomposed, combined, or eliminated. Further, steps, measures, schemes in the various operations, methods, procedures disclosed in the prior art and the present invention can also be alternated, changed, rearranged, decomposed, combined, or deleted.

Claims (7)

1. An automated interface testing method, comprising:
maintaining an interface test case set to be tested, and storing the interface test case set in the form of an Excel file, wherein the Excel file is maintained by a tester;
constructing a web platform for interacting with testers, wherein the testers test a case set file through an uploading interface of the web platform, the web platform downloads the file, the back end of the web platform analyzes the file into a parameter form which can be accepted by RPC service, the web platform serves as an RPC client to send a request to the RPC service, and a test result returned after the request is stored in a database;
and constructing a universal interface test tool and monitoring a certain port through the RPC service, wherein the RPC service transmits a received request to the interface test tool for execution, and the interface test tool returns a test result to the web platform through the RPC service after execution.
2. The automated interface test method according to claim 1, wherein the set of interface test cases includes a name of the interface, an interface request method, an interface request URL, an interface request header, an interface request body, and an expected response result.
3. The automated interface testing method according to claim 1, wherein the interface testing tool receives the parameters and sends a response request to the server under test according to the parameters, and the interface testing tool checks the received response result of the server under test to obtain a final test result.
4. The automated interface testing method of claim 3, wherein the parameters received by the interface testing tool include a request method, a request URL, a request header, and an expected response result.
5. The automated interface testing method of claim 1, wherein when the tester accesses the test result page of the web platform, the web platform queries the latest test report from the database and displays the latest test report to the tester.
6. An interface automated testing system, comprising a processor and a memory, wherein the memory stores execution instructions of the processor, and the processor is configured to execute the execution instructions to implement the interface automated testing method according to any one of claims 1-5.
7. A computer-readable storage medium storing a program, wherein the program is executed to implement the interface automation test method of any one of claims 1 to 5.
CN202010978198.6A 2020-09-17 2020-09-17 Interface automation test method, system and computer readable storage medium Pending CN112181813A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010978198.6A CN112181813A (en) 2020-09-17 2020-09-17 Interface automation test method, system and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010978198.6A CN112181813A (en) 2020-09-17 2020-09-17 Interface automation test method, system and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN112181813A true CN112181813A (en) 2021-01-05

Family

ID=73920787

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010978198.6A Pending CN112181813A (en) 2020-09-17 2020-09-17 Interface automation test method, system and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112181813A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113238965A (en) * 2021-06-18 2021-08-10 杭州遥望网络科技有限公司 Interface test script generation method, system and storage medium
CN114416406A (en) * 2022-01-30 2022-04-29 重庆长安汽车股份有限公司 Cloud-testing-platform-based task multi-concurrency implementation method
CN114640614A (en) * 2022-04-24 2022-06-17 中国工商银行股份有限公司 RPC interface automatic test method, system, electronic equipment, medium and product
CN116561013A (en) * 2023-07-04 2023-08-08 建信金融科技有限责任公司 Testing method and device based on target service framework, electronic equipment and medium
CN114416406B (en) * 2022-01-30 2024-04-26 重庆长安汽车股份有限公司 Task multiple concurrency realization method based on cloud testing platform

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104834595A (en) * 2015-02-15 2015-08-12 网易(杭州)网络有限公司 Visual automatic test method and system
CN106815150A (en) * 2017-01-19 2017-06-09 网易(杭州)网络有限公司 Service end interface test system and method
CN107729243A (en) * 2017-10-12 2018-02-23 上海携程金融信息服务有限公司 API automated testing method, system, equipment and storage medium
EP3477523A1 (en) * 2017-10-31 2019-05-01 Commissariat à l'Energie Atomique et aux Energies Alternatives System, method and computer program product for detecting infeasible events in dynamic programs
CN110858172A (en) * 2018-08-23 2020-03-03 北京京东尚科信息技术有限公司 Automatic test code generation method and device
CN111130922A (en) * 2019-11-28 2020-05-08 中国航空工业集团公司西安航空计算技术研究所 Airborne information safety automatic test method and test platform
CN111367802A (en) * 2020-02-29 2020-07-03 中国平安财产保险股份有限公司 Web automatic testing method and device and computer readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104834595A (en) * 2015-02-15 2015-08-12 网易(杭州)网络有限公司 Visual automatic test method and system
CN106815150A (en) * 2017-01-19 2017-06-09 网易(杭州)网络有限公司 Service end interface test system and method
CN107729243A (en) * 2017-10-12 2018-02-23 上海携程金融信息服务有限公司 API automated testing method, system, equipment and storage medium
EP3477523A1 (en) * 2017-10-31 2019-05-01 Commissariat à l'Energie Atomique et aux Energies Alternatives System, method and computer program product for detecting infeasible events in dynamic programs
CN110858172A (en) * 2018-08-23 2020-03-03 北京京东尚科信息技术有限公司 Automatic test code generation method and device
CN111130922A (en) * 2019-11-28 2020-05-08 中国航空工业集团公司西安航空计算技术研究所 Airborne information safety automatic test method and test platform
CN111367802A (en) * 2020-02-29 2020-07-03 中国平安财产保险股份有限公司 Web automatic testing method and device and computer readable storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113238965A (en) * 2021-06-18 2021-08-10 杭州遥望网络科技有限公司 Interface test script generation method, system and storage medium
CN114416406A (en) * 2022-01-30 2022-04-29 重庆长安汽车股份有限公司 Cloud-testing-platform-based task multi-concurrency implementation method
CN114416406B (en) * 2022-01-30 2024-04-26 重庆长安汽车股份有限公司 Task multiple concurrency realization method based on cloud testing platform
CN114640614A (en) * 2022-04-24 2022-06-17 中国工商银行股份有限公司 RPC interface automatic test method, system, electronic equipment, medium and product
CN114640614B (en) * 2022-04-24 2024-02-02 中国工商银行股份有限公司 RPC interface automatic test method, system, electronic equipment, medium and product
CN116561013A (en) * 2023-07-04 2023-08-08 建信金融科技有限责任公司 Testing method and device based on target service framework, electronic equipment and medium
CN116561013B (en) * 2023-07-04 2023-09-26 建信金融科技有限责任公司 Testing method and device based on target service framework, electronic equipment and medium

Similar Documents

Publication Publication Date Title
CN112181813A (en) Interface automation test method, system and computer readable storage medium
CN103077108B (en) A kind of method and system browser collapse being carried out to early warning
CN110727580A (en) Response data generation method, full-flow interface data processing method and related equipment
CN107644075B (en) Method and device for collecting page information
CN111522741B (en) Interface test code generation method and device, electronic equipment and readable storage medium
CN108319550A (en) A kind of test system and test method
CN109871312A (en) A kind of interface test method, device, equipment and readable storage medium storing program for executing
CN105138454A (en) Automated measurement method for security software of B/S framework
CN113553260B (en) Test method, test apparatus, device, and medium
CN114625645A (en) Service testing method and device, electronic equipment and readable storage medium
CN106790380A (en) Data reporting method and device
CN111367982B (en) Method, device, computer equipment and storage medium for importing TRRIGA basic data
CN116383021A (en) Software package performance testing method, system, computing device and readable storage medium
CN110806981B (en) Application program testing method, device, equipment and storage medium
CN113656301A (en) Interface testing method, device, equipment and storage medium
CN113886221A (en) Test script generation method and device, storage medium and electronic equipment
CN113760696A (en) Program problem positioning method and device, electronic equipment and storage medium
CN112214407A (en) Data verification control and execution method and corresponding device, equipment and medium
CN111163155A (en) Account checking file transmission method, account checking file transmission system, account checking file transmission server and storage medium
CN111614604B (en) Code file generation method and device
CN109522205A (en) A kind of method, apparatus of emulation testing, computer storage medium and terminal
CN113485881B (en) Test method and device of temporary speed limiting server, electronic equipment and medium
CN113392026B (en) Interface automatic test method, system, electronic equipment and storage medium
CN116955118B (en) Performance analysis method, system, computing device and storage medium
CN111897710A (en) Timing task diagnosis method and device

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 210000 11th floor, building A1, Huizhi science and Technology Park, 8 Hengtai Road, Nanjing Economic and Technological Development Zone, Nanjing City, Jiangsu Province

Applicant after: DILU TECHNOLOGY Co.,Ltd.

Address before: Building C4, No.55 Liyuan South Road, moling street, Jiangning District, Nanjing City, Jiangsu Province

Applicant before: DILU TECHNOLOGY Co.,Ltd.