CN111949537A - Interface test method, device, equipment and medium - Google Patents

Interface test method, device, equipment and medium Download PDF

Info

Publication number
CN111949537A
CN111949537A CN202010819634.5A CN202010819634A CN111949537A CN 111949537 A CN111949537 A CN 111949537A CN 202010819634 A CN202010819634 A CN 202010819634A CN 111949537 A CN111949537 A CN 111949537A
Authority
CN
China
Prior art keywords
interface
test
tested
testing
connectivity
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
CN202010819634.5A
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 Ruian Technology Co Ltd
Original Assignee
Beijing Ruian 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 Beijing Ruian Technology Co Ltd filed Critical Beijing Ruian Technology Co Ltd
Priority to CN202010819634.5A priority Critical patent/CN111949537A/en
Publication of CN111949537A publication Critical patent/CN111949537A/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/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
    • 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/3692Test management for test results analysis

Abstract

The embodiment of the invention discloses a method, a device, equipment and a medium for testing an interface. Wherein, the method comprises the following steps: determining an interface to be tested from a test case generated in advance; the test case is generated based on an interface document containing interface information; checking whether the interface to be tested has connectivity; if so, testing the interface to be tested according to the test parameters of the interface to be tested. The embodiment of the invention effectively improves the testing efficiency of the interface under the condition of not sending the testing message by software through the automatic traversal interface function of the established testing case.

Description

