CN114647588A - Interface test method and device - Google Patents

Interface test method and device Download PDF

Info

Publication number
CN114647588A
CN114647588A CN202210331777.0A CN202210331777A CN114647588A CN 114647588 A CN114647588 A CN 114647588A CN 202210331777 A CN202210331777 A CN 202210331777A CN 114647588 A CN114647588 A CN 114647588A
Authority
CN
China
Prior art keywords
interface
code
information
tested
interface information
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
CN202210331777.0A
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202210331777.0A priority Critical patent/CN114647588A/en
Publication of CN114647588A publication Critical patent/CN114647588A/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/368Test management for test version control, e.g. updating test cases to a new software version
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The invention discloses an interface testing method and device, relating to the field of finance, wherein the method comprises the following steps: after the code is changed, code change information is obtained, and the code change information comprises a code file identifier of the changed code; determining interface information corresponding to the code file identifier of the changed code according to the association relationship between the preset code file identifier and the interface information; adding interface information corresponding to the code file identification of the change code into an interface queue to be tested; determining a test script corresponding to the interface information in the interface queue to be tested according to the preset incidence relation between the interface information and the test script; and testing the interface corresponding to the interface information in the interface queue to be tested by using the test script corresponding to the interface information in the interface queue to be tested to obtain a test result. The invention can save the test time, quickly obtain the latest test result and improve the test efficiency.

Description

