CN113778896A - Interface test method, device, equipment and medium - Google Patents
Interface test method, device, equipment and medium Download PDFInfo
- Publication number
- CN113778896A CN113778896A CN202111128392.6A CN202111128392A CN113778896A CN 113778896 A CN113778896 A CN 113778896A CN 202111128392 A CN202111128392 A CN 202111128392A CN 113778896 A CN113778896 A CN 113778896A
- Authority
- CN
- China
- Prior art keywords
- tool class
- target
- testing
- interface
- test
- 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.)
- Withdrawn
Links
- 238000010998 test method Methods 0.000 title claims description 6
- 238000012360 testing method Methods 0.000 claims abstract description 273
- 238000000034 method Methods 0.000 claims abstract description 63
- 238000004806 packaging method and process Methods 0.000 claims abstract description 22
- 238000004590 computer program Methods 0.000 claims description 11
- 230000006870 function Effects 0.000 claims description 10
- XSQUKJJJFZCRTK-NJFSPNSNSA-N UREA C 14 Chemical compound N[14C](N)=O XSQUKJJJFZCRTK-NJFSPNSNSA-N 0.000 claims description 8
- 230000009286 beneficial effect Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000007726 management method Methods 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 2
- 238000005192 partition Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000004321 preservation Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000013515 script Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
- G06F11/3644—Software debugging by instrumenting at runtime
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3696—Methods or tools to render software testable
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)
- Telephone Function (AREA)
Abstract
The application discloses a method, a device, equipment and a medium for testing an interface, wherein the method comprises the following steps: installing openpyxl, unittest and Requests in Python, and packaging a use case opening tool class, a data reading tool class, a data writing tool class, a configuration file reading tool class, a log generation tool class, a mail sending tool class and a call back holding tool class; reading target test case data for testing a target interface, and creating a test frame for testing the target interface based on unittest; and executing a target test case for testing the target interface by using a main function of the unittest, and calling the packaged tool class to test the target interface. By the method, the accuracy of the tester in testing the target interface can be improved, and the testing efficiency of the tester in testing the target interface can be improved.
Description
Technical Field
The present invention relates to the field of server technologies, and in particular, to a method, an apparatus, a device, and a medium for testing an interface.
Background
At present, postman and Robot Framework are usually used for testing an interface in a management platform, but the two types of testing tools are not flexible to assert, the number of recorded scripts is large, and a large number of page objects are attached, so that the accuracy of a test result is reduced, a great maintenance difficulty is brought to a tester, and the testing efficiency of the tester in testing the interface is greatly reduced. At present, no effective solution exists for the technical problem.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a method, an apparatus, a device and a medium for testing an interface, so as to improve the accuracy of testing a target interface by a tester and improve the testing efficiency of the tester when testing the target interface. The specific scheme is as follows:
a method of testing an interface, comprising:
installing openpyxl, unittest and Requests in Python, and packaging a use case opening tool class, a data reading tool class, a data writing tool class, a configuration file reading tool class, a log generation tool class, a mail sending tool class and a call returning holding tool class in a target file;
reading target test case data for testing a target interface by using the openpyxl and the Requests, and creating a test framework for testing the target interface based on the unittest;
under the test framework, executing a target test case for testing the target interface by using a main function of the unittest, and calling the case opening tool class, the data reading tool class, the data writing tool class, the configuration file reading tool class, the log generation tool class, the mail sending tool class and the call back holding tool class to test the target interface; and generating the target test case by the target test case data.
Preferably, the process of installing openpyxl, unittest and Requests in Python includes:
installing the openpyxl, the unittest, and the Requests in the Python using pip install.
Preferably, the process of packaging a use case opening tool class, a data reading tool class, a data writing tool class, a configuration file reading tool class, a log generation tool class, a mail sending tool class and a call back holding tool class in the target file includes:
packaging the data reading tool class used for reading the target test case data by using the openpyxl;
packaging the configuration file reading tool class for reading the configuration file by using the ConfigParser library of the Python;
packaging the log generation tool class for generating the log by using the logging library of the Python;
and packaging the mail sending tool class for sending the mail by utilizing the smtplib library and the email library of the Python.
Preferably, the target test case data includes: interface name, request method, request parameters, request header, interface address, and expected result of the test case.
Preferably, the reading, by using the openpyxl and the Requests, target test case data for testing a target interface includes:
and reading example data in an Excel format from an interface api document of a target cloud platform by using the openpyxl and the Reqursts, and generating the target test case data for testing the target interface by using the example data.
Preferably, the method further comprises the following steps:
and installing pytest in the Python, and generating a test report of the target interface by using the plug-in html test Runner of the pytest.
Correspondingly, the invention also discloses a testing device of the interface, which comprises:
the tool packaging module is used for installing openpyxl, unittest and Requests in Python and packaging a use case opening tool class, a data reading tool class, a data writing tool class, a configuration file reading tool class, a log generation tool class, a mail sending tool class and a call returning holding tool class in a target file;
the frame creating module is used for reading target test case data for testing a target interface by using the openpyxl and the Requests and creating a test frame for testing the target interface based on the unittest;
an interface test module, configured to execute a target test case for testing the target interface by using a main function of the unit test under the test framework, and call the case opening tool class, the data reading tool class, the data writing tool class, the configuration file reading tool class, the log generation tool class, the mail sending tool class, and the call back holding tool class to test the target interface; and generating the target test case by the target test case data.
Correspondingly, the invention also discloses a testing device of the interface, which comprises:
a memory for storing a computer program;
a processor for implementing the steps of a method for testing an interface as disclosed in the foregoing when executing said computer program.
Accordingly, the present invention also discloses a computer readable storage medium having a computer program stored thereon, which, when being executed by a processor, implements the steps of the method for testing an interface as disclosed in the foregoing.
It can be seen that, in the present invention, openpyxl, unittest and Requests are installed in Python, and a use case opening tool class, a data reading tool class, a data writing tool class, a configuration file reading tool class, a log generation tool class, a mail sending tool class and a call back holding tool class are encapsulated in a target file, then target test case data for testing a target interface is read by using openpyxl and Requests, a target test case for testing the target interface is generated according to the target test case data, finally, a test frame for testing the target interface is created based on the unittest, a target test case for testing the target interface is executed by using a main function of the unittest under the created test frame, and the use case opening tool class, the data reading tool class, the data writing tool class, the configuration file reading tool class, the log generation tool class, the call back call tool class, and the like, A mail delivery utility class and a call back hold utility class to test the target interface. Compared with the prior art, the method packages the test modules which are common in the actual operation process in the process of testing the interface and generates the corresponding test tool classes, so that the target interface can be tested by calling the corresponding test tool classes under the framework created by the unit test. Obviously, the testing method not only can improve the accuracy of the tester in testing the target interface, but also can improve the testing efficiency of the tester in testing the target interface. Correspondingly, the interface testing device, the interface testing equipment and the interface testing medium have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for testing an interface according to an embodiment of the present invention;
fig. 2 is a schematic view of an application scenario of an interface testing method according to an embodiment of the present invention;
FIG. 3 is a block diagram of a testing apparatus for an interface according to an embodiment of the present invention;
fig. 4 is a structural diagram of a test device of an interface according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of a testing method of an interface according to an embodiment of the present invention, where the testing method includes:
step S11: installing openpyxl, unittest and Requests in Python, and packaging a use case opening tool class, a data reading tool class, a data writing tool class, a configuration file reading tool class, a log generation tool class, a mail sending tool class and a call returning holding tool class in a target file;
step S12: reading target test case data for testing the target interface by using openpyxl and Requests, and creating a test frame for testing the target interface based on unittest;
step S13: under a test framework, executing a target test case for testing a target interface by using a main function of unittest, and calling a case opening tool class, a data reading tool class, a data writing tool class, a configuration file reading tool class, a log generation tool class, a mail sending tool class and a call back holding tool class to test the target interface;
and generating the target test case by the target test case data.
In this embodiment, a method for testing an interface is provided, and when the method is used to test an interface of a management platform, not only can the accuracy of a tester when testing a target interface be improved, but also the test efficiency of the tester when testing the target interface can be improved.
In this test method, a test environment for testing a target interface needs to be established first. Specifically, openpyxl, unittest and Requests are installed in a Python running environment, after openpyxl, unittest and Requests are installed in Python, a target file is newly built in Python and named as common, and a use case opening tool class, a data reading tool class, a data writing tool class, a configuration file reading tool class, a log generation tool class, a mail sending tool class and a call back holding tool class are created and packaged in the target file common.
It can be understood that, since the use case opening tool class, the data reading tool class, the data writing tool class, the configuration file reading tool class, the log generation tool class, the mail sending tool class and the call back holding tool class are all functional modules which are often encountered in the actual operation process, after the tools are packaged, the convenience of a tester calling and using the tools in the subsequent process can be improved.
Then, reading target test case data for testing the target interface by using openpyxl and Requests, wherein the target test case data comprises: interface name, request method, request parameters, request header, interface address, and expected result of the test case. That is, the target test case data includes an interface name interface, a request method, a request parameter data, a request header, an interface address url, and an expected result expected of the test case under a case number id.
And then, creating a test framework for testing the target interface based on unittest. Namely, a folder is newly created under the Python project and named as cases, a test case class with test modules as a partition is created under the folder, and a test case method with test case numbers as a partition is written in the test case class.
The account login function is taken as an example for specific description, and when an account is logged in, normal login, empty account, empty password, account error and the like in one test module are all methods of test cases. The annotation of the unittest is used as a mark in each method, and operations such as reading and transmitting of the test case are performed in the class and the method, because the test case class and the method of the unittest default to the test as a prefix.
After the test framework for testing the target interface is built, the target test case for testing the target interface can be executed by using the main function of the unit test under the test framework, and the case opening tool class, the data reading tool class, the data writing tool class, the configuration file reading tool class, the log generation tool class, the mail sending tool class and the call returning holding tool class which are packaged before are called to test the target interface. In this embodiment, the target test case for testing the target interface is generated from the target test case data.
It can be thought that, in the process of testing the interface, the method encapsulates the functional module which is relatively common in the actual operation process, and generates the corresponding test tool class, so that the corresponding test tool class is only required to be called under the framework created by the unit test to test the target interface. Therefore, the testing method can not only improve the accuracy of the tester in testing the target interface, but also improve the testing efficiency of the tester in testing the target interface.
It can be seen that, in this embodiment, openpyxl, unittest, and Requests are installed in Python, a use case opening tool class, a data reading tool class, a data writing tool class, a configuration file reading tool class, a log generation tool class, a mail sending tool class, and a call back holding tool class are encapsulated in a target file, then target test case data for testing a target interface is read by using openpyxl and Requests, a target test case for testing the target interface is generated according to the target test case data, finally, a test frame for testing the target interface is created based on the unittest, a target test case for testing the target interface is executed by using a main function of the unittest under the created test frame, and the use case opening tool class, the data reading tool class, the data writing tool class, the configuration file reading tool class, the log generation tool class, the mail sending tool class, and the call back hold tool class are simultaneously, A log generation utility class, a mail sending utility class, and a call back hold utility class to test the target interface. Compared with the prior art, the method packages the functional modules which are common in the actual operation process in the process of testing the interface and generates the corresponding test tool classes, so that the target interface can be tested by calling the corresponding test tool classes under the framework created by the unit test. Obviously, the testing method not only can improve the accuracy of the tester in testing the target interface, but also can improve the testing efficiency of the tester in testing the target interface.
Based on the above embodiments, this embodiment further describes and optimizes the technical solution, and as a preferred implementation, the above steps: the process of installing openpyxl, unittest and Requests in Python comprises the following steps:
openpyxl, unittest and Requests were installed in Python using pip install.
It can be understood that, because the pip is a software package installer of Python, and the desired software installation package can be directly found by using the command statement install, when openpyxl, unittest and Requests are installed in Python by using the pip install, the convenience in installing openpyxl, unittest and Requests can be further improved.
Based on the above embodiments, this embodiment further describes and optimizes the technical solution, and as a preferred implementation, the above steps: the process of packaging a use case opening tool class, a data reading tool class, a data writing tool class, a configuration file reading tool class, a log generation tool class, a mail sending tool class and a call back holding tool class in a target file comprises the following steps:
encapsulating a data reading tool class for reading target test case data by using openpyxl;
packaging a configuration file reading tool class for reading the configuration file by using a ConfigParser library of Python;
packaging a log generation tool class for generating a log by using a logging library of Python;
and encapsulating the mail sending tool class for sending the mail by utilizing the smtplib library and the email library of Python.
In this embodiment, when creating a read test Case class tool Case reader.py, the method encapsulates read test Case data and write test Case data in a class based on an openpyxl library; when creating a read profile tool class, myconfiger.py, the method is a method for encapsulating and reading a profile based on a ConfigParser library in the class; when creating a log generation tool class mylogging, a log generation method is packaged in the class based on a logging library; py, which is a method of packaging a sending mail based on the smtplib library and the email library in a class. Referring specifically to table 1, table 1 is a packaged tool list:
name of method | Description of the method | Description of the parameters |
open | Test case opening method | File name |
read_data | Reading of test case data | |
write_data | Writing of test case data | |
get_str | Configuration file data reading | Configuring segment names, configuring item names |
create_logger | Log generation | Name of log file |
send_msg | Mail delivery | Test report path |
common_base | Return call keeping | Real-time acquisition and preservation session |
Therefore, the technical scheme provided by the embodiment can ensure the accuracy and reliability when each tool class is created.
Based on the above embodiments, this embodiment further describes and optimizes the technical solution, and as a preferred implementation, the above steps: the process of reading target test case data for testing a target interface by using openpyxl and Requests comprises the following steps:
and reading the instance data from an interface api document of the target cloud platform in an Excel format by using openpyxl and Reqursts, and generating target test case data for testing the target interface by using the instance data.
Specifically, when target test case data for testing a target interface is read, instance data is read in an Excel format from an interface api document of a target cloud platform by using openpyxl and Reqursts, and then the target test case data for testing the target interface is generated by using the instance data. The target cloud platform can be a cloud management platform created by any enterprise and public institution.
When the example data is read from the interface api document of the target cloud platform in the Excel format, the actual operation data corresponding to the actual operation condition of the target cloud platform is read from the interface api document of the target cloud platform. In this case, when the target test case data for testing the target interface is generated by using the instance data, the authenticity and reliability of the target test case data can be ensured.
Based on the above embodiment, this embodiment further describes and optimizes the technical solution, and as a preferred implementation, the testing method further includes:
pytest is installed in Python, and a test report of the target interface is generated by using a plug-in html test Runner of pytest.
It can be understood that, in the prior art, when the existing test tool is used to test the interface, most test reports generated by the test tool not only have a single content form, but also have poor expandability.
In the present embodiment, in order to solve the above technical problem, based on the content disclosed in the foregoing embodiment, a pytest is further installed in Python, and a test report of a target interface is generated by using html test Runner of the pytest. The plug-in html test Runner can flexibly modify the style and content of the test report according to the actual needs of the user, so that when the plug-in html test Runner is used for generating the test report of the target interface, the test report of the target interface can better meet the user-defined requirements of the user, and the user experience of the user in reading the test report is improved.
In addition, in practical application, the mail sending tool class can be called to automatically send the test report of the target interface to the mailbox of the user, so that the user experience of the user in testing the target interface can be further improved.
In order to make the implementation principle of the present invention clearer and more obvious to those skilled in the art, the present embodiment combines a practical common scenario to describe the technical content disclosed in the foregoing in detail. Referring to fig. 2, fig. 2 is a schematic view of an application scenario of an interface testing method according to an embodiment of the present invention.
In practical application, openpyxl, unittest and Requests can be installed in Python according to data stored in a data center, and a use case opening tool class, a data reading tool class, a data writing tool class, a configuration file reading tool class, a log generation tool class, a mail sending tool class and a call returning holding tool class are packaged in a target file to obtain a data template. Meanwhile, each tool class is stored in the configuration center. And then, reading target test case data for testing the target interface from a parameter factory (namely, an interface api document of the target cloud platform) by using openpyxl and Requests, and transmitting the obtained parameters to a test framework for testing the target interface. Wherein the test framework is a framework created by using unittest and used for testing the target interface.
In the test framework, the trigger engine detects the target test case generated by the target test case data, which is equivalent to that a listener is arranged on the target interface and the target interface is monitored by the listener.
When the monitor detects that the target interface is abnormal, the system can perform corresponding abnormal interception and report alarm information of system abnormality or service abnormality. When the target interface is tested, the system also establishes a corresponding assertion library according to the actual test result and the expected test result of the target interface, and performs assertion configuration and model analysis, and if the actual test result and the expected test result of the target interface have a larger difference, the system also makes a corresponding alarm prompt.
Obviously, the testing method not only can improve the accuracy of the tester in testing the target interface, but also can improve the testing efficiency of the tester in testing the target interface.
Referring to fig. 3, fig. 3 is a structural diagram of a testing apparatus for an interface according to an embodiment of the present invention, the testing apparatus includes:
a tool packaging module 21, configured to install openpyxl, unittest, and Requests in Python, and package a use case opening tool class, a data reading tool class, a data writing tool class, a configuration file reading tool class, a log generation tool class, a mail sending tool class, and a call returning holding tool class in a target file;
the frame creating module 22 is configured to read target test case data for testing the target interface by using openpyxl and Requests, and create a test frame for testing the target interface based on unittest;
the interface testing module 23 is configured to execute a target test case for testing the target interface by using a main function of the unit test under the testing framework, and call a case opening tool class, a data reading tool class, a data writing tool class, a configuration file reading tool class, a log generation tool class, a mail sending tool class and a call back holding tool class to test the target interface; and generating the target test case by the target test case data.
The interface testing device provided by the embodiment of the invention has the beneficial effects of the interface testing method disclosed by the embodiment.
Referring to fig. 4, fig. 4 is a structural diagram of a testing apparatus of an interface according to an embodiment of the present invention, where the testing apparatus includes:
a memory 31 for storing a computer program;
a processor 32 for implementing the steps of the method for testing an interface as disclosed in the foregoing when executing the computer program.
The interface testing equipment provided by the embodiment of the invention has the beneficial effects of the interface testing method disclosed by the embodiment.
Correspondingly, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the method for testing an interface disclosed in the foregoing.
The computer-readable storage medium provided by the embodiment of the invention has the beneficial effects of the interface testing method disclosed in the foregoing.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method, the device, the equipment and the medium for testing the interface provided by the invention are described in detail, a specific example is applied in the text to explain the principle and the implementation mode of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
Claims (9)
1. A method for testing an interface, comprising:
installing openpyxl, unittest and Requests in Python, and packaging a use case opening tool class, a data reading tool class, a data writing tool class, a configuration file reading tool class, a log generation tool class, a mail sending tool class and a call returning holding tool class in a target file;
reading target test case data for testing a target interface by using the openpyxl and the Requests, and creating a test framework for testing the target interface based on the unittest;
under the test framework, executing a target test case for testing the target interface by using a main function of the unittest, and calling the case opening tool class, the data reading tool class, the data writing tool class, the configuration file reading tool class, the log generation tool class, the mail sending tool class and the call back holding tool class to test the target interface; and generating the target test case by the target test case data.
2. The test method according to claim 1, wherein the process of installing openpyxl, unittest and Requests in Python comprises:
installing the openpyxl, the unittest, and the Requests in the Python using pip install.
3. The method according to claim 1, wherein the process of encapsulating the use case opening tool class, the data reading tool class, the data writing tool class, the configuration file reading tool class, the log generation tool class, the mail sending tool class and the call back holding tool class in the target file comprises:
packaging the data reading tool class used for reading the target test case data by using the openpyxl;
packaging the configuration file reading tool class for reading the configuration file by using the ConfigParser library of the Python;
packaging the log generation tool class for generating the log by using the logging library of the Python;
and packaging the mail sending tool class for sending the mail by utilizing the smtplib library and the email library of the Python.
4. The testing method of claim 1, wherein the target test case data comprises: interface name, request method, request parameters, request header, interface address, and expected result of the test case.
5. The method according to claim 1, wherein the reading target test case data for testing a target interface using the openpyxl and the Requests comprises:
and reading example data in an Excel format from an interface api document of a target cloud platform by using the openpyxl and the Reqursts, and generating the target test case data for testing the target interface by using the example data.
6. The test method according to any one of claims 1 to 5, further comprising:
and installing pytest in the Python, and generating a test report of the target interface by using the plug-in html test Runner of the pytest.
7. An apparatus for testing an interface, comprising:
the tool packaging module is used for installing openpyxl, unittest and Requests in Python and packaging a use case opening tool class, a data reading tool class, a data writing tool class, a configuration file reading tool class, a log generation tool class, a mail sending tool class and a call returning holding tool class in a target file;
the frame creating module is used for reading target test case data for testing a target interface by using the openpyxl and the Requests and creating a test frame for testing the target interface based on the unittest;
an interface test module, configured to execute a target test case for testing the target interface by using a main function of the unit test under the test framework, and call the case opening tool class, the data reading tool class, the data writing tool class, the configuration file reading tool class, the log generation tool class, the mail sending tool class, and the call back holding tool class to test the target interface; and generating the target test case by the target test case data.
8. A test apparatus for an interface, comprising:
a memory for storing a computer program;
processor for implementing the steps of a method for testing an interface according to any one of claims 1 to 6 when executing said computer program.
9. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the method for testing an interface according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111128392.6A CN113778896A (en) | 2021-09-26 | 2021-09-26 | Interface test method, device, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111128392.6A CN113778896A (en) | 2021-09-26 | 2021-09-26 | Interface test method, device, equipment and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113778896A true CN113778896A (en) | 2021-12-10 |
Family
ID=78853395
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111128392.6A Withdrawn CN113778896A (en) | 2021-09-26 | 2021-09-26 | Interface test method, device, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113778896A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115374018A (en) * | 2022-10-26 | 2022-11-22 | 四川蜀天信息技术有限公司 | Automatic interface testing method and device |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140075242A1 (en) * | 2012-09-07 | 2014-03-13 | Elena Dolinina | Testing rest api applications |
CN108628748A (en) * | 2018-05-09 | 2018-10-09 | 平安普惠企业管理有限公司 | Automatic test management method and automatic test manage system |
CN109408357A (en) * | 2017-12-04 | 2019-03-01 | 深圳市珍爱网信息技术有限公司 | A kind of automatic interface testing method and device |
CN109582517A (en) * | 2018-12-04 | 2019-04-05 | 郑州云海信息技术有限公司 | System application automated testing method, device, system and tool storage end |
CN110245083A (en) * | 2019-06-11 | 2019-09-17 | 四川长虹电器股份有限公司 | A kind of automatic interface testing method based on python |
CN112306861A (en) * | 2020-09-27 | 2021-02-02 | 泰山信息科技有限公司 | Unittest and Jenkins tool-based interface automatic testing system and method |
CN112486811A (en) * | 2020-11-26 | 2021-03-12 | 杭州安恒信息技术股份有限公司 | Interface test method, device, equipment and medium |
-
2021
- 2021-09-26 CN CN202111128392.6A patent/CN113778896A/en not_active Withdrawn
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140075242A1 (en) * | 2012-09-07 | 2014-03-13 | Elena Dolinina | Testing rest api applications |
CN109408357A (en) * | 2017-12-04 | 2019-03-01 | 深圳市珍爱网信息技术有限公司 | A kind of automatic interface testing method and device |
CN108628748A (en) * | 2018-05-09 | 2018-10-09 | 平安普惠企业管理有限公司 | Automatic test management method and automatic test manage system |
CN109582517A (en) * | 2018-12-04 | 2019-04-05 | 郑州云海信息技术有限公司 | System application automated testing method, device, system and tool storage end |
CN110245083A (en) * | 2019-06-11 | 2019-09-17 | 四川长虹电器股份有限公司 | A kind of automatic interface testing method based on python |
CN112306861A (en) * | 2020-09-27 | 2021-02-02 | 泰山信息科技有限公司 | Unittest and Jenkins tool-based interface automatic testing system and method |
CN112486811A (en) * | 2020-11-26 | 2021-03-12 | 杭州安恒信息技术股份有限公司 | Interface test method, device, equipment and medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115374018A (en) * | 2022-10-26 | 2022-11-22 | 四川蜀天信息技术有限公司 | Automatic interface testing method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111027295B (en) | Data processing method, device, computer equipment and storage medium | |
CN109684847B (en) | Automatic repairing method, device, equipment and storage medium for script loopholes | |
CN109857404B (en) | SDK interface packaging method and device, storage medium and electronic equipment | |
CN110457556B (en) | Distributed crawler system architecture, method for crawling data and computer equipment | |
CN109062806B (en) | Program testing method, system, device and computer readable storage medium | |
CN104125197A (en) | Security baseline system and method thereof for implementing security checks | |
CN108038039B (en) | Method for recording log and micro-service system | |
CN110727560A (en) | Cloud service alarm method and device | |
CN104281520A (en) | Tracking and debugging method, device and system | |
CN112698820B (en) | Unified monitoring management method and device for memory and switch and computer equipment | |
CN108073506A (en) | Test method and device | |
CN113778896A (en) | Interface test method, device, equipment and medium | |
CN110659186A (en) | Alarm information reporting method and device | |
CN113114794A (en) | Method and device for processing domain name based on secondary proxy | |
CN113704790A (en) | Abnormal log information summarizing method and computer equipment | |
CN111723019A (en) | Interface debugging method and system | |
CN114168421A (en) | Customized code compatibility analysis system and method based on micro-service call chain | |
CN116011753A (en) | Method and device for realizing direct dispatch monitoring reminding of fault worksheet based on RPA robot | |
CN104320415B (en) | A kind of substation equipment kinematic insert formula specification analytic method | |
CN110390008A (en) | Report method for pushing, device, computer equipment and storage medium | |
CN110620819A (en) | Block chain interaction method and device, computer equipment and readable storage medium | |
CN111526028A (en) | Data processing method, device and equipment | |
US20080109527A1 (en) | System method and program for managing browser scripts sent from server to client | |
CN111404782B (en) | Terminal test method and device, computing equipment and storage medium | |
CN110457183A (en) | A kind of log processing 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 | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20211210 |