CN112433946A - Interface test management method, device, equipment and storage medium - Google Patents

Interface test management method, device, equipment and storage medium Download PDF

Info

Publication number
CN112433946A
CN112433946A CN202011354747.9A CN202011354747A CN112433946A CN 112433946 A CN112433946 A CN 112433946A CN 202011354747 A CN202011354747 A CN 202011354747A CN 112433946 A CN112433946 A CN 112433946A
Authority
CN
China
Prior art keywords
interface
test
tested
application interface
testing
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
CN202011354747.9A
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.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202011354747.9A priority Critical patent/CN112433946A/en
Publication of CN112433946A publication Critical patent/CN112433946A/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

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)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides an interface test management method, an interface test management device, equipment and a storage medium, wherein the interface test management method comprises the following steps: and connecting an application interface library to obtain the application interface to be tested, wherein the application interface library is used for storing the application interface to be tested, receiving a first test request, testing the application interface to be tested according to the first test request, obtaining an interface test result, obtaining a function interface to be tested according to the application interface to be tested when the interface test result is that the test is passed, receiving a second test request, and testing the function interface to be tested according to the second test request. By the method, the invention can achieve the purposes of improving the test efficiency in the whole software test process and reducing the positioning cost of software problems.

Description

Interface test management method, device, equipment and storage medium
Technical Field
The present invention relates to the field of research and development management technologies, and in particular, to a method, an apparatus, a device, and a storage medium for interface test management.
Background
With the continuous development of science and technology, more and more electronic products flood the daily life of people, and the essential component in the electronic products is software. In order to meet the different requirements of different people on software, software developers develop more and more targeted software products.
In order to improve the module weak coupling, code reusability and development efficiency of software products, an application interface API is usually used to provide the capability of accessing a set of routines based on certain software or hardware for application programs and developers, without accessing source codes or understanding details of internal working mechanisms.
In order to ensure that the functions and the performances of the software product meet the requirements of customers, the software product needs to be subjected to software testing before being put into use so as to judge the correctness of the functions and the stability of the performances of the software product. At present, software testing personnel mainly perform system testing on functions, performances and the like of software, and for software problems caused by problems of application interface API, problems are found and positioned according to the functions and the performance testing, a large amount of testing workload is usually needed to find the problems, modify the problems and verify the problems, so that much time and labor are consumed, and the labor cost of software development is increased.
Disclosure of Invention
The invention provides an interface test management method, device, equipment and storage medium, which can achieve the purposes of improving the test efficiency in the whole software test process and reducing the positioning cost of software problems.
In order to solve the technical problems, the invention adopts a technical scheme that: an interface test management method is provided, and the interface test management method comprises the following steps:
connecting an application interface library to obtain the application interface to be tested, wherein the application interface library is used for storing the application interface to be tested, and the application interface to be tested is a software function interface;
receiving a first test request, wherein the first test request is used for specifying an application interface to be tested, which needs to be tested, testing the application interface to be tested according to the first test request, and acquiring an interface test result, wherein the interface test result is used for indicating whether the application interface to be tested passes the test;
when the interface test result is that the test is passed, acquiring a function interface to be tested according to the application interface to be tested, wherein the function interface to be tested is a software function interface for calling the application interface to be tested;
receiving a second test request, wherein the second test request is used for selecting at least one to-be-tested function interface calling the to-be-tested application interface;
and testing the functional interface to be tested according to the second test request.
According to an embodiment of the present invention, the first test request includes a test environment and interface parameters, and the testing the application interface to be tested according to the first test request and obtaining an interface test result includes:
selecting an operating environment of the application interface to be tested according to the testing environment of the first testing request;
packaging the interface parameters of the first test request into a first test instruction according to a preset format, and testing the application interface to be tested according to the first test instruction;
and receiving the interface test result returned according to the first test instruction.
According to an embodiment of the present invention, the interface test management method further includes:
generating a first test case according to the corresponding interface parameters in the first test request;
testing the application interface to be tested according to the first test case, and acquiring a case test result;
and if the case test result is the same as the interface test result, storing the first test case.
According to an embodiment of the present invention, the first test request includes a test environment and a test case, and the testing the application interface to be tested according to the first test request and obtaining an interface test result includes:
selecting an operating environment of the application interface to be tested according to the testing environment of the first testing request;
generating a first test instruction according to the test case of the first test request, and testing the application interface to be tested according to the first test instruction;
and receiving the interface test result returned according to the first test instruction.
According to an embodiment of the present invention, after obtaining the functional interface to be tested according to the application interface to be tested when the interface test result is that the test passes, the method further includes:
setting the application interface to be tested to be in a locked state, so that the application interface to be tested in the locked state cannot execute editing or deleting operation; and are
Generating and storing an interface document of the application interface to be tested, wherein the interface document comprises test information of the application interface to be tested, and the test information comprises an interface test result for testing the application interface to be tested according to the first test request.
According to an embodiment of the present invention, after obtaining the functional interface to be tested according to the application interface to be tested when the interface test result is that the test passes, the method further includes:
and setting the functional interface to be tested to be in a testable state so that the functional interface to be tested in the testable state can receive the second test request.
According to an embodiment of the present invention, before obtaining the functional interface to be tested according to the application interface to be tested when the interface test result is that the test passes, the method further includes:
receiving feedback information, wherein the feedback information is return information of whether to accept the interface test result of the application interface to be tested, and the feedback information is used for indicating whether to accept the transfer test from the application interface to be tested to the functional interface to be tested;
if the feedback information is not to accept the transfer test from the application interface to be tested to the functional interface to be tested, setting the application interface to be tested to be in a non-locking state so that the application interface to be tested in the non-locking state can execute editing or deleting operation, and setting the functional interface to be tested to be in a non-testable state so that the functional interface to be tested in the non-testable state cannot receive the second test request.
In addition, in order to solve the above technical problems, the present invention further adopts a technical solution in which: there is provided an interface test management apparatus including:
the acquisition module is used for connecting an application interface library to acquire the application interface to be tested, the application interface library is used for storing the application interface to be tested, and the application interface to be tested is a software function interface;
the device comprises a first testing module, a second testing module and a control module, wherein the first testing module is used for receiving a first testing request, the first testing request is used for appointing an application interface to be tested, the application interface to be tested is tested according to the first testing request, and an interface testing result is obtained and used for indicating whether the application interface to be tested passes the testing;
the second testing module is used for acquiring a to-be-tested function interface according to the to-be-tested application interface when the interface testing result is that the test is passed, wherein the to-be-tested function interface is a software function interface for calling the to-be-tested application interface;
receiving a second test request, wherein the second test request is used for selecting at least one to-be-tested function interface calling the to-be-tested application interface;
and testing the functional interface to be tested according to the second test request.
In addition, in order to solve the above technical problems, the present invention further adopts a technical solution in which: there is provided an interface test management device comprising a processor, a memory coupled to the processor, wherein the memory has stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the steps of the interface test management method of any one of the above.
In addition, in order to solve the above technical problems, the present invention further adopts a technical solution in which: there is provided a storage medium having stored thereon computer readable instructions which, when executed by one or more processors, cause the one or more processors to carry out the steps of the interface test management method according to any one of the preceding claims.
According to the interface test management method, the device, the equipment and the storage medium, the interface test result of the application interface is obtained by testing the application interface to be tested, the function interface to be tested is obtained according to the application interface to be tested, the function interface to be tested is tested, the software interface is tested from two stages of the application interface and the function interface, the delivery quality of the application interface to be tested can be improved in the application interface test stage, the test efficiency of the function interface to be tested is improved, the test efficiency in the whole software test process is improved, the workload of finding problems, modifying problems and verifying problems in the test process of the function interface to be tested is reduced, and the positioning cost of software problems is reduced.
Furthermore, a user can select a test environment for the application interface to be tested through the first test request, and set the interface parameters according to test requirements and test strategies, so that the test coverage of the application interface to be tested is more comprehensive.
Furthermore, after the test of the application interface to be tested is completed according to the interface parameters, the interface parameters can be formed into the first test case and stored, so that the first test case can be conveniently and directly used subsequently, the test process is simplified, the test efficiency is improved, and the test process can be automated.
Furthermore, the user can directly select a test case to test the application interface to be tested through the first test request without resetting parameters, so that the test efficiency is improved, and the test process can be automated.
Further, after the application interface to be tested passes the test, the application interface to be tested is set to be in a locked state, so that the application interface can not be edited or deleted, and the consistency of the front test and the back test of the application interface to be tested is ensured.
Furthermore, a user can indicate whether to accept the to-be-tested application interface to be tested through feedback information, and when the to-be-tested application interface is not accepted to be tested, the to-be-tested application interface can be modified by setting the to-be-tested application interface to be in a non-locked state, so that the to-be-tested application interface can continue to carry out testing, the user can autonomously judge whether to accept the to-be-tested, and user experience is improved.
Furthermore, after the test of the application interface to be tested passes, an interface document of the application interface to be tested is generated and stored, so that document reference can be provided for the subsequent test of the functional interface to be tested, and the user experience is improved.
Furthermore, after the interface test result is that the test is passed, the to-be-tested functional interface is set to be in a testable state, so that the to-be-tested functional interface using the to-be-tested application interface is subjected to open test, the functional interface to be tested is prevented from being mistakenly selected by misoperation of a user, the consistency and the correctness of the test process are ensured, and the test efficiency is improved.
Drawings
FIG. 1 is a flow chart illustrating an interface test management method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an interface test management apparatus according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an interface test management device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a storage medium according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, 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 application.
The terms "first", "second" and "third" in this application are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any indication of the number of technical features indicated. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of the feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless explicitly specifically limited otherwise. All directional indications (such as up, down, left, right, front, and rear … …) in the embodiments of the present application are only used to explain the relative positional relationship between the components, the movement, and the like in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indication is changed accordingly. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
Referring to fig. 1, fig. 1 is a flow chart illustrating an interface test management method according to an embodiment of the present invention. The interface test management method can be applied to a test management system, the test management system can be a test management platform, a local test management server and a cloud server, the test management system can comprise the management of the whole test process and can also be the management of partial test processes, the interface test management method can be used as a part inserted into the whole test management process to manage the interface test and can also be used as a complete test process to manage the interface test. According to an embodiment of the present invention, the interface test management method includes the following steps:
step S101: and connecting an application interface library to obtain the application interface to be tested, wherein the application interface library is used for storing the application interface to be tested, and the application interface to be tested is a software function interface.
An Application Programming Interface (API) is a predefined function, and aims to provide capabilities for an Application program and a developer to access a set of routines based on certain software or hardware without accessing source codes or understanding details of an internal working mechanism, and software functions can be realized more conveniently by calling the API, so that the correctness of the API determines the correctness of the software to a certain extent. In step S101, the application interface to be tested may be imported into an application interface library for library storage after the development is completed, and the application interface to be tested is read by connecting to the application interface library. The application interface library can be a database in the test management system or other external databases, and the test management system can be in data communication with the external databases through network protocols and network connection, so that the application interface to be tested is read.
Step S102: receiving a first test request, wherein the first test request is used for specifying an application interface to be tested, which needs to be tested, testing the application interface to be tested according to the first test request, and obtaining an interface test result, and the interface test result is used for indicating whether the application interface to be tested passes the test.
The application interface library is stored with at least one application interface to be tested, a user can select the application interface to be tested according to a test requirement and send a first test request to the test management system, the first test request is used for designating the application interface to be tested, after receiving the first test request, the test management system extracts the application interface to be tested according to the first test request and carries out a test, so as to obtain an interface test result of the application interface to be tested, the application interface API is a plurality of predefined functions, the application interface API can be used as a function to calculate and output an operation result, when the operation result output by the application interface API is in accordance with the function expected result, the application interface API can be considered to be correctly realized, therefore, when the application interface to be tested can correctly complete the interface function in the test process, and the interface test result is that the test is passed.
According to an embodiment of the present invention, the first test request includes a test environment, and the interface parameter step S102 may further include the steps of:
step S11: and selecting the running environment of the application interface to be tested according to the testing environment of the first testing request. The operation environment is a software environment and a hardware environment in which software operates, it can be understood that, in the process of testing the application interface to be tested, the software environment may be a stub function or a driver function, etc. on which the application interface depends, the hardware environment is a hardware configuration environment required by the operation of the application interface, and a specific operation environment may be selected for the application interface to be tested by selecting the test environment.
Step S12: and packaging the interface parameters of the first test request into a first test instruction according to a preset format, and testing the application interface to be tested according to the first test instruction.
The interface parameters may be typical test inputs obtained according to test strategies and other previous test analyses, and specifically, for different interfaces of the application to be tested, the formats of the input parameters may be different, and after the interface parameters are obtained, the interface parameters may be encapsulated into a first test instruction according to a preset format corresponding to the preset application interface to be tested to test the application interface to be tested, the preset format for encapsulating the interface parameters into the first test instruction may be a REST assisted language format, where REST assisted is a Java DSL that can simplify the test process of the HTTP Builder top layer based on REST service, and is a computer programming language with limited expressiveness, initiation of POST, GET, PUT, DELETE, OPTIONS, PATCH, and HEAD requests may be supported and may be used to verify and collate response information for these requests.
Step S13: and receiving the interface test result returned according to the first test instruction.
And after the application interface to be tested operates according to the first test instruction in the corresponding test environment, comparing an operation result with a function expected result, and returning the comparison result serving as the interface test result to the test management system. For example: the method comprises the steps that the application interface to be tested is a certain get request, a returned result comprises a lotted value, a function expected result of the application interface to be tested is a lotted value of 5, a first test instruction can be packaged as get ("/lotto"). the n (). body ("lotto.
In this embodiment, the interface parameters are packaged into the first test instruction in the preset format to test the application interfaces to be tested, and a user does not need to care about the request format of each application interface to be tested, and only needs to input the interface parameters to be tested, so that the test process is simplified, and the user experience is improved.
On the basis of the above embodiment, according to another embodiment of the present invention, the interface test management method may further include the following steps:
step S14: and generating a first test case according to the corresponding interface parameters in the first test request.
In this embodiment, a first test case may be generated according to the interface parameter corresponding to the first test request as an input, and it may be understood that, in the process of testing the application interface to be tested, according to a test policy, a plurality of interface parameters may be provided, such as a boundary value, a normal value, and an abnormal value, that is, the first test request may be input multiple times, and the test management system may record the interface parameter in each first test request and generate the corresponding first test case.
Step S15: and testing the application interface to be tested according to the first test case, and acquiring a case test result.
Specifically, after the first test case is generated, the application interface to be tested is tested according to the first test case, that is, interface parameters in the case are extracted, then the interface parameters are packaged into the first test instruction according to a preset format, the application interface to be tested is tested according to the first test instruction, meanwhile, a feedback result of the first test instruction is received, the case test result is generated according to whether the feedback result meets a function expected result, and the case test result is used for indicating whether the first test case passes the test.
Step S16: and if the case test result is the same as the interface test result, storing the first test case.
And for the same application interface to be tested, testing according to the interface parameters and testing according to the first test case, wherein under the condition that the first test case is correctly generated, the test results of the first test case are the same, so that when the case test result is the same as the interface test result, the first test case is stored. And after the first test case is generated, the first test case can be stored in a database of the test management system, and can also be sent to an external database through network connection and a network protocol for storage. In the embodiment, the interface parameters input by the user are formed into the first test case and stored, so that the first test case can be conveniently and directly used for testing in the subsequent testing process, the testing efficiency is improved, and the testing process can be automated.
According to another embodiment of the present invention, the first test request may include a test environment and a test environment, and step S102 may further include the following steps:
step S21: and selecting the running environment of the application interface to be tested according to the testing environment of the first testing request.
Step S21 is similar to step S11 and will not be described here.
Step S22: and generating a first test instruction according to the test case of the first test request, and testing the application interface to be tested according to the first test instruction.
Specifically, the user may select the test case for testing the application interface to be tested in the first test request, after receiving the first test request, the test management system obtains the test case from the first test request, then encapsulates the interface parameters into the first test instruction according to a preset format, and tests the application interface to be tested according to the first test instruction, and it can be understood that the interface parameters in the test case may be typical test inputs obtained according to previous test analysis such as a test policy.
Step S23: and receiving the interface test result returned according to the first test instruction.
Meanwhile, a feedback result of the first test command is received, and the interface test result is generated according to whether the feedback result satisfies a function expected result, where step S23 is similar to step S13 and is not repeated here.
In the embodiment, the user can test the application interface to be tested by selecting the test case without resetting parameters, so that the test efficiency is improved, and the test process can be automated.
Step S103: and when the interface test result is that the test is passed, acquiring a function interface to be tested according to the application interface to be tested, wherein the function interface to be tested is a software function interface for calling the application interface to be tested. Generally, a software test needs to completely verify the function, performance and the like of the whole software, so that the application interface to be tested also needs to perform test flows such as an integration test, a software function test and the like in the complete software test flow. It is understood that the functional interface is a combination of at least one application interface, and a complete software function can be completed by calling the functional interface, rather than a function of one application interface, for example, one application interface function may be to inquire a recipient address, and one functional interface may be to send a mail to the recipient, and the functional interface needs to call the application interface to inquire the recipient address when implementing the function of sending the mail to the recipient. In this embodiment, when the interface test result of the application interface to be tested is that the test is passed, the corresponding functional interface to be tested may be obtained according to the call relationship of the application interface to be tested that the test is passed.
According to another embodiment of the present invention, step S103 may be followed by the following steps:
step S31: and setting the to-be-tested application interface to be in a locked state, so that the to-be-tested application interface in the locked state cannot execute editing or deleting operation.
Specifically, after the application interface to be tested passes the test, in order to ensure that the application interface to be tested is not modified or deleted, the application interface to be tested may be set to a locked state, and the application interface to be tested in the locked state cannot perform an editing or deleting operation.
In this embodiment, the application interface to be tested is set to the locked state, so that the application interface to be tested is not modified in the back-end testing process, and the consistency of the testing process and the effectiveness of the testing are ensured.
Step S32: generating and storing an interface document of the application interface to be tested, wherein the interface document comprises test information of the application interface to be tested, and the test information comprises an interface test result for testing the application interface to be tested according to the first test request.
Meanwhile, after the application interface to be tested passes the test, an interface document of the application interface to be tested may be generated and stored in a database of the test management system or other remote databases, for example, the interface document may be stored in an application interface library together with the application interface to be tested, the interface document may include test information of the application interface to be tested, the test information includes an interface test result of the application interface to be tested according to the first test request, and a test reference may be performed in a subsequent test process according to the interface document.
Step S104: and receiving a second test request, wherein the second test request is used for selecting at least one function interface to be tested calling the application interface to be tested.
In the implementation of software functions, usually one application interface may be called by a plurality of function interfaces, so when the function interface to be tested corresponding to the application interface to be tested, whose interface test result is that the test is passed, is tested, the second test request sent by the user may be received, and at least one function interface to be tested calling the application interface to be tested is selected through the second test request.
According to another embodiment of the present invention, step S104 may further include the following steps:
step S41: and setting the functional interface to be tested to be in a testable state so that the functional interface to be tested in the testable state can receive the second test request.
In order to enable a user to accurately and quickly select the functional interface to be tested, the functional interface to be tested corresponding to the application interface to be tested can be set to be in a testable state after the application interface to be tested is tested, and only the functional interface to be tested in the testable state can receive the second test request, so that the test effectiveness is ensured, and the misoperation in the test process is reduced.
Step S105: and testing the functional interface to be tested according to the second test request.
And testing the function, performance and the like of the to-be-tested function interface calling the to-be-tested application interface passing the test according to the second test request.
In the interface test management method of the embodiment, an interface test result of the application interface is obtained by testing the application interface to be tested, the functional interface to be tested is obtained according to the application interface to be tested, the functional interface to be tested is tested, and the software interface is tested from two stages of the application interface and the functional interface.
According to an embodiment of the present invention, the interface test management method further includes:
step S51: and receiving feedback information, wherein the feedback information is return information of whether to accept the interface test result of the application interface to be tested, and the feedback information is used for indicating whether to accept the transfer test from the application interface to be tested to the functional interface to be tested.
After the test of the application interface to be tested is completed, the user can determine whether to receive the interface test result of the application interface to be tested through the feedback information so as to carry out the test of the function interface to be tested.
Step S52: if the feedback information is not to accept the transfer test from the application interface to be tested to the functional interface to be tested, setting the application interface to be tested to be in a non-locking state so that the application interface to be tested in the non-locking state can execute editing or deleting operation, and setting the functional interface to be tested to be in a non-testable state so that the functional interface to be tested in the non-testable state cannot receive the second test request.
If the feedback information indicates that the interface test result of the application interface to be tested is not received and the test of the functional interface to be tested is not approved to be carried out, the application interface to be tested is reset to be in the non-locking state, so that the application interface to be tested in the non-locking state can execute editing or deleting operation, and meanwhile, the functional interface to be tested can be set to be in the non-testing state, so that the functional interface to be tested in the non-testing state cannot receive the second test request.
In this embodiment, a user may indicate whether to accept the to-be-tested application interface to perform the transfer test through feedback information, and when the to-be-tested application interface is not accepted to perform the transfer test, the to-be-tested application interface may be modified by setting the to-be-tested application interface to be in a non-locked state, so that the to-be-tested application interface may continue to perform the test, and the user may autonomously determine whether to accept the transfer test, thereby improving user experience.
Fig. 2 is a schematic structural diagram of the interface test management apparatus 1 according to an embodiment of the present invention. As shown in fig. 2, the interface test management apparatus 1 includes an obtaining module 11, a first testing module 12 and a second testing module 13.
An obtaining module 11, configured to connect an application interface library to obtain the application interface to be tested, where the application interface library is used to store the application interface to be tested, and the application interface to be tested is a software function interface;
the first testing module 12 is configured to receive a first testing request, where the first testing request is used to specify an application interface to be tested, test the application interface to be tested according to the first testing request, and obtain an interface testing result, where the interface testing result is used to indicate whether the application interface to be tested passes the test;
the second testing module 13 is configured to, when the interface testing result is that the test is passed, obtain a to-be-tested function interface according to the to-be-tested application interface, where the to-be-tested function interface is a software function interface for calling the to-be-tested application interface; receiving a second test request, wherein the second test request is used for selecting at least one to-be-tested function interface calling the to-be-tested application interface; and testing the functional interface to be tested according to the second test request.
According to an embodiment of the present invention, the test parameters include a test environment and interface parameters, and the first test module 12 is further configured to select an operating environment of the application interface to be tested according to the test environment of the first test request; packaging the interface parameters of the first test request into a first test instruction according to a preset format, and testing the application interface to be tested according to the first test instruction; and receiving the interface test result returned according to the first test instruction.
According to an embodiment of the present invention, the first test module 12 may be further configured to generate a first test case according to the interface parameter corresponding to the first test request; and testing the application interface to be tested according to the first test case, and storing the first test case if the case test result is the same as the interface test result.
According to an embodiment of the present invention, the test parameters include a test environment and a test case, and the first test module 12 may be further configured to select an operation environment of the application interface to be tested according to the test environment of the first test request; generating a first test instruction according to the test case of the first test request, and testing the application interface to be tested according to the first test instruction; and receiving the interface test result returned according to the first test instruction.
According to an embodiment of the present invention, the first testing module 12 may be further configured to set the application interface to be tested to be in a locked state, so that the application interface to be tested in the locked state cannot perform an editing or deleting operation; and generating and storing an interface document of the application interface to be tested, wherein the interface document comprises test information of the application interface to be tested, and the test information comprises an interface test result for testing the application interface to be tested according to the first test request.
According to an embodiment of the present invention, the second testing module 13 may be further configured to set the functional interface to be tested to be in a testable state, so that the functional interface to be tested in the testable state can receive the second testing request.
According to an embodiment of the present invention, the first testing module 12 may be further configured to receive feedback information, where the feedback information is return information of whether to accept the interface testing result of the application interface to be tested, and the feedback information is used to indicate whether to accept a transfer test from the application interface to be tested to the functional interface to be tested; and if the feedback information is not to accept the transfer test from the application interface to be tested to the functional interface to be tested, setting the application interface to be tested to be in a non-locking state so that the application interface to be tested in the non-locking state can execute editing or deleting operation.
According to an embodiment of the present invention, the first testing module 12 may be further configured to set the functional interface to be tested to be in a non-testable state if the feedback information indicates that the transfer test from the application interface to be tested to the functional interface to be tested is not accepted, so that the functional interface to be tested in the non-testable state cannot receive the second test request.
It can be understood that specific ways for implementing the functions by the modules of the apparatus may refer to the specific steps corresponding to the above embodiments, and therefore, the detailed description thereof is omitted here.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an interface test management apparatus 30 according to an embodiment of the present invention. As shown in fig. 3, the interface test management apparatus 30 includes a memory 32, a processor 31, and a computer program stored on the memory 32 and executable on the processor 31, and the processor 31 implements the following steps when executing the computer program: connecting an application interface library to obtain the application interface to be tested, wherein the application interface library is used for storing the application interface to be tested, and the application interface to be tested is a software function interface; receiving a first test request, wherein the first test request is used for specifying an application interface to be tested, which needs to be tested, testing the application interface to be tested according to the first test request, and acquiring an interface test result, wherein the interface test result is used for indicating whether the application interface to be tested passes the test; when the interface test result is that the test is passed, acquiring a function interface to be tested according to the application interface to be tested, wherein the function interface to be tested is a software function interface for calling the application interface to be tested; receiving a second test request, wherein the second test request is used for selecting at least one to-be-tested function interface calling the to-be-tested application interface; and testing the functional interface to be tested according to the second test request.
According to an embodiment of the present invention, the first test request includes a test environment and interface parameters, and the testing the application interface to be tested according to the first test request and obtaining an interface test result includes: selecting an operating environment of the application interface to be tested according to the testing environment of the first testing request; packaging the interface parameters of the first test request into a first test instruction according to a preset format, and testing the application interface to be tested according to the first test instruction; and receiving the interface test result returned according to the first test instruction.
According to an embodiment of the present invention, the interface test management method further includes: generating a first test case according to the corresponding interface parameters in the first test request; testing the application interface to be tested according to the first test case, and acquiring a case test result; and if the case test result is the same as the interface test result, storing the first test case.
According to an embodiment of the present invention, the first test request includes a test environment and a test case, and the testing the application interface to be tested according to the first test request and obtaining an interface test result includes: selecting an operating environment of the application interface to be tested according to the testing environment of the first testing request; generating a first test instruction according to the test case of the first test request, and testing the application interface to be tested according to the first test instruction; and receiving the interface test result returned according to the first test instruction.
According to an embodiment of the present invention, after obtaining the functional interface to be tested according to the application interface to be tested when the interface test result is that the test passes, the method further includes: setting the application interface to be tested to be in a locked state, so that the application interface to be tested in the locked state cannot execute editing or deleting operation; and generating and storing an interface document of the application interface to be tested, wherein the interface document comprises test information of the application interface to be tested, and the test information comprises an interface test result for testing the application interface to be tested according to the first test request.
According to an embodiment of the present invention, after obtaining the functional interface to be tested according to the application interface to be tested when the interface test result is that the test passes, the method further includes: and setting the functional interface to be tested to be in a testable state so that the functional interface to be tested in the testable state can receive the second test request.
According to an embodiment of the present invention, before obtaining the functional interface to be tested according to the application interface to be tested when the interface test result is that the test passes, the method further includes: receiving feedback information, wherein the feedback information is return information of whether to accept the interface test result of the application interface to be tested, and the feedback information is used for indicating whether to accept the transfer test from the application interface to be tested to the functional interface to be tested; if the feedback information is not to accept the transfer test from the application interface to be tested to the functional interface to be tested, setting the application interface to be tested to be in a non-locking state so that the application interface to be tested in the non-locking state can execute editing or deleting operation, and setting the functional interface to be tested to be in a non-testable state so that the functional interface to be tested in the non-testable state cannot receive the second test request.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a storage medium according to an embodiment of the invention. As shown in fig. 4, a storage medium storing computer readable instructions 41, the computer readable instructions 41, when executed by one or more processors, cause the one or more processors to perform the steps of:
connecting an application interface library to obtain the application interface to be tested, wherein the application interface library is used for storing the application interface to be tested, and the application interface to be tested is a software function interface; receiving a first test request, wherein the first test request is used for specifying an application interface to be tested, which needs to be tested, testing the application interface to be tested according to the first test request, and acquiring an interface test result, wherein the interface test result is used for indicating whether the application interface to be tested passes the test; when the interface test result is that the test is passed, acquiring a function interface to be tested according to the application interface to be tested, wherein the function interface to be tested is a software function interface for calling the application interface to be tested; receiving a second test request, wherein the second test request is used for selecting at least one to-be-tested function interface calling the to-be-tested application interface; and testing the functional interface to be tested according to the second test request.
According to an embodiment of the present invention, the first test request includes a test environment and interface parameters, and the testing the application interface to be tested according to the first test request and obtaining an interface test result includes: selecting an operating environment of the application interface to be tested according to the testing environment of the first testing request; packaging the interface parameters of the first test request into a first test instruction according to a preset format, and testing the application interface to be tested according to the first test instruction; and receiving the interface test result returned according to the first test instruction.
According to an embodiment of the present invention, the interface test management method further includes: generating a first test case according to the corresponding interface parameters in the first test request; testing the application interface to be tested according to the first test case, and acquiring a case test result; and if the case test result is the same as the interface test result, storing the first test case.
According to an embodiment of the present invention, the first test request includes a test environment and a test case, and the testing the application interface to be tested according to the first test request and obtaining an interface test result includes: selecting an operating environment of the application interface to be tested according to the testing environment of the first testing request; generating a first test instruction according to the test case of the first test request, and testing the application interface to be tested according to the first test instruction; and receiving the interface test result returned according to the first test instruction.
According to an embodiment of the present invention, after obtaining the functional interface to be tested according to the application interface to be tested when the interface test result is that the test passes, the method further includes: setting the application interface to be tested to be in a locked state, so that the application interface to be tested in the locked state cannot execute editing or deleting operation; and generating and storing an interface document of the application interface to be tested, wherein the interface document comprises test information of the application interface to be tested, and the test information comprises an interface test result for testing the application interface to be tested according to the first test request.
According to an embodiment of the present invention, after obtaining the functional interface to be tested according to the application interface to be tested when the interface test result is that the test passes, the method further includes: and setting the functional interface to be tested to be in a testable state so that the functional interface to be tested in the testable state can receive the second test request.
According to an embodiment of the present invention, before obtaining the functional interface to be tested according to the application interface to be tested when the interface test result is that the test passes, the method further includes: receiving feedback information, wherein the feedback information is return information of whether to accept the interface test result of the application interface to be tested, and the feedback information is used for indicating whether to accept the transfer test from the application interface to be tested to the functional interface to be tested; if the feedback information is not to accept the transfer test from the application interface to be tested to the functional interface to be tested, setting the application interface to be tested to be in a non-locking state so that the application interface to be tested in the non-locking state can execute editing or deleting operation, and setting the functional interface to be tested to be in a non-testable state so that the functional interface to be tested in the non-testable state cannot receive the second test request.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the computer program is executed. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An interface test management method, characterized in that the interface test management method comprises:
connecting an application interface library to obtain the application interface to be tested, wherein the application interface library is used for storing the application interface to be tested, and the application interface to be tested is a software function interface;
receiving a first test request, wherein the first test request is used for specifying an application interface to be tested, which needs to be tested, testing the application interface to be tested according to the first test request, and acquiring an interface test result, wherein the interface test result is used for indicating whether the application interface to be tested passes the test;
when the interface test result is that the test is passed, acquiring a function interface to be tested according to the application interface to be tested, wherein the function interface to be tested is a software function interface for calling the application interface to be tested;
receiving a second test request, wherein the second test request is used for selecting at least one to-be-tested function interface calling the to-be-tested application interface;
and testing the functional interface to be tested according to the second test request.
2. The interface test management method according to claim 1, wherein the first test request includes a test environment and interface parameters, and the testing the application interface to be tested according to the first test request and obtaining an interface test result includes:
selecting an operating environment of the application interface to be tested according to the testing environment of the first testing request;
packaging the interface parameters of the first test request into a first test instruction according to a preset format, and testing the application interface to be tested according to the first test instruction;
and receiving the interface test result returned according to the first test instruction.
3. The interface test management method of claim 2, wherein the interface test management method further comprises:
generating a first test case according to the corresponding interface parameters in the first test request;
testing the application interface to be tested according to the first test case, and acquiring a case test result;
and if the case test result is the same as the interface test result, storing the first test case.
4. The interface test management method according to claim 1, wherein the first test request includes a test environment and a test case, and the testing the application interface to be tested according to the first test request and obtaining an interface test result includes:
selecting an operating environment of the application interface to be tested according to the testing environment of the first testing request;
generating a first test instruction according to the test case of the first test request, and testing the application interface to be tested according to the first test instruction;
and receiving the interface test result returned according to the first test instruction.
5. The interface test management method according to claim 1, wherein after obtaining the functional interface to be tested according to the application interface to be tested when the interface test result is that the test passes, the method further comprises:
setting the application interface to be tested to be in a locked state, so that the application interface to be tested in the locked state cannot execute editing or deleting operation; and are
Generating and storing an interface document of the application interface to be tested, wherein the interface document comprises test information of the application interface to be tested, and the test information comprises an interface test result for testing the application interface to be tested according to the first test request.
6. The interface test management method according to claim 5, wherein after obtaining the functional interface to be tested according to the application interface to be tested when the interface test result is that the test passes, the method further comprises:
and setting the functional interface to be tested to be in a testable state so that the functional interface to be tested in the testable state can receive the second test request.
7. The interface test management method according to claim 6, wherein before obtaining the functional interface to be tested according to the application interface to be tested when the interface test result is that the test passes, the method further comprises:
receiving feedback information, wherein the feedback information is return information of whether to accept the interface test result of the application interface to be tested, and the feedback information is used for indicating whether to accept the transfer test from the application interface to be tested to the functional interface to be tested;
if the feedback information is not to accept the transfer test from the application interface to be tested to the functional interface to be tested, setting the application interface to be tested to be in a non-locking state so that the application interface to be tested in the non-locking state can execute editing or deleting operation, and setting the functional interface to be tested to be in a non-testable state so that the functional interface to be tested in the non-testable state cannot receive the second test request.
8. An interface test management apparatus, characterized in that the interface test management apparatus comprises:
the acquisition module is used for connecting an application interface library to acquire the application interface to be tested, the application interface library is used for storing the application interface to be tested, and the application interface to be tested is a software function interface;
the device comprises a first testing module, a second testing module and a control module, wherein the first testing module is used for receiving a first testing request, the first testing request is used for appointing an application interface to be tested, the application interface to be tested is tested according to the first testing request, and an interface testing result is obtained and used for indicating whether the application interface to be tested passes the testing;
the second testing module is used for acquiring a to-be-tested function interface according to the to-be-tested application interface when the interface testing result is that the test is passed, wherein the to-be-tested function interface is a software function interface for calling the to-be-tested application interface;
receiving a second test request, wherein the second test request is used for selecting at least one to-be-tested function interface calling the to-be-tested application interface;
and testing the functional interface to be tested according to the second test request.
9. An interface test management device comprising a processor, a memory coupled to the processor, wherein,
the memory has stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the steps of the interface test management method according to any one of claims 1 to 7.
10. A storage medium having stored thereon computer-readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the interface test management method according to any one of claims 1 to 7.
CN202011354747.9A 2020-11-26 2020-11-26 Interface test management method, device, equipment and storage medium Pending CN112433946A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011354747.9A CN112433946A (en) 2020-11-26 2020-11-26 Interface test management method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011354747.9A CN112433946A (en) 2020-11-26 2020-11-26 Interface test management method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112433946A true CN112433946A (en) 2021-03-02

Family

ID=74697919

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011354747.9A Pending CN112433946A (en) 2020-11-26 2020-11-26 Interface test management method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112433946A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656301A (en) * 2021-08-13 2021-11-16 北京锐安科技有限公司 Interface testing method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656301A (en) * 2021-08-13 2021-11-16 北京锐安科技有限公司 Interface testing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN105389256B (en) A kind of unit test method and system
CN111124906A (en) Tracking method, compiling method and device based on dynamic embedded points and electronic equipment
CN108628748B (en) Automatic test management method and automatic test management system
CN111158741B (en) Method and device for monitoring dependency relationship change of service module on third party class library
CN110502442B (en) Dynamic parameter checking method, device, equipment and storage medium
US11422917B2 (en) Deriving software application dependency trees for white-box testing
CN111538659B (en) Interface testing method, system, electronic equipment and storage medium of business scene
CN112241360A (en) Test case generation method, device, equipment and storage medium
CN113377667A (en) Scene-based testing method and device, computer equipment and storage medium
CN115757014A (en) Power consumption testing method and device
CN112559344A (en) Remote mock testing method and system
CN113778879A (en) Fuzzy test method and device for interface
CN111708712A (en) User behavior test case generation method, flow playback method and electronic equipment
CN111240981A (en) Interface testing method, system and platform
CN112433946A (en) Interface test management method, device, equipment and storage medium
CN117493188A (en) Interface testing method and device, electronic equipment and storage medium
CN109388420A (en) Application upgrade test method, device, computer equipment and storage medium
CN109101408B (en) Method and device for detecting service availability in joint debugging environment
CN115617668A (en) Compatibility testing method, device and equipment
CN114385493A (en) Performance test method and device, electronic equipment and storage medium
CN111400245B (en) Art resource migration method and device
CN117931666B (en) System and method for testing core framework of software radio communication equipment
CN112346994A (en) Test information correlation method and device, computer equipment and storage medium
CN111597101A (en) SDK access state detection method, computer device and computer readable storage medium
CN113608996B (en) Mirror image compiling test method, system, device and readable storage medium

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