Interface test method and device
Technical Field
The invention relates to the field of finance, in particular to an interface testing method and device.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
The interface test is mainly used for testing the interfaces interacted between external systems and between internal subsystems. At present, interface testing is performed through automated testing most of the time, the testing mode is mainly performed according to a testing script, a testing case and testing data which are matched with the interface functions, and if a source code of an interface slightly changes, a testing result may be incorrect, so that a response needs to be made to the testing result in time.
The existing automatic test method generally carries out full test at regular time, if codes are frequently changed or deployed, once the timing task of the automatic test is not executed in time, problems cannot be found in time, and the test and development progress is slow; meanwhile, the time resource required by the full-scale test is often large, and the test efficiency is low.
Disclosure of Invention
The embodiment of the invention provides an interface testing method, which is used for saving testing time, quickly obtaining the latest testing result and improving testing efficiency and comprises the following steps:
after the code is changed, code change information is obtained, wherein the code change information comprises a code file identifier of the changed code;
determining interface information corresponding to the code file identification of the changed code according to the incidence relation between the preset code file identification and the interface information;
adding interface information corresponding to the code file identification of the change code into an interface queue to be tested;
determining a test script corresponding to the interface information in the interface queue to be tested according to the preset incidence relation between the interface information and the test script;
and testing the interface corresponding to the interface information in the interface queue to be tested by using the test script corresponding to the interface information in the interface queue to be tested to obtain a test result.
The embodiment of the present invention further provides an interface testing apparatus, which is used to save testing time, obtain the latest testing result quickly, and improve testing efficiency, and the apparatus includes:
the information acquisition module is used for acquiring code change information after the code is changed, wherein the code change information comprises a code file identifier of the changed code;
the interface determining module is used for determining the interface information corresponding to the code file identifier of the change code according to the incidence relation between the preset code file identifier and the interface information;
the test queue module is used for adding the interface information corresponding to the code file identifier of the change code into an interface queue to be tested;
the script determining module is used for determining a test script corresponding to the interface information in the interface queue to be tested according to the preset incidence relation between the interface information and the test script;
and the test module is used for testing the interface corresponding to the interface information in the interface queue to be tested by using the test script corresponding to the interface information in the interface queue to be tested to obtain a test result.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the interface test method when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, which stores a computer program, and the computer program realizes the interface testing method when being executed by a processor.
An embodiment of the present invention further provides a computer program product, where the computer program product includes a computer program, and when the computer program is executed by a processor, the computer program implements the interface testing method.
In the embodiment of the invention, after the code is changed, code change information is obtained, and the code change information comprises a code file identifier of the changed code; determining interface information corresponding to the code file identification of the changed code according to the incidence relation between the preset code file identification and the interface information; adding interface information corresponding to the code file identification of the change code into an interface queue to be tested; determining a test script corresponding to the interface information in the interface queue to be tested according to the preset incidence relation between the interface information and the test script; and testing the interface corresponding to the interface information in the interface queue to be tested by using the test script corresponding to the interface information in the interface queue to be tested to obtain a test result. Compared with the technical scheme of regularly carrying out the full-automatic interface test in the prior art, after the code is changed, the interface associated with the changed code is determined, and only the interface associated with the changed code is tested, so that the test time can be saved, the latest test result can be quickly obtained, the problem can be timely found, and the test efficiency can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
fig. 1 is a flowchart of an interface testing method provided in an embodiment of the present invention;
FIG. 2 is a flowchart illustrating an association relationship between an update code file identifier and interface information provided in an embodiment of the present invention;
fig. 3 is a schematic diagram of an interface testing apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another interface testing apparatus provided in the embodiment of the present invention;
FIG. 5 is a diagram of a computer device in an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
In the description of the present specification, the terms "comprising," "including," "having," "containing," and the like are used in an open-ended fashion, i.e., to mean including, but not limited to. Reference to the description of the terms "one embodiment," "a particular embodiment," "some embodiments," "for example," etc., means that a particular feature, structure, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. The sequence of steps involved in the embodiments is for illustrative purposes to illustrate the implementation of the present application, and the sequence of steps is not limited and can be adjusted as needed.
Software testing is a necessary process for guaranteeing software quality, and automation of software testing is an important means for improving efficiency aiming at a test scene with infrequent change of requirements, long enough project period and more repeated and single data. The main flow of the automatic test comprises the stages of analysis of test requirements, design of test cases, compiling of automatic scripts, implementation of test scripts, result analysis and the like.
After the test script is written, a tester can learn the test result of the test case related to the script by executing the script. After the number of the test scripts is gradually increased, an automated test platform for managing and executing the test scripts is usually required to be built, and the platform can usually execute the automated test scripts in batches according to time and feed back test results to testers.
Research shows that the existing automatic test usually executes a full amount of interface test scripts at idle time, and the method has the advantages that the test result can be comprehensively obtained, and has the defects that the required time is long, and a tester cannot timely obtain the test result after code change, so that the test and development progress is slow, and the test efficiency is low.
Aiming at the research, the embodiment of the invention provides an incremental interface test scheme, which can greatly reduce the test time; moreover, after the code is changed, the test can be performed more timely, and the test result of the changed interface can be fed back.
As shown in fig. 1, a flowchart of an interface testing method provided in an embodiment of the present invention may include the following steps:
step 101, after a code is changed, code change information is obtained, wherein the code change information comprises a code file identifier of a change code;
102, determining interface information corresponding to the code file identifier of the change code according to the preset association relationship between the code file identifier and the interface information;
103, adding interface information corresponding to the code file identifier of the change code into an interface queue to be tested;
104, determining a test script corresponding to the interface information in the interface queue to be tested according to the preset incidence relation between the interface information and the test script;
and 105, testing the interface corresponding to the interface information in the interface queue to be tested by using the test script corresponding to the interface information in the interface queue to be tested to obtain a test result.
In the embodiment of the invention, after the code is changed, code change information is obtained, and the code change information comprises a code file identifier of the changed code; determining interface information corresponding to the code file identification of the changed code according to the incidence relation between the preset code file identification and the interface information; adding interface information corresponding to the code file identification of the change code into an interface queue to be tested; determining a test script corresponding to the interface information in the interface queue to be tested according to the preset incidence relation between the interface information and the test script; and testing the interface corresponding to the interface information in the interface queue to be tested by using the test script corresponding to the interface information in the interface queue to be tested to obtain a test result. Compared with the technical scheme of regularly carrying out the full-automatic interface test in the prior art, after the code is changed, the interface associated with the changed code is determined, and only the interface associated with the changed code is tested, so that the test time can be saved, the latest test result can be quickly obtained, the problem can be timely found, and the test efficiency can be improved.
In the embodiment of the invention, the incidence relation between the code file identification and the interface information, which is preset by a tester, and the incidence relation between the interface information and the test script are required.
Specifically, a tester can write a test script corresponding to a test interface in advance, and record the incidence relation among data such as the name of the test script, the name of the interface, an organizer (i.e., a tester) or the number of cases by setting an incidence relation table between interface information and the test script; then, judging which code files are used by the interface through a code coverage rate detection mechanism of the interface test, or supplementing the code files in the process of developing the interface by developers; finally, the code file identification of the code file used by the interface information is associated with the interface information. One code file identifier may be associated with a plurality of interface information, and one interface information may also be associated with a plurality of code file identifiers.
It should be noted that, in the embodiment of the present invention, in order to ensure the accuracy of the test result, a tester needs to design a test case with a good coverage rate in order to complete the association between the interface information and the code file, or a developer provides complete association information.
In step 101, after the tester submits the changed code, the system may obtain the code change information submitted by the tester.
In the embodiment of the present invention, the code change information may include a code file identifier of the change code, a changed code file, a submission time of the change code, and information of the sponsor.
In specific implementation, after the tester submits the changed code, the automated testing system may compare the digest of the changed code file (such as MD5 or SHA256) with the digest of the old code file corresponding to the code file identifier of the changed code, and if the two digests are not the same, the old code file is changed. Therefore, it is necessary to screen the interfaces corresponding to the changed code files for testing.
For example, the digest of each code file may be stored in the code file, and after each code change, the digest is updated to the digest of the code that changed this time.
In step 102, the interface information corresponding to the code file identifier of the change code may be automatically matched according to the preset association relationship between the code file identifier and the interface information.
In specific implementation, the files storing the association relationship between the code file identifiers and the interface information can be inquired one by one, and the range of the interface to be tested is determined, namely the interface corresponding to the code file identifier of the code is changed.
In the embodiment of the present invention, the interface information corresponding to the code file identifier of the change code may be one interface information or a plurality of interface information. The interface information may include information such as an interface name, an interface address, a tester related to the interface, and an information sending method.
In step 103, the interface information corresponding to the code file identifier of the change code may be added to the to-be-tested interface queue.
In an embodiment of the present invention, step 103 may further include:
and adding the submission time of the change code and the information of the operator into an interface queue to be tested.
In specific implementation, in the queue of the interfaces to be tested, the following records can be recorded by establishing an information table of the interfaces to be tested: the submission time of the change code, the information of the sponsor, the code file identification of the change code, the corresponding interface information and the like.
In the embodiment of the present invention, after step 103, the method may further include:
and performing duplicate removal processing on the interface information in the interface queue to be tested according to the submission time of the change code and the information of the operator.
In specific implementation, because different code file identifications of the change codes may correspond to the same interface, the interface information in the interface queue to be tested can be subjected to deduplication processing according to the submission time of the change codes and the information of the sponsor.
In step 104, a test script corresponding to the interface information in the to-be-tested interface queue may be determined according to a preset association relationship between the interface information and the test script.
In specific implementation, the test script corresponding to the interface name may be matched from the preset association relationship between the interface information and the test script.
In step 105, the test script corresponding to the interface information in the interface queue to be tested may be used to test the interface corresponding to the interface information in the interface queue to be tested, so as to obtain a test result.
In an embodiment of the present invention, the step 105 may specifically include:
after the change code is deployed to the test environment, acquiring the deployment time of the change code;
and executing a test script corresponding to the interface information in the interface queue to be tested at the deployment moment of the change code to obtain a test result.
In specific implementation, after the change code is deployed to a test environment, the deployment time of deployment completion is recorded; and executing a test script corresponding to the interface information in the interface queue to be tested at the deployment moment of the change code to obtain a test result.
Therefore, after the code deployment is completed, the interface corresponding to the changed code is subjected to incremental testing, and the testing result can be quickly obtained so as to respond in time. Meanwhile, the test time is reduced, and the test efficiency is improved.
It should be noted that the interface testing method provided by the embodiment of the present invention is divided into a full test and an incremental test, the full test may be performed when the server resources are idle, and the incremental test is performed in real time after each deployment is completed. The accuracy of the test result is ensured, and meanwhile, the test efficiency is improved.
In an embodiment of the present invention, after the step 105, the method may further include:
and sending the test result to a tester related to the interface information in the interface queue to be tested.
In specific implementation, the interface information includes related tester information and a preset information sending mode (such as a mail), and the test result can be sent to the tester related to the interface information according to the information sending mode in the interface information.
Therefore, the tester can analyze the test result to determine whether the test result meets the preset requirement, if the test result does not meet the preset requirement, the tester judges the error reason (such as interface function change) and correspondingly modifies the test script to adapt to the new interface function, so that the tester can quickly respond to the influence of the changed code in time, and the test efficiency is improved.
In the embodiment of the present invention, as shown in fig. 2, in a case that a tester modifies a test script corresponding to interface information in an interface queue to be tested, the method may further include:
step 201, when the test result does not meet the preset requirement and the tester modifies the test script corresponding to the interface information in the interface queue to be tested, obtaining the modified test script;
step 202, executing the modified test script based on a code coverage rate detection mechanism, and determining a code file corresponding to interface information in an interface queue to be tested;
step 203, updating the association relationship between the code file identifier and the interface information according to the code file corresponding to the interface information in the to-be-tested interface queue.
In specific implementation, under the condition that a test result does not meet a preset requirement and a tester modifies a test script corresponding to interface information in an interface queue to be tested, the association relation between the interface information and the test script needs to be updated according to the modified test script. Under the condition that the automatic test system receives the update of the incidence relation between the interface information and the test script, acquiring the modified test script, executing the modified test script based on a code coverage rate detection mechanism, and determining a code file corresponding to the interface information in the interface queue to be tested; and updating the association relation between the code file identification and the interface information according to the code file corresponding to the interface information in the interface queue to be tested.
Therefore, after the test script is changed, the incidence relation between the code file identification and the interface information is updated in time, and the accuracy of the test result can be ensured.
In addition, in the embodiment of the present invention, when an interface needs to be newly added, the method may further include:
when the interface information is newly added, executing a test script corresponding to the newly added interface information which is compiled in advance based on a code coverage rate detection mechanism, and determining a code file corresponding to the newly added interface information;
and updating the association relation between the code file identification and the interface information according to the code file corresponding to the newly added interface information.
In the embodiment of the invention, because the code coverage rate detection mechanism is a mode of executing by using a machine, the method is more efficient compared with the method that a developer directly combs the association relation.
In the embodiment of the invention, the interface script related to the increment test can be accurately screened out, and the automatic test of the increment is executed after the deployment of the change code is finished, so that the test result can be quickly obtained after the code is changed, the test time is saved, and the test efficiency is improved.
The embodiment of the invention also provides an interface testing device, which is described in the following embodiment. Because the principle of the device for solving the problems is similar to the interface test method, the implementation of the device can refer to the implementation of the interface test method, and repeated details are not repeated.
As shown in fig. 3, which is a schematic diagram of an interface testing apparatus according to an embodiment of the present invention, the apparatus may include:
the information acquisition module 301 is configured to acquire code change information after a code is changed, where the code change information includes a code file identifier of a changed code;
the interface determining module 302 is configured to determine, according to an association relationship between a preset code file identifier and interface information, interface information corresponding to the code file identifier of the change code;
the test queue module 303 is configured to add interface information corresponding to the code file identifier of the change code into an interface queue to be tested;
the script determining module 304 is configured to determine, according to an association relationship between preset interface information and a test script, a test script corresponding to the interface information in the interface queue to be tested;
the testing module 305 is configured to test an interface corresponding to the interface information in the interface queue to be tested by using a testing script corresponding to the interface information in the interface queue to be tested, so as to obtain a testing result.
In the embodiment of the invention, the code change information can also comprise the submission time of the change code and the information of a manager;
the test queue module may be further configured to:
and adding the submission time of the change code and the information of the operator into an interface queue to be tested.
In the embodiment of the present invention, the test queue module may be further configured to, after the test queue module adds the interface information corresponding to the code file identifier of the change code to the interface queue to be tested:
and performing duplicate removal processing on the interface information in the interface queue to be tested according to the submission time of the change code and the information of the operator.
In the embodiment of the present invention, the test module may be specifically configured to:
after the change code is deployed to the test environment, acquiring the deployment time of the change code;
and executing a test script corresponding to the interface information in the to-be-tested interface queue at the deployment time of the change code to obtain a test result.
In the embodiment of the present invention, the testing device further includes a sending module, which is configured to, after the testing module obtains the testing result:
and sending the test result to a tester related to the interface information in the interface queue to be tested.
In this embodiment of the present invention, as shown in fig. 4, the apparatus further includes an update module 401, which may be configured to:
under the condition that the test result does not meet the preset requirement and the tester modifies the test script corresponding to the interface information in the interface queue to be tested, obtaining the modified test script;
executing the modified test script based on a code coverage rate detection mechanism, and determining a code file corresponding to interface information in an interface queue to be tested;
and updating the association relation between the code file identification and the interface information according to the code file corresponding to the interface information in the interface queue to be tested.
In this embodiment of the present invention, the update module 401 may further be configured to:
when the interface information is newly added, executing a test script corresponding to the newly added interface information which is compiled in advance based on a code coverage rate detection mechanism, and determining a code file corresponding to the newly added interface information;
and updating the association relation between the code file identification and the interface information according to the code file corresponding to the newly added interface information.
An embodiment of the present invention further provides a computer device, as shown in fig. 5, which is a schematic diagram of the computer device in the embodiment of the present invention, where the computer device 500 includes a memory 510, a processor 520, and a computer program 530 stored in the memory 510 and capable of being executed on the processor 520, and when the processor 520 executes the computer program 530, the interface testing method is implemented.
The embodiment of the invention also provides a computer readable storage medium, which stores a computer program, and the computer program realizes the interface testing method when being executed by a processor.
An embodiment of the present invention further provides a computer program product, where the computer program product includes a computer program, and when the computer program is executed by a processor, the computer program implements the interface testing method.
In the embodiment of the invention, after the code is changed, code change information is obtained, and the code change information comprises a code file identifier of the changed code; determining interface information corresponding to the code file identification of the changed code according to the incidence relation between the preset code file identification and the interface information; adding interface information corresponding to the code file identification of the change code into an interface queue to be tested; determining a test script corresponding to the interface information in the interface queue to be tested according to the preset incidence relation between the interface information and the test script; and testing the interface corresponding to the interface information in the interface queue to be tested by using the test script corresponding to the interface information in the interface queue to be tested to obtain a test result. Compared with the technical scheme of regularly carrying out the full-automatic interface test in the prior art, after the code is changed, the interface associated with the changed code is determined, and only the interface associated with the changed code is tested, so that the test time can be saved, the latest test result can be quickly obtained, the problem can be timely found, and the test efficiency can be improved.
In the embodiment of the invention, after the code deployment is finished, the interface corresponding to the changed code is subjected to incremental testing, so that the testing result can be quickly obtained, and the response can be timely made. Meanwhile, the test time is reduced, and the test efficiency is improved.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (17)

1. An interface testing method, comprising:
after the code is changed, code change information is obtained, wherein the code change information comprises a code file identifier of the changed code;
determining interface information corresponding to the code file identification of the changed code according to the incidence relation between the preset code file identification and the interface information;
adding interface information corresponding to the code file identification of the change code into an interface queue to be tested;
determining a test script corresponding to the interface information in the interface queue to be tested according to the preset incidence relation between the interface information and the test script;
and testing the interface corresponding to the interface information in the interface queue to be tested by using the test script corresponding to the interface information in the interface queue to be tested to obtain a test result.
2. The method of claim 1, wherein the code change information further includes a time of submission of the change code and sponsor information;
adding the interface information corresponding to the code file identifier of the change code into an interface queue to be tested, and further comprising:
and adding the submission time of the change code and the information of the operator into an interface queue to be tested.
3. The method of claim 2, wherein after adding the interface information corresponding to the code file identifier of the change code to the queue of interfaces to be tested, further comprising:
and performing duplicate removal processing on the interface information in the interface queue to be tested according to the submission time of the change code and the information of the operator.
4. The method of claim 1, wherein testing the interface corresponding to the interface information in the interface queue to be tested by using the test script corresponding to the interface information in the interface queue to be tested to obtain a test result, comprises:
after the change code is deployed to the test environment, acquiring the deployment time of the change code;
and executing a test script corresponding to the interface information in the interface queue to be tested at the deployment moment of the change code to obtain a test result.
5. The method of claim 4, wherein obtaining the test results further comprises:
and sending the test result to a tester related to the interface information in the interface queue to be tested.
6. The method of claim 1, further comprising:
under the condition that the test result does not meet the preset requirement and the tester modifies the test script corresponding to the interface information in the interface queue to be tested, obtaining the modified test script;
executing the modified test script based on a code coverage rate detection mechanism, and determining a code file corresponding to interface information in an interface queue to be tested;
and updating the association relation between the code file identification and the interface information according to the code file corresponding to the interface information in the interface queue to be tested.
7. The method of claim 1, further comprising:
when the interface information is newly added, executing a test script corresponding to the newly added interface information which is compiled in advance based on a code coverage rate detection mechanism, and determining a code file corresponding to the newly added interface information;
and updating the association relation between the code file identification and the interface information according to the code file corresponding to the newly added interface information.
8. An interface testing apparatus, comprising:
the information acquisition module is used for acquiring code change information after the code is changed, wherein the code change information comprises a code file identifier of the changed code;
the interface determining module is used for determining interface information corresponding to the code file identification of the change code according to the incidence relation between the preset code file identification and the interface information;
the test queue module is used for adding the interface information corresponding to the code file identifier of the change code into an interface queue to be tested;
the script determining module is used for determining a test script corresponding to the interface information in the interface queue to be tested according to the preset incidence relation between the interface information and the test script;
and the test module is used for testing the interface corresponding to the interface information in the interface queue to be tested by using the test script corresponding to the interface information in the interface queue to be tested to obtain a test result.
9. The apparatus of claim 8, wherein the code change information further comprises a time of submission of the change code and sponsor information;
a test queue module further to:
and adding the submission time of the change code and the information of the operator into an interface queue to be tested.
10. The apparatus of claim 9, further comprising a deduplication module, configured to, after the test queue module adds the interface information corresponding to the code file identifier of the change code to the interface queue to be tested:
and performing duplicate removal processing on the interface information in the interface queue to be tested according to the submission time of the change code and the information of the operator.
11. The apparatus of claim 8, wherein the testing module is specifically configured to:
after the change code is deployed to the test environment, acquiring the deployment time of the change code;
and executing a test script corresponding to the interface information in the interface queue to be tested at the deployment moment of the change code to obtain a test result.
12. The apparatus of claim 11, further comprising a sending module to, after the test module obtains the test result:
and sending the test result to a tester related to the interface information in the interface queue to be tested.
13. The apparatus of claim 8, further comprising an update module to:
under the condition that the test result does not meet the preset requirement and the tester modifies the test script corresponding to the interface information in the interface queue to be tested, obtaining the modified test script;
executing the modified test script based on a code coverage rate detection mechanism, and determining a code file corresponding to interface information in an interface queue to be tested;
and updating the association relation between the code file identification and the interface information according to the code file corresponding to the interface information in the interface queue to be tested.
14. The apparatus of claim 8, wherein the update module is further to:
when the interface information is newly added, executing a test script corresponding to the newly added interface information which is compiled in advance based on a code coverage rate detection mechanism, and determining a code file corresponding to the newly added interface information;
and updating the association relation between the code file identification and the interface information according to the code file corresponding to the newly added interface information.
15. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 7 when executing the computer program.
16. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the method of any of claims 1 to 7.
17. A computer program product, characterized in that the computer program product comprises a computer program which, when being executed by a processor, carries out the method of any one of claims 1 to 7.
CN202210331777.0A 2022-03-31 2022-03-31 Interface test method and device Pending CN114647588A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210331777.0A CN114647588A (en) 2022-03-31 2022-03-31 Interface test method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210331777.0A CN114647588A (en) 2022-03-31 2022-03-31 Interface test method and device

Publications (1)

Publication Number Publication Date
CN114647588A true CN114647588A (en) 2022-06-21

Family

ID=81995862

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210331777.0A Pending CN114647588A (en) 2022-03-31 2022-03-31 Interface test method and device

Country Status (1)

Country Link
CN (1) CN114647588A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115047323A (en) * 2022-08-17 2022-09-13 中诚华隆计算机技术有限公司 Intelligent test method and system for chip

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115047323A (en) * 2022-08-17 2022-09-13 中诚华隆计算机技术有限公司 Intelligent test method and system for chip
CN115047323B (en) * 2022-08-17 2022-10-25 中诚华隆计算机技术有限公司 Intelligent test method and system for chip

Similar Documents

Publication Publication Date Title
CN106970880B (en) Distributed automatic software testing method and system
CN107302476B (en) Automatic testing method and system for testing asynchronous interactive system
US8978009B2 (en) Discovering whether new code is covered by tests
US10579513B2 (en) Test run control method and apparatus
CN111198811A (en) Page automatic test method and device, electronic equipment and storage medium
CN112131116A (en) Automatic regression testing method for embedded software
CN110990285B (en) UI (user interface) automatic testing method and device
CN114647588A (en) Interface test method and device
CN114996127A (en) Intelligent test method and system for solid state disk firmware module
CN111221721B (en) Automatic recording and executing method and device for unit test cases
CN113742215A (en) Method and system for automatically configuring and calling test tool to perform test analysis
CN110990289B (en) Method and device for automatically submitting bug, electronic equipment and storage medium
CN113254326A (en) Method and system for releasing firmware codes of solid state disk by utilizing Jenkins
CN110674038A (en) Method and device for classifying error information in software test
US10481969B2 (en) Configurable system wide tests
CN115373929A (en) Test method, device, equipment, readable storage medium and program product
CN111177014B (en) Software automatic test method, system and storage medium
CN111581081B (en) Automatic test system and method
CN111414194B (en) Interface information generation method, system, electronic equipment and storage medium
CN114637688A (en) Coverage rate statistical method and device based on version branches
CN113986263A (en) Code automation test method, device, electronic equipment and storage medium
CN112181855A (en) API-based automatic testing method and device and computer equipment
CN112346994A (en) Test information correlation method and device, computer equipment and storage medium
CN111651364B (en) SQL (structured query language) checking method and device under parallel development
CN114924955A (en) Product version testing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination