CN112699023B - Project interface testing method and device, computer equipment and storage medium - Google Patents

Project interface testing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112699023B
CN112699023B CN202011566966.3A CN202011566966A CN112699023B CN 112699023 B CN112699023 B CN 112699023B CN 202011566966 A CN202011566966 A CN 202011566966A CN 112699023 B CN112699023 B CN 112699023B
Authority
CN
China
Prior art keywords
interface
instance
upstream
downstream
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.)
Active
Application number
CN202011566966.3A
Other languages
Chinese (zh)
Other versions
CN112699023A (en
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.)
Shenzhen Bincent Technology Co Ltd
Original Assignee
Shenzhen Bincent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Bincent Technology Co Ltd filed Critical Shenzhen Bincent Technology Co Ltd
Priority to CN202011566966.3A priority Critical patent/CN112699023B/en
Publication of CN112699023A publication Critical patent/CN112699023A/en
Application granted granted Critical
Publication of CN112699023B publication Critical patent/CN112699023B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the technical field of interface testing, and discloses a project interface testing method, a project interface testing device, computer equipment and a storage medium. The method comprises the steps of obtaining original interface information associated with an interface to be tested; the original interface information comprises an upstream interface associated with the interface to be tested and an upstream original instance associated with the upstream interface; the method also comprises a downstream interface associated with the interface to be tested and a downstream original instance associated with the downstream interface; constructing reconstruction interface information associated with the interface to be tested; executing an upstream original instance, a downstream original instance, an upstream modified instance and the downstream modified instance to perform environment test on an interface to be tested to obtain an interface test result, and performing log coverage rate verification on the interface test result; and after the log coverage rate of the interface test result is checked successfully, confirming that the interface test to be tested is completed. The invention improves the efficiency of the project interface test.

Description