Interface test method, device, equipment and medium
Technical Field
The present invention relates to data communication technologies, and in particular, to a method, an apparatus, a device, and a medium for testing an interface.
Background
With the rapid development of science and technology, the popularization of internet technology provides many application scenes for WEB (World Wide WEB) application products. HTTP (Hyper Text Transfer Protocol) interfaces are increasingly applied to WEB service functions, and coverage testing of these interfaces is an important task. At present, a common method for interface testing is mainly to send information such as an interface address, a request method, a request parameter and the like to a background system in a message form through specified software installed on equipment, the system performs testing work, and the software judges a detection result of an interface by receiving a response result returned by the system.
The defects of the scheme are as follows: during each test, test information, such as an interface address, a request method, a request parameter and the like, needs to be manually sent to a system through specified software for testing, so that the whole process is long in time consumption, labor is consumed, and the test efficiency is greatly reduced.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a medium for testing an interface, which can effectively improve the testing efficiency of the interface under the condition that software does not need to send a test message through an established test case automatic traversal interface function.
In a first aspect, an embodiment of the present invention provides a method for testing an interface, including:
determining an interface to be tested from a test case generated in advance; generating the test case based on an interface document containing interface information;
checking whether the interface to be tested has connectivity;
if so, testing the interface to be tested according to the testing parameters of the interface to be tested.
Optionally, the test parameter includes at least one of a request mode, a request path, a request header, and a request body of the interface to be tested.
Optionally, the process of generating the test case includes:
establishing an incidence relation among the test interface, the test parameters and the expected result according to the interface information in the interface document;
and writing the test interface, the test parameters and the expected result into a target document as a test case according to the incidence relation.
Optionally, the verifying whether the interface to be tested has connectivity includes:
and verifying whether the interface to be tested has connectivity by adopting an interface connectivity verification program.
Optionally, the testing the interface to be tested according to the test parameters of the interface to be tested includes:
inputting the test parameters of the interface to be tested into an interface test program for testing to obtain an output result of the interface test program;
and generating a test report of the interface to be tested according to the output result of the interface test program.
Optionally, generating a test report of the interface to be tested according to an output result of the interface test program includes:
comparing the output result of the interface test program with the expected result in the test case;
and if the output result is the same as the expected result, determining that the interface to be tested passes the test, and generating a test report of the interface to be tested according to the test passing identification.
Optionally, the method further includes:
and if the output result is different from the expected result, determining that the test of the interface to be tested fails, and generating a test report of the interface to be tested according to the test failure identification.
In a second aspect, an embodiment of the present invention provides a device for testing an interface, including:
the device comprises a to-be-tested interface determining module, a to-be-tested interface determining module and a test case generating module, wherein the to-be-tested interface determining module is used for determining an interface to be tested from a pre-generated test case; generating the test case based on an interface document containing interface information;
the connectivity checking module is used for checking whether the interface to be tested has connectivity;
and the interface to be tested testing module is used for testing the interface to be tested according to the testing parameters of the interface to be tested if the interface to be tested is the test interface.
Optionally, the test parameter includes at least one of a request mode, a request path, a request header, and a request body of the interface to be tested.
Optionally, the apparatus further includes a test case generation module, where the test case generation module is specifically configured to:
establishing an incidence relation among the test interface, the test parameters and the expected result according to the interface information in the interface document;
and writing the test interface, the test parameters and the expected result into a target document as a test case according to the incidence relation.
Optionally, the connectivity verification module is specifically configured to:
and verifying whether the interface to be tested has connectivity by adopting an interface connectivity verification program.
Optionally, the test module of the interface to be tested is specifically configured to:
inputting the test parameters of the interface to be tested into an interface test program for testing to obtain an output result of the interface test program;
and generating a test report of the interface to be tested according to the output result of the interface test program.
Optionally, the test module for an interface to be tested is further specifically configured to:
comparing the output result of the interface test program with the expected result in the test case;
and if the output result is the same as the expected result, determining that the interface to be tested passes the test, and generating a test report of the interface to be tested according to the test passing identification.
Optionally, the test module of the interface to be tested is further configured to determine that the test of the interface to be tested fails if the output result is different from the expected result, and generate a test report of the interface to be tested according to the test failing identifier.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for testing the interface according to any of the embodiments of the present invention.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the method for testing the interface according to any one of the embodiments of the present invention.
The embodiment of the invention determines the interface to be tested from the test case generated in advance; the test case is generated based on an interface document containing interface information; checking whether the interface to be tested has connectivity; if so, testing the interface to be tested according to the test parameters of the interface to be tested. The embodiment of the invention effectively improves the testing efficiency of the interface under the condition of not sending the testing message by software through the automatic traversal interface function of the established testing case.
Drawings
Fig. 1 is a schematic flowchart illustrating a testing method of an interface according to a first embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for testing an interface according to a second embodiment of the present invention;
FIG. 3 is a diagram illustrating interface information in an interface document according to a second embodiment of the present invention;
FIG. 4 is a schematic illustration showing a test report interface according to a second embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a testing apparatus for an interface according to a third embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device in the fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart illustrating a testing method of an interface according to a first embodiment of the present invention. The embodiment can be applied to the situation of carrying out automatic test on the protocol interface. The method of the embodiment may be performed by a testing apparatus of an interface, which may be implemented in hardware and/or software and may be configured in an electronic device. The interface testing method can be realized according to any embodiment of the application. As shown in fig. 1, the method specifically includes the following steps:
s110, determining an interface to be tested from a test case generated in advance; the test case is generated based on the interface document containing the interface information.
Because the traditional method for testing the protocol interface mainly sends interface information (such as a request address, a request method, a request parameter and the like) of the interface to an interface test place for testing through the installed specified software, and each test is carried out independently, namely each test needs to send specific interface information through the specified software so as to realize the test of the interface; however, a long testing time is required in the testing process, and certain manpower is consumed, so that the testing efficiency of the protocol interface is greatly reduced.
Therefore, in the embodiment, the interface information of the interface to be tested is packaged into one test case, and the automatic traversal of the interface function is realized through the test case, so that the efficient test of the interface is realized. The interface adopted in this embodiment may be an HTTP interface, but is not limited to this interface, and may be applied to other data transmission protocol interfaces.
Specifically, the test case is a document containing the association relationship of each interface information of the test interface, and the test case shows a form in the form of, for example, EXCEL or WORD; the interface document contains interface information of a plurality of test interfaces, but the corresponding relation between each interface information and the test interfaces cannot be visually seen in the interface document, and the interface document belongs to a non-corresponding storage form. The interfaces to be tested determined in the pre-generated test cases can be selected in sequence, for example, the first test interface in the test cases, and after the test of the first test interface is completed, the next test interface can be executed in a traversal sequence, so that the automatic test among a plurality of test interfaces is effectively realized.
S120, checking whether the interface to be tested has connectivity; if yes, go to S130; if not, go to S140.
In this embodiment, after the interface to be tested is selected, before the interface to be tested is subjected to the functionality test, it is required to test whether the test interface has connectivity, so as to avoid the problem that the test interface has errors due to the interface to be tested which does not have connectivity. Specifically, if it is detected that the interface to be tested has connectivity, testing the interface to be tested according to the test parameters of the interface to be tested, that is, executing S130; if it is detected that the interface to be tested does not have connectivity, the interface to be tested is not tested, i.e., S140 is executed.
S130, testing the interface to be tested according to the test parameters of the interface to be tested.
In this embodiment, the test parameters can reflect specific test characteristics of the interface to be tested, and the test parameters are used as a test input for testing the interface to be tested, so that the test interface of the interface to be tested is more accurate.
In this embodiment, optionally, the test parameter includes at least one of a request mode, a request path, a request header, and a request body of the interface to be tested. The HTTP request may use a plurality of request manners, such as get, post, head, and the like, wherein the function description of get is the page information specified by the request, and returns the entity body; the post function description is to submit data to a specified resource for processing request (for example, submitting a form or uploading a file), the data is contained in a request body, and the post request may cause the establishment of a new resource and/or the modification of an existing resource; the head's functional description is similar to a GET request, except that there is no specific content in the returned response for retrieving the header.
The request path is the memory address of the test interface. The request header conveys to the requested server the format information that the test interface needs to transmit, i.e. sends some additional information of the server to the client. The request body is determined according to the request mode, and only when the request mode is the post, the test parameters include the request body which is used for storing the data in the post, for example, the processing request of the post is an upload file, and the upload file is stored in the request body.
And S140, not testing the interface to be tested.
In this embodiment, when it is detected that the interface to be tested does not have connectivity, it indicates that the interface to be tested cannot be used normally, that is, when the interface to be tested is tested, there is no test result; therefore, when the to-be-tested interface cannot be normally used, the fact that the to-be-tested interface is mistakenly tested is recorded, so that a tester is reminded of updating the content in the test case in time.
The embodiment of the invention determines the interface to be tested from the test case generated in advance; the test case is generated based on an interface document containing interface information; checking whether the interface to be tested has connectivity; if so, testing the interface to be tested according to the test parameters of the interface to be tested. The embodiment of the invention effectively improves the testing efficiency of the interface under the condition of not sending the testing message by software through the automatic traversal interface function of the established testing case.
Example two
Fig. 2 is a flowchart illustrating a method for testing an interface according to a second embodiment of the present invention. The embodiment is further expanded and optimized on the basis of the embodiment, and can be combined with any optional alternative in the technical scheme. As shown in fig. 2, the method includes:
s210, determining an interface to be tested from a test case generated in advance; the test case is generated based on the interface document containing the interface information.
S220, checking whether the interface to be tested has connectivity; if yes, go to S230; if not, go to S250.
And S230, inputting the test parameters of the interface to be tested into the interface test program for testing to obtain the output result of the interface test program.
In this embodiment, the interface test program is pre-written by a tester, for example, the implemented scripting language may be Python; the interface test program is formulated based on the display form of the test case, that is, the interface test programs with the test cases of EXCEL and WORD tables are different, and the interface test program needs to be modified by a tester slightly. Specifically, the test parameters are input into the interface test program, and then the interface test program is run to obtain the output result of the interface test program, where the output result is the test result of the interface to be tested.
And S240, generating a test report of the interface to be tested according to the output result of the interface test program.
In this embodiment, in order to enable a tester to clearly and intuitively see the test results of the plurality of test interfaces, a test report is generated according to the test result of each test interface for recording the test result of each test interface, so that the tester can perform trace query on the test result of a certain test interface at a later stage.
And S250, not testing the interface to be tested.
On the basis of the foregoing embodiment, optionally, the process of generating the test case includes:
establishing an incidence relation among the test interface, the test parameters and the expected result according to the interface information in the interface document;
and writing the test interface, the test parameters and the expected result into the target document as a test case according to the incidence relation.
In this embodiment, the interface document stores interface information of each protocol interface, where the interface information may include a test interface (e.g., a test interface name), test parameters (e.g., at least one of a request mode, a request path, a request header, and a request body), and an expected result of the test interface; specifically, the expected result of the test result is obtained by theoretical judgment of a tester based on actual experience, and the accuracy is high. The display diagram of the interface information in the interface document is shown in FIG. 3; the request path, the request type (namely the request mode), the functional description of the interface, the application scene and the request parameter description of the test interface are displayed, so that the test case can be accurately generated according to the parameter information in the interface document.
Specifically, according to the association relationship, the test interface, the test parameters, and the expected result are written into the target document as the test case, the embodiment takes the EXCEL document as the test case for demonstration, and the demonstration table is as follows.
Figure BDA0002633990720000101
The request head and the request body are too many, so that the request head and the request body are not shown; specifically, { "Content-Type": application/json "," SenderID ": 111", "serviceresourceld": 222"} is the request header of 0050; { "From": 370000000001"," To ": 110000000001", "MessageSequence": 2019010714141200001"," RequestParam ": {" Condition ": SJZYBSF { '330000_330000000000_10047440'", "ResourceInfos" [ { "DataItems": [ { "Name": SJZYBSF "," Fmt ":" }, { "Name": SJZYMLBH "," Fmt ":" }, { "Name": "}, {" SJZYMC "," Fmt ": FmZYGXQ" }, { "TTZYMS ]," Fmt ": 1": 0050 "} in the request and the storage of the data set" { "0050" }.
On the basis of the above embodiment, verifying whether the interface to be tested has connectivity includes:
and verifying whether the interface to be tested has connectivity by adopting an interface connectivity verification program.
In the embodiment, whether the interface to be tested has connectivity is verified through an interface connectivity verification program written by a tester in advance, so that the accuracy of interface connectivity verification can be effectively ensured; specifically, the tester can write the interface connection verification program based on the Python language.
On the basis of the foregoing embodiment, optionally, generating a test report of the interface to be tested according to an output result of the interface test program includes:
comparing the output result of the interface test program with an expected result in the test case;
and if the output result is the same as the expected result, determining that the interface to be tested passes the test, and generating a test report of the interface to be tested according to the test passing identification.
In this embodiment, the output result of the interface test program may be a specific value, and the comparison is performed according to the value of the expected result of the tester in the test case and the value of the output result, so as to implement effective verification on the test result. The test report interface is shown schematically in fig. 4, in which only four test interfaces with successful test are shown, and the test PASS is labeled as "PASS". According to the embodiment, the test results of the plurality of test interfaces can be clearly and intuitively known by the tester through the test report generated based on the test success identification.
On the basis of the foregoing embodiment, optionally, the method of this embodiment further includes:
and if the output result is different from the expected result, determining that the test of the interface to be tested fails, and generating a test report of the interface to be tested according to the test failure identification.
In this embodiment, the test failure flag may be set to "FAIL", indicating that the test result of a certain test interface is failed; in this embodiment, the test result identifier is marked in the test report, so that a subsequent tester can directly know the interface which is successfully tested and the interface which is failed to be tested in the plurality of test interfaces based on the test report, and the test interfaces can be uniformly processed according to the test report.
EXAMPLE III
Fig. 5 is a schematic structural diagram of a testing apparatus for an interface according to a third embodiment of the present invention, which is applicable to an automated testing of a protocol interface. The device is configured in the electronic equipment, and can realize the test method of the interface in any embodiment of the application. The device specifically comprises the following steps:
a to-be-tested interface determining module 510, configured to determine an interface to be tested from a pre-generated test case; generating the test case based on an interface document containing interface information;
a connectivity checking module 520, configured to check whether the interface to be tested has connectivity;
and the interface to be tested testing module 530 is configured to test the interface to be tested according to the testing parameters of the interface to be tested if the interface to be tested is the same as the interface to be tested.
On the basis of the foregoing embodiment, optionally, the test parameter includes at least one of a request mode, a request path, a request header, and a request body of the interface to be tested.
On the basis of the foregoing embodiment, optionally, the apparatus of this embodiment further includes a test case generation module, where the test case generation module is specifically configured to:
establishing an incidence relation among the test interface, the test parameters and the expected result according to the interface information in the interface document;
and writing the test interface, the test parameters and the expected result into a target document as a test case according to the incidence relation.
On the basis of the foregoing embodiment, optionally, the connectivity verification module 520 is specifically configured to:
and verifying whether the interface to be tested has connectivity by adopting an interface connectivity verification program.
On the basis of the above embodiment, optionally, the interface to be tested testing module 530 is specifically configured to:
inputting the test parameters of the interface to be tested into an interface test program for testing to obtain an output result of the interface test program;
and generating a test report of the interface to be tested according to the output result of the interface test program.
On the basis of the foregoing embodiment, optionally, the interface to be tested testing module 530 is further specifically configured to:
comparing the output result of the interface test program with the expected result in the test case;
and if the output result is the same as the expected result, determining that the interface to be tested passes the test, and generating a test report of the interface to be tested according to the test passing identification.
On the basis of the foregoing embodiment, optionally, the interface to be tested testing module 530 is further configured to determine that the interface to be tested fails to test if the output result is different from the expected result, and generate a test report of the interface to be tested according to the test failure flag.
By the interface testing processing device of the third embodiment of the invention, the interface testing efficiency can be effectively improved through the established testing case automatic traversal interface function under the condition that software is not required to send a testing message.
The interface testing device provided by the embodiment of the invention can execute the interface testing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example four
Fig. 6 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention, as shown in fig. 6, the electronic device includes a processor 610, a memory 620, an input device 630, and an output device 640; the number of the processors 610 in the electronic device may be one or more, and one processor 610 is taken as an example in fig. 6; the processor 610, the memory 620, the input device 630, and the output device 640 in the electronic apparatus may be connected by a bus or other means, and fig. 6 illustrates an example of connection by a bus.
The memory 620 is used as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the testing method of the interface in the embodiment of the present invention. The processor 610 executes various functional applications and data processing of the electronic device by executing software programs, instructions and modules stored in the memory 620, that is, implements the test method of the interface provided by the embodiment of the present invention.
The memory 620 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 620 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 620 can further include memory located remotely from the processor 610, which can be connected to an electronic device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 630 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device, and may include a keyboard, a mouse, and the like. The output device 640 may include a display device such as a display screen.
EXAMPLE five
The present embodiments provide a storage medium containing computer-executable instructions for implementing a method for testing an interface provided by an embodiment of the present invention when executed by a computer processor.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in the test method of the interface provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the above search apparatus, each included unit and module are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for testing an interface, the method comprising:
determining an interface to be tested from a test case generated in advance; generating the test case based on an interface document containing interface information;
checking whether the interface to be tested has connectivity;
if so, testing the interface to be tested according to the testing parameters of the interface to be tested.
2. The method of claim 1, wherein the test parameters include at least one of a request mode, a request path, a request header, and a request body of the interface to be tested.
3. The method of claim 1, wherein the test case generation process comprises:
establishing an incidence relation among the test interface, the test parameters and the expected result according to the interface information in the interface document;
and writing the test interface, the test parameters and the expected result into a target document as a test case according to the incidence relation.
4. The method of claim 1, wherein verifying whether the interface to be tested has connectivity comprises:
and verifying whether the interface to be tested has connectivity by adopting an interface connectivity verification program.
5. The method of claim 1, wherein testing the interface under test according to the test parameters of the interface under test comprises:
inputting the test parameters of the interface to be tested into an interface test program for testing to obtain an output result of the interface test program;
and generating a test report of the interface to be tested according to the output result of the interface test program.
6. The method of claim 5, wherein generating a test report for the interface under test based on the output of the interface test program comprises:
comparing the output result of the interface test program with the expected result in the test case;
and if the output result is the same as the expected result, determining that the interface to be tested passes the test, and generating a test report of the interface to be tested according to the test passing identification.
7. The method of claim 6, further comprising:
and if the output result is different from the expected result, determining that the test of the interface to be tested fails, and generating a test report of the interface to be tested according to the test failure identification.
8. An apparatus for testing an interface, the apparatus comprising:
the device comprises a to-be-tested interface determining module, a to-be-tested interface determining module and a test case generating module, wherein the to-be-tested interface determining module is used for determining an interface to be tested from a pre-generated test case; generating the test case based on an interface document containing interface information;
the connectivity checking module is used for checking whether the interface to be tested has connectivity;
and the interface to be tested testing module is used for testing the interface to be tested according to the testing parameters of the interface to be tested if the interface to be tested is the test interface.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method of testing an interface as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method for testing an interface according to any one of claims 1 to 7.
CN202010819634.5A 2020-08-14 2020-08-14 Interface test method, device, equipment and medium Pending CN111949537A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010819634.5A CN111949537A (en) 2020-08-14 2020-08-14 Interface test method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010819634.5A CN111949537A (en) 2020-08-14 2020-08-14 Interface test method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN111949537A true CN111949537A (en) 2020-11-17

Family

ID=73342344

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010819634.5A Pending CN111949537A (en) 2020-08-14 2020-08-14 Interface test method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN111949537A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113468049A (en) * 2021-06-29 2021-10-01 平安养老保险股份有限公司 Test method, device, equipment and medium based on configurable interface
CN117033234A (en) * 2023-08-24 2023-11-10 广东保伦电子股份有限公司 Interface testing method, device, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9268672B1 (en) * 2014-05-27 2016-02-23 Amazon Technologies, Inc. Automated test case generation for applications
CN106528418A (en) * 2016-10-28 2017-03-22 广东浪潮大数据研究有限公司 Test method and device
CN108763071A (en) * 2018-05-17 2018-11-06 平安科技(深圳)有限公司 A kind of webpage test method and terminal device
CN109947646A (en) * 2019-03-13 2019-06-28 平安信托有限责任公司 Interface test method, device, computer equipment and storage medium
CN110377503A (en) * 2019-06-19 2019-10-25 平安银行股份有限公司 Method for testing pressure, device, computer equipment and storage medium
CN111143192A (en) * 2019-11-28 2020-05-12 叮当快药科技集团有限公司 Interface automation test method and device and related product

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9268672B1 (en) * 2014-05-27 2016-02-23 Amazon Technologies, Inc. Automated test case generation for applications
CN106528418A (en) * 2016-10-28 2017-03-22 广东浪潮大数据研究有限公司 Test method and device
CN108763071A (en) * 2018-05-17 2018-11-06 平安科技(深圳)有限公司 A kind of webpage test method and terminal device
CN109947646A (en) * 2019-03-13 2019-06-28 平安信托有限责任公司 Interface test method, device, computer equipment and storage medium
CN110377503A (en) * 2019-06-19 2019-10-25 平安银行股份有限公司 Method for testing pressure, device, computer equipment and storage medium
CN111143192A (en) * 2019-11-28 2020-05-12 叮当快药科技集团有限公司 Interface automation test method and device and related product

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113468049A (en) * 2021-06-29 2021-10-01 平安养老保险股份有限公司 Test method, device, equipment and medium based on configurable interface
CN113468049B (en) * 2021-06-29 2023-07-04 平安养老保险股份有限公司 Configurable interface-based test method, device, equipment and medium
CN117033234A (en) * 2023-08-24 2023-11-10 广东保伦电子股份有限公司 Interface testing method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN107122297B (en) Method and equipment for generating request message of test interface
CN105099811A (en) Interface testing method and device
CN106502883B (en) The database synchronization method and system of client and server-side when automatic test
CN111897724B (en) Automatic testing method and device suitable for cloud platform
WO2018184361A1 (en) Application test method, server, terminal, and storage media
CN108459850B (en) Method, device and system for generating test script
CN112199277B (en) Defect reproduction method, device, equipment and storage medium based on browser
CN111949537A (en) Interface test method, device, equipment and medium
CN111198797B (en) Operation monitoring method and device and operation analysis method and device
CN112540924A (en) Interface automation test method, device, equipment and storage medium
CN113220588A (en) Automatic testing method, device and equipment for data processing and storage medium
WO2015067171A1 (en) Debug debug method and apparatus
CN112367220A (en) Interface testing method and device, storage medium and electronic equipment
CN112612706A (en) Automated testing method, computer device and storage medium
CN111124937A (en) Method and system for assisting in improving test case generation efficiency based on instrumentation function
CN113238940B (en) Interface test result comparison method, device, equipment and storage medium
CN115934559A (en) Testing method of intelligent form testing system
CN107797917B (en) Performance test script generation method and device
CN113660139B (en) V2X protocol consistency detection method based on multiple message layer communication
CN113656301A (en) Interface testing method, device, equipment and storage medium
CN113886221A (en) Test script generation method and device, storage medium and electronic equipment
CN113407444A (en) Interface test case generation method, device, equipment and storage medium
CN114531345A (en) Method, device and equipment for storing flow comparison result and storage medium
CN113760696A (en) Program problem positioning method and device, electronic equipment and storage medium
CN114371866A (en) Version reconfiguration test method, device and equipment of service system

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