Project interface testing method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of interface testing technologies, and in particular, to a method and apparatus for testing an item interface, a computer device, and a storage medium.
Background
With the rapid development of computer science and technology, the application field of software is gradually promoted, but with the lapse of time, in order to promote the compatibility, stability or performance of the system, it is necessary to update and reconstruct the software, and after each update and reconstruct, project testing is required to be performed on the reconstructed project version.
In the prior art, project requirements are generally input by a project requirement engineer in project testing of the reconstructed project version, the test engineer refines the test requirements according to the project requirements, and then the test requirements are associated one by one, so that test cases are designed, and the test cases are executed in the test process. However, the method has low efficiency, and the reconstructed item version cannot be covered by the test case, so that the error rate of the reconstructed item version is high.
Disclosure of Invention
The embodiment of the invention provides a method, a device, computer equipment and a storage medium for testing an item interface, which are used for solving the problems of low item testing efficiency and high error rate.
A method of project interface testing, comprising:
Acquiring original interface information associated with an interface to be tested; the original interface information comprises an upstream interface associated with the interface to be tested and an upstream original instance associated with the upstream interface; the method also comprises a downstream interface associated with the interface to be tested and a downstream original instance associated with the downstream interface;
Constructing reconstruction interface information associated with the interface to be tested; the reconfiguration interface information includes an upstream modification instance associated with the upstream interface; further comprising a downstream modification instance associated with the downstream interface;
Executing the upstream original instance, the downstream original instance, the upstream modification instance and the downstream modification instance to perform environment test on the interface to be tested to obtain an interface test result, and performing log coverage rate verification on the interface test result;
And after the log coverage rate of the interface test result is checked successfully, confirming that the interface test to be tested is completed.
An item interface testing device, comprising:
The original interface information acquisition module is used for acquiring original interface information related to the interface to be tested; the original interface information comprises an upstream interface associated with the interface to be tested and an upstream original instance associated with the upstream interface; the method also comprises a downstream interface associated with the interface to be tested and a downstream original instance associated with the downstream interface;
The reconfiguration interface information construction module is used for constructing reconfiguration interface information associated with the interface to be tested; the reconfiguration interface information includes an upstream modification instance associated with the upstream interface; further comprising a downstream modification instance associated with the downstream interface;
The environment test module is used for executing the upstream original instance, the downstream original instance, the upstream modification instance and the downstream modification instance so as to perform environment test on the interface to be tested, obtain an interface test result and perform log coverage rate verification on the interface test result;
and the test completion confirming module is used for confirming that the interface test to be tested is completed after the log coverage rate of the interface test result is successfully checked.
A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the above item interface test method when executing the computer program.
A computer readable storage medium storing a computer program which when executed by a processor implements the project interface testing method described above.
The method, the device, the computer equipment and the storage medium for testing the project interface are characterized in that the original interface information related to the interface to be tested is obtained; the original interface information comprises an upstream interface associated with the interface to be tested and an upstream original instance associated with the upstream interface; the method also comprises a downstream interface associated with the interface to be tested and a downstream original instance associated with the downstream interface; constructing reconstruction interface information associated with the interface to be tested; the reconfiguration interface information includes an upstream modification instance associated with the upstream interface; further comprising a downstream modification instance associated with the downstream interface; executing the upstream original instance, the downstream original instance, the upstream modification instance and the downstream modification instance to perform environment test on the interface to be tested to obtain an interface test result, and performing log coverage rate verification on the interface test result; and after the log coverage rate of the interface test result is checked successfully, confirming that the interface test to be tested is completed.
According to the invention, the upstream interface, the downstream interface and the corresponding test examples (the upstream original example, the downstream original example, the upstream modified example and the downstream modified example) which are related to the interface to be tested are carded out, so that after the interface to be tested is modified, only the test examples are required to be executed, and in the prior art, after the interface to be tested is modified, the global test examples are required to be executed, and no test example is coded in a targeted manner.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an application environment of an item interface testing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for testing an item interface according to an embodiment of the present invention;
FIG. 3 is a flowchart of step S20 in a program interface testing method according to an embodiment of the present invention;
FIG. 4 is a flowchart of step S30 in a program interface testing method according to an embodiment of the present invention;
FIG. 5 is a schematic block diagram of an item interface testing apparatus according to an embodiment of the present invention;
FIG. 6 is a schematic block diagram of a reconstruction interface information building block in an item interface test apparatus according to an embodiment of the present invention;
FIG. 7 is a schematic block diagram of an environment test module of the project interface test apparatus according to an embodiment of the invention;
FIG. 8 is a schematic diagram of a computer device in accordance with an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The method for testing the project interface provided by the embodiment of the invention can be applied to an application environment shown in figure 1. Specifically, the project interface testing method is applied to a project interface testing system, and the project interface testing system comprises a client and a server as shown in fig. 1, wherein the client and the server communicate through a network, so as to solve the problems of low project testing efficiency and high error rate. The client is also called a client, and refers to a program corresponding to the server for providing local service for the client. The client may be installed on, but is not limited to, various personal computers, notebook computers, smartphones, tablet computers, and portable wearable devices. The server may be implemented as a stand-alone server or as a server cluster composed of a plurality of servers.
In one embodiment, as shown in fig. 2, a method for testing an item interface is provided, and the method is applied to the server in fig. 1, and includes the following steps:
S10: acquiring original interface information associated with an interface to be tested; the original interface information comprises an upstream interface associated with the interface to be tested and an upstream original instance associated with the upstream interface; and a downstream interface associated with the interface to be tested and a downstream original instance associated with the downstream interface.
It can be understood that the interface to be tested is an interface to be tested after the interface is subjected to reconfiguration modification, and the reconfiguration modification can be a new function, a modified function, a deletion function or the like on the original interface of the interface to be tested. The original interface information refers to information related to the interface to be tested before the interface to be tested is changed, and illustratively, the original interface information can include a service name corresponding to the interface to be tested, a service name corresponding to an upstream interface related to the interface to be tested, a service name corresponding to a downstream interface related to the interface to be tested, and the like, and the original interface information can be obtained after being combed by developers related to projects.
Further, the upstream interfaces refer to service interfaces that need to call services corresponding to the interfaces to be tested, and the number of the upstream interfaces associated with the interfaces to be tested may be one or more. An upstream interface is associated with an upstream service. The upstream original instance refers to a test case corresponding to an upstream interface, and it can be understood that, in the initial development stage of the project, in order to perform a functional test on each upstream interface associated with the interface to be tested in the project, the written test case is the upstream original instance. Illustratively, assuming that an upstream interface designs a check of the bank account number of the finishing company, the upstream original instance associated with the upstream interface may be a table for traversing and storing the bank account number of the finishing company, checking the format of the bank account number of the finishing company, and so on.
Further, the downstream interfaces refer to service interfaces that need to be invoked when the service corresponding to the interface to be tested is tested, and the number of the downstream interfaces associated with the interface to be tested can be one or more. One downstream interface is associated with one downstream service. The downstream original instance refers to a test case corresponding to a downstream interface, and it can be understood that, in the initial development stage of the project, in order to perform a functional test on each downstream interface associated with the interface to be tested in the project, the written test case is the downstream original instance.
S20: constructing reconstruction interface information associated with the interface to be tested; the reconfiguration interface information includes an upstream modification instance associated with the upstream interface; also included is a downstream modification instance associated with the downstream interface.
The reconfiguration interface information is understood to mean information associated with the interface to be tested after reconfiguration changes have been made to it. In addition to the upstream original instance and the downstream original instance indicated in step S10, the reconstructed interface information also includes an upstream modification instance and a downstream modification instance.
Further, the upstream modification example refers to an example that the modified interface to be tested is reconfigured to affect the upstream interface, and by way of example, it is assumed that a certain function is newly added to the interface to be tested, and then the action when the upstream interface invokes the new function of the interface to be tested should be tested correspondingly. The downstream modification example refers to an example that the interface to be tested affects the downstream interface after the reconfiguration modification, and by way of example, it is assumed that a certain function description is modified on the interface to be tested, and when the downstream interface is called, the called downstream interface may be replaced, or the call content in the replaced called downstream interface should also be generated, so as to complete the test of the interface to be tested.
In one embodiment, as shown in fig. 3, in step S20, the method includes:
s201: and determining interface function information associated with the interface to be tested according to the upstream original instance and the downstream original instance.
It will be understood that the interface function information refers to the function features corresponding to the interfaces to be tested. The original interface information also comprises a function point description corresponding to the upstream interface and a function point description corresponding to the downstream interface, and in addition, the function point description corresponding to the upstream interface can be judged through the upstream original instance, and the function point description corresponding to the downstream interface can be judged through the downstream original instance.
Specifically, after the original interface information associated with the interface to be tested is obtained, specific function points associated with the interface to be tested, namely interface function information, are carded out according to the upstream interface, the downstream interface, the upstream original instance and the downstream original instance of the original interface information.
S202: and determining an original testing range corresponding to the interface to be tested according to the interface function information.
It will be understood that the original test range refers to the test range corresponding to the interface to be tested before the interface to be tested is subjected to no reconfiguration change. Illustratively, it is assumed that the original test scope may include, for example, a decoration order management test scope, a decoration commodity management test scope, a merchant background test scope, etc., in the application and decoration application of the present invention.
Specifically, after the interface function information associated with the interface to be tested is determined according to the upstream original instance and the downstream original instance, the corresponding test range in each function of the interface to be tested is carded according to the interface function information, and then the original test range is determined.
S203: and sending the interface function information and the original test range to a preset receiver so that the preset receiver can determine the change function information and the change test range according to the interface function information and the original test range.
It can be appreciated that the preset receiver may be a developer associated with the project, that is, the reconfiguration change of the interface to be tested is formulated by the developer, and the change of the interface to be tested by the developer needs to refer to the historical interface data to perform function addition, function adjustment, and the like.
Specifically, after determining the original test range corresponding to the interface to be tested according to the interface function information, the interface function information and the original test range are sent to a preset receiver, so that after the preset receiver receives the interface function information and the original test range, the modified function information and the modified test range of the interface to be tested are determined. That is, after the preset receiver receives the interface function information and the original test range, the interface to be tested is modified, and the interface to be tested is refined to the corresponding modified function information or the modified test range.
S204: and receiving the change function information and the change test range sent by the preset receiver, and determining the upstream change instance and the downstream change instance according to the change function information and the change test range.
Specifically, after the preset receiver determines the change function information and the change test range according to the interface function information and the original test range, the change function information and the change test range sent by the preset receiver are received, and further, according to the change function information and the change test range, an upstream change instance corresponding to an upstream interface in an upstream service and a downstream change instance corresponding to a downstream interface in a downstream service are determined. For example, assuming that the change function information is a change data acquirable range, the original data acquirable range is assumed to be all data in the database, and the data acquirable range after the change is data in a certain table, the generated upstream change instance may be a determination whether data in other storage locations in the database, except the specified table, can be acquired.
S30: executing the upstream original instance, the downstream original instance, the upstream modification instance and the downstream modification instance to perform environment test on the interface to be tested to obtain an interface test result, and performing log coverage rate verification on the interface test result.
It will be appreciated that a test verification of an item or product is required before it is released, to release the item or product on-line for use by a user after it is determined that the item or product is accurate. Specifically, after the reconstructed interface information associated with the interface to be tested is constructed, an upstream original instance, the downstream original instance, the upstream modified instance and the downstream modified instance are executed, so that an environment test is performed on the interface to be tested, an interface test result is obtained, and log coverage rate verification is performed on the interface test result. The log coverage rate verification is used for verifying whether the interface to be tested meets the reconstruction requirement, namely whether the function corresponding to the interface to be tested meets the preset function requirement.
It will be appreciated that in addition to executing the upstream and downstream modified instances, the upstream and downstream original instances should also be executed, and that the downstream and upstream modified instances need to be executed because the accuracy of the interface to be tested to the unmodified instance cannot be ensured after the interface to be tested is reconfigured. The unchanged instance refers to an instance in which interface function information corresponding to an upstream original instance and a downstream original instance is not changed or a corresponding test range is not changed.
Furthermore, before log coverage rate verification is performed on the interface test result, interface display can be performed on the interface test result, namely, the data flow direction of each flow node in the interface test result is displayed, so that all results of the interface test result, a result generation process and the like can be more intuitively seen on the interface.
S40: and after the log coverage rate of the interface test result is checked successfully, confirming that the interface test to be tested is completed.
Specifically, after the upstream original instance, the downstream original instance, the upstream modified instance and the downstream modified instance are executed to perform an environmental test on the interface to be tested to obtain an interface test result, and perform log coverage verification on the interface test result, determining whether the log coverage verification is successful, if the log coverage verification is successful on the interface test result, determining that the interface test to be tested is completed, and further pushing an item or a product associated with the interface to be tested to an online for release for a user to use. If the log coverage rate verification of the interface test result fails, namely the log interface function corresponding to the interface to be tested is not completely covered, further the interface to be tested needs to be subjected to error correction, modification and other treatments, and further after the log coverage rate verification of the test result corresponding to the interface to be tested after the error correction and modification is successful, the interface to be tested is confirmed to be tested.
In this embodiment, by carding out the upstream interface, the downstream interface and the corresponding test cases (such as the upstream original case, the downstream original case, the upstream modified case and the downstream modified case) associated with the interface to be tested, only the test cases need to be executed after the interface to be tested is modified, but in the prior art, after the interface to be tested is modified, the global test cases need to be executed, and no test cases are coded for pertinence.
In an embodiment, as shown in fig. 4, in step S30, that is, the executing the upstream original instance, the downstream original instance, the upstream modification instance, and the downstream modification instance to perform an environmental test on the interface to be tested to obtain an interface test result, and performing log coverage verification on the interface test result includes:
S301: executing the upstream original instance, the downstream original instance, the upstream modification instance and the downstream modification instance in a test environment to perform test environment verification on the interface to be tested, and obtaining a first test result.
S302: and checking the log coverage rate of the first test result to obtain a first check result corresponding to the first test result.
It will be appreciated that the test environment is a collective term for the computer hardware, software, network equipment, historical data necessary to complete the testing work of the interface to be tested.
Specifically, after the reconstructed interface information associated with the interface to be tested is constructed, the upstream original instance, the downstream original instance, the upstream modified instance and the downstream modified instance should be executed in the test environment, so as to perform test environment verification on the interface to be tested, and obtain a first test result; and further, checking the log coverage rate of the first test result to obtain a first check result corresponding to the first test result.
In an embodiment, after step S302, that is, after the log coverage verification is performed on the first test result to obtain a first verification result corresponding to the first test result, the method further includes:
S303: executing the upstream original instance, the downstream original instance, the upstream modified instance and the downstream modified instance in a pre-release environment when the first verification result is a complete coverage result, so as to perform pre-release environment verification on the interface to be tested, and obtaining a second test result;
s304: and checking the log coverage rate of the second test result to obtain a second check result corresponding to the second test result.
It can be understood that the pre-release environment is an excessive from the test environment to the release environment, and some processes or data are not tested because of some limitations in the test environment, so that verification can be performed in the pre-release environment, thereby ensuring the online quality of the interface to be tested.
Specifically, after the first test result is subjected to log coverage verification to obtain a first verification result corresponding to the first test result, checking log coverage corresponding to the first verification result through kibana, and when the first verification result is a complete coverage result, that is, in a test environment, covering functions corresponding to an interface to be tested, and further executing the upstream original instance, the downstream original instance, the upstream modified instance and the downstream modified instance in a pre-release environment to perform pre-release environment verification on the interface to be tested to obtain a second test result, and performing log coverage verification on the second test result to obtain a second verification result corresponding to the second test result.
Further, if the first verification result is not a complete coverage result, that is, in the test environment, the function corresponding to the interface to be tested is not completely covered, so that adjustment, modification and error correction processing are required for the function which is not covered in the test environment, and further, the function corresponding to the interface to be tested is covered successfully.
In an embodiment, after step S304, that is, after the log coverage verification is performed on the second test result to obtain a second verification result corresponding to the second test result, the method further includes:
S305: and when the second checking result is a complete coverage result, executing the upstream original instance, the downstream original instance, the upstream modified instance and the downstream modified instance in a production environment so as to perform production environment checking on the interface to be tested, and obtaining a third testing result.
S306: and checking the log coverage rate of the third test result to obtain a third check result corresponding to the third test result.
It will be appreciated that the production environment is the same as the on-line environment, i.e. the production environment is an environment that simulates the use of items or products corresponding to the interfaces to be tested by the user.
Specifically, after the second test result is subjected to log coverage verification to obtain a second test result corresponding to the second test result, checking log coverage corresponding to the second test result through kibana, and when the second test result is a complete coverage result, that is, in a pre-release environment, covering functions corresponding to an interface to be tested, and further executing the upstream original instance, the downstream original instance, the upstream modified instance and the downstream modified instance in a production environment to verify the production environment of the interface to be tested to obtain a third test result, and performing log coverage verification to the third test result to obtain a third test result corresponding to the third test result.
Further, if the second checking result is not the complete coverage result, that is, in the pre-release environment, the function corresponding to the interface to be tested is not completely covered, so that the function not covered in the pre-release environment needs to be adjusted, modified and error corrected, and the function corresponding to the interface to be tested is successfully covered.
S307: and when the third checking result is a complete coverage result, confirming that the log coverage rate check of the interface testing result is successful.
Specifically, after the log coverage rate verification is performed on the third test result to obtain a third verification result corresponding to the third test result, checking the log coverage rate corresponding to the third verification result through kibana, and when the third verification result is a complete coverage result, that is, in a production environment, covering functions corresponding to the interface to be tested, thereby confirming that the log coverage rate verification is successful on the interface test result.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
In an embodiment, an item interface testing device is provided, where the item interface testing device corresponds to the item interface testing method in the above embodiment one by one. As shown in fig. 5, the apparatus includes an original interface information acquisition module 10, a reconstructed interface information construction module 20, an environment test module 30, and a test completion confirmation module 40. The functional modules are described in detail as follows:
the original interface information acquisition module 10 is used for acquiring original interface information associated with an interface to be tested; the original interface information comprises an upstream interface associated with the interface to be tested and an upstream original instance associated with the upstream interface; the method also comprises a downstream interface associated with the interface to be tested and a downstream original instance associated with the downstream interface;
A reconfiguration interface information constructing module 20, configured to construct reconfiguration interface information associated with the interface to be tested; the reconfiguration interface information includes an upstream modification instance associated with the upstream interface; further comprising a downstream modification instance associated with the downstream interface;
The environment test module 30 is configured to execute the upstream original instance, the downstream original instance, the upstream modification instance, and the downstream modification instance, so as to perform an environment test on the interface to be tested, obtain an interface test result, and perform log coverage verification on the interface test result;
And the test completion confirming module 40 is used for confirming that the interface test to be tested is completed after the log coverage rate of the interface test result is checked successfully.
Preferably, as shown in fig. 6, the reconfiguration interface information constructing module 20 includes:
an interface function information determining unit 201, configured to determine interface function information associated with the interface to be tested according to the upstream original instance and the downstream original instance;
a test range determining unit 202, configured to determine an original test range corresponding to the interface to be tested according to the interface function information;
an information sending unit 203, configured to send the interface function information and the original test range to a preset receiver, so that the preset receiver determines, according to the interface function information and the original test range, modified function information and a modified test range;
And the new instance determining unit 204 is configured to receive the modification function information and the modification test range sent by the preset receiver, and determine the upstream modification instance and the downstream modification instance according to the modification function information and the modification test range.
Preferably, as shown in fig. 7, the environment test module 30 includes:
The test environment verification unit 301 is configured to execute the upstream original instance, the downstream original instance, the upstream modification instance, and the downstream modification instance in a test environment, so as to perform test environment verification on the interface to be tested, and obtain a first test result;
And the first log coverage verification unit 302 is configured to perform log coverage verification on the first test result, so as to obtain a first verification result corresponding to the first test result.
Preferably, the environmental test module 30 further includes:
A pre-release environment verification unit 303, configured to execute the upstream original instance, the downstream original instance, the upstream modified instance, and the downstream modified instance in a pre-release environment when the first verification result is a complete coverage result, so as to perform pre-release environment verification on the interface to be tested, thereby obtaining a second test result;
and a second log coverage verification unit 304, configured to perform log coverage verification on the second test result, to obtain a second verification result corresponding to the second test result.
Preferably, the environmental test module 30 further includes:
And the production environment verification unit 305 is configured to execute the upstream original instance, the downstream original instance, the upstream modified instance, and the downstream modified instance in a production environment when the second verification result is a complete coverage result, so as to perform production environment verification on the interface to be tested, and obtain a third test result.
And a third log coverage verification unit 306, configured to perform log coverage verification on the third test result, to obtain a third verification result corresponding to the third test result.
Preferably, the environmental test module 30 further includes:
And the coverage verification success unit 307 is configured to confirm that log coverage verification is successful on the interface test result when the third test result is a complete coverage result.
For specific limitations of the project interface testing apparatus, reference may be made to the above description of the project interface testing method, and no further description is given here. The above-described individual modules in the item interface test apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 8. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing the data used by the program interface testing method in the above embodiment. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program when executed by a processor implements a project interface testing method.
In one embodiment, a computer device is provided that includes a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the method for testing an item interface in the above embodiments when executing the computer program.
In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, which when executed by a processor implements the program interface testing method of the above embodiment.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SYNCHLINK) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention.

Claims (8)

1. A method for testing an item interface, comprising:
Acquiring original interface information associated with an interface to be tested; the original interface information comprises an upstream interface associated with the interface to be tested and an upstream original instance associated with the upstream interface; the method also comprises a downstream interface associated with the interface to be tested and a downstream original instance associated with the downstream interface;
Constructing reconstruction interface information associated with the interface to be tested; the reconfiguration interface information includes an upstream modification instance associated with the upstream interface; further comprising a downstream modification instance associated with the downstream interface;
Executing the upstream original instance, the downstream original instance, the upstream modification instance and the downstream modification instance to perform environment test on the interface to be tested to obtain an interface test result, and performing log coverage rate verification on the interface test result;
after the log coverage rate of the interface test result is checked successfully, confirming that the interface test to be tested is completed;
the constructing the reconstructed interface information associated with the interface to be tested comprises the following steps:
Determining interface function information associated with the interface to be tested according to the upstream original instance and the downstream original instance;
determining an original testing range corresponding to the interface to be tested according to the interface function information;
The interface function information and the original test range are sent to a preset receiver, so that the preset receiver can determine change function information and change test range according to the interface function information and the original test range;
And receiving the change function information and the change test range sent by the preset receiver, and determining the upstream change instance and the downstream change instance according to the change function information and the change test range.
2. The method of claim 1, wherein the executing the upstream original instance, the downstream original instance, the upstream modified instance, and the downstream modified instance to perform an environmental test on the interface to be tested to obtain an interface test result, and performing log coverage verification on the interface test result includes:
Executing the upstream original instance, the downstream original instance, the upstream modification instance and the downstream modification instance in a test environment to perform test environment verification on the interface to be tested, so as to obtain a first test result;
and checking the log coverage rate of the first test result to obtain a first check result corresponding to the first test result.
3. The method for testing an item interface according to claim 2, wherein after obtaining a first verification result corresponding to the first test result, the method comprises:
executing the upstream original instance, the downstream original instance, the upstream modified instance and the downstream modified instance in a pre-release environment when the first verification result is a complete coverage result, so as to perform pre-release environment verification on the interface to be tested, and obtaining a second test result;
And checking the log coverage rate of the second test result to obtain a second check result corresponding to the second test result.
4. The method for testing an item interface according to claim 3, wherein after obtaining the second test result corresponding to the second test result, the method comprises:
Executing the upstream original instance, the downstream original instance, the upstream modified instance and the downstream modified instance in a production environment when the second checking result is a complete coverage result, so as to verify the production environment of the interface to be tested and obtain a third testing result;
and checking the log coverage rate of the third test result to obtain a third check result corresponding to the third test result.
5. The method of claim 4, wherein said confirming that said test for said interface to be tested is complete comprises:
And when the third checking result is a complete coverage result, confirming that the log coverage rate check of the interface testing result is successful.
6. An item interface testing device, comprising:
The original interface information acquisition module is used for acquiring original interface information related to the interface to be tested; the original interface information comprises an upstream interface associated with the interface to be tested and an upstream original instance associated with the upstream interface; the method also comprises a downstream interface associated with the interface to be tested and a downstream original instance associated with the downstream interface;
The reconfiguration interface information construction module is used for constructing reconfiguration interface information associated with the interface to be tested; the reconfiguration interface information includes an upstream modification instance associated with the upstream interface; further comprising a downstream modification instance associated with the downstream interface;
The environment test module is used for executing the upstream original instance, the downstream original instance, the upstream modification instance and the downstream modification instance so as to perform environment test on the interface to be tested, obtain an interface test result and perform log coverage rate verification on the interface test result;
the test completion confirming module is used for confirming that the interface test to be tested is completed after the log coverage rate of the interface test result is successfully checked;
the reconfiguration interface information construction module includes:
an interface function information determining unit, configured to determine interface function information associated with the interface to be tested according to the upstream original instance and the downstream original instance;
the test range determining unit is used for determining an original test range corresponding to the interface to be tested according to the interface function information;
The information sending unit is used for sending the interface function information and the original test range to a preset receiver so that the preset receiver can determine the change function information and the change test range according to the interface function information and the original test range;
And the newly added instance determining unit is used for receiving the change function information and the change test range sent by the preset receiver and determining the upstream change instance and the downstream change instance according to the change function information and the change test range.
7. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the item interface testing method of any one of claims 1 to 5 when executing the computer program.
8. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the item interface testing method of any one of claims 1 to 5.
CN202011566966.3A 2020-12-25 2020-12-25 Project interface testing method and device, computer equipment and storage medium Active CN112699023B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011566966.3A CN112699023B (en) 2020-12-25 2020-12-25 Project interface testing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011566966.3A CN112699023B (en) 2020-12-25 2020-12-25 Project interface testing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112699023A CN112699023A (en) 2021-04-23
CN112699023B true CN112699023B (en) 2024-05-03

Family

ID=75510928

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011566966.3A Active CN112699023B (en) 2020-12-25 2020-12-25 Project interface testing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112699023B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108509337A (en) * 2018-03-15 2018-09-07 链家网(北京)科技有限公司 The dynamic testing method and device called based on interface
CN109558316A (en) * 2018-11-21 2019-04-02 武汉风行在线技术有限公司 A kind of HTTP interface mobilism parameter test method of Test Strategy automatic configuration
CN110209571A (en) * 2019-04-25 2019-09-06 深圳壹账通智能科技有限公司 Test method and device, storage medium, the computer equipment of more new interface
CN110287101A (en) * 2019-05-22 2019-09-27 深圳壹账通智能科技有限公司 User interface automated testing method, device, computer equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050246390A1 (en) * 2001-08-24 2005-11-03 House Richard W Enterprise test data management system utilizing automatically created test data structures and related methods
US8689155B1 (en) * 2012-09-25 2014-04-01 Infineon Technologies Ag Method of proving formal test bench fault detection coverage
US10019345B2 (en) * 2016-05-16 2018-07-10 Hulu, LLC Executing multi-version tests against a multi-version application

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108509337A (en) * 2018-03-15 2018-09-07 链家网(北京)科技有限公司 The dynamic testing method and device called based on interface
CN109558316A (en) * 2018-11-21 2019-04-02 武汉风行在线技术有限公司 A kind of HTTP interface mobilism parameter test method of Test Strategy automatic configuration
CN110209571A (en) * 2019-04-25 2019-09-06 深圳壹账通智能科技有限公司 Test method and device, storage medium, the computer equipment of more new interface
CN110287101A (en) * 2019-05-22 2019-09-27 深圳壹账通智能科技有限公司 User interface automated testing method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN112699023A (en) 2021-04-23

Similar Documents

Publication Publication Date Title
CN109032611B (en) Script deployment method and device, computer equipment and storage medium
CN108319719B (en) Database data verification method and device, computer equipment and storage medium
US10977162B2 (en) Real time application error identification and mitigation
CN110941630A (en) Database operation and maintenance method, device and system
CN110727575B (en) Information processing method, system, device and storage medium
CN111240976A (en) Software testing method and device, computer equipment and storage medium
US20150082287A1 (en) Scenario based test design
CN112379913B (en) Software optimization method, device, equipment and storage medium based on risk identification
CN112650689A (en) Test method, test device, electronic equipment and storage medium
CN112561690A (en) Method, system, equipment and storage medium for testing credit card staging service interface
CN112699023B (en) Project interface testing method and device, computer equipment and storage medium
CN115934129A (en) Software project updating method and device, computer equipment and storage medium
CN115357594A (en) Block chain-based data model updating method and related equipment
CN115168232A (en) Testing method and device based on AUTOSAR platform, electronic equipment and storage medium
CN114637672A (en) Automatic data testing method and device, computer equipment and storage medium
CN111475400A (en) Verification method of service platform and related equipment
CN112052171A (en) Test message processing method and device, computer equipment and storage medium
CN113052463B (en) Workflow verification method, workflow verification device, computer equipment and storage medium
CN108628750B (en) Test code processing method and device
CN110309038B (en) Performance test method and device, electronic equipment and computer readable storage medium
KR20180060573A (en) Regression test automation system for improving software development quality
CN118245140A (en) Interface call example generation method and device, electronic equipment and storage medium
CN115454846A (en) Data consistency verification method, device, system and medium based on production environment
CN116795689A (en) Method and device for testing tool kit, computer equipment and storage medium
CN117827661A (en) Code grammar checking method, system, computer device and 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
GR01 Patent grant
GR01 Patent grant