CN114579462A - Method and device for determining test case execution information and computer equipment - Google Patents

Method and device for determining test case execution information and computer equipment Download PDF

Info

Publication number
CN114579462A
CN114579462A CN202210237264.3A CN202210237264A CN114579462A CN 114579462 A CN114579462 A CN 114579462A CN 202210237264 A CN202210237264 A CN 202210237264A CN 114579462 A CN114579462 A CN 114579462A
Authority
CN
China
Prior art keywords
test case
information
transaction log
test
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
CN202210237264.3A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210237264.3A priority Critical patent/CN114579462A/en
Publication of CN114579462A publication Critical patent/CN114579462A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Abstract

The application relates to a method, a device, a computer device, a storage medium and a computer program product for determining test case execution information, which can be used in the field of financial technology or other related fields. The method comprises the following steps: acquiring a test information set and a transaction log information set corresponding to target application software; the test information set comprises a plurality of test cases and a plurality of interface information corresponding to each test case; matching the interface information corresponding to each test case with the transaction log information set to obtain a matching result corresponding to each test case; and determining the execution state corresponding to each test case according to the matching result corresponding to each test case, and obtaining the test case execution information corresponding to the target application software according to the execution state corresponding to each test case. The consistency of the test case execution information determined by the method and the actual test condition of the target application software is high, namely the accuracy of the test case execution information is high.

Description

Method and device for determining test case execution information and computer equipment
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a method and an apparatus for determining test case execution information, a computer device, a storage medium, and a computer program product.
Background
With the development of internet finance, financial institutions such as banks release financial application software such as mobile banking and e-life, and users can conveniently conduct online transactions. Before formal online, the application software needs to be tested on the aspects of function, performance, safety and the like, particularly for a special financial field, the stability and safety of the application software can greatly influence the trust of a user, so that the application software can be online for the user after the test of the application software meets the requirement.
At present, in the test work of financial application software, a tester generally performs a transaction test on application software to be tested according to test cases, and then the tester needs to compare transaction test conditions (that is, actual execution conditions of the application software executing the test cases) with the test cases one by one and record execution states of the test cases, so as to obtain test case execution information of the application software, wherein the test case execution information can reflect the test conditions of the application software.
However, the business scenarios related to the financial application software are diversified, and the test content for the tester is large, and the method for obtaining the test case execution information through manual comparison and recording is prone to manual comparison errors or recording errors, so that the obtained test case execution information is inconsistent with the actual test condition, that is, the accuracy of the obtained test case execution information is not high.
Disclosure of Invention
In view of the above, it is necessary to provide a method, an apparatus, a computer device, a computer readable storage medium, and a computer program product for determining test case execution information, which can improve the accuracy of the test case execution information.
In a first aspect, the present application provides a method for determining test case execution information. The method comprises the following steps:
acquiring a test information set and a transaction log information set corresponding to target application software; the test information set comprises a plurality of test cases and a plurality of interface information corresponding to each test case; the interface information is information of an interface called by the target application software for executing the test cases, and the transaction log information set comprises transaction log information generated by the target application software for executing each test case;
matching a plurality of interface information corresponding to each test case with the transaction log information set to obtain a matching result of each test case;
and determining the execution state of each test case according to the matching result of each test case, and obtaining the test case execution information of the target application software according to the execution state of each test case.
In one embodiment, each interface information corresponds to a stage number, and the stage number of each interface information represents the calling sequence of the interface information in the test case to which the interface information belongs;
the matching between the plurality of interface information corresponding to each test case and the transaction log information set to obtain the matching result of each test case comprises:
taking the interface information corresponding to the minimum series as target interface information, and matching the target interface information with the transaction log information set;
for each target interface information, under the condition that each transaction log information in the transaction log information set does not contain the target interface information, determining a test case corresponding to the target interface information and the grade of the target interface information as a first test case with failed matching;
determining a test case corresponding to the target interface information and the grade of the target interface information as a second test case under the condition that at least one transaction log information in the transaction log information set contains the target interface information;
determining the matching result of the second test case as successful matching under the condition that the target interface information is the last-stage interface information of the second test case;
and under the condition that the target interface information is not the last stage interface information of the second test case, taking the next stage interface information of the target interface information as new target interface information, determining a set formed by the at least one transaction log information as a new transaction log information set, and returning to execute the step of matching the target interface information and the transaction log information set.
In one embodiment, the matching the transaction log information sets with the interface information corresponding to each test case to obtain a matching result of each test case includes:
for each test case, matching a plurality of interface information corresponding to the test case with the transaction log information set, and determining the matching result of the test case as successful matching under the condition that at least one transaction log information in the transaction log information set contains all interface information corresponding to the test case;
and under the condition that all transaction log information in the transaction log information set does not contain all interface information corresponding to the test case, determining the matching result of the test case as matching failure.
In one embodiment, the determining the execution state of each test case according to the matching result of each test case includes:
for each test case, determining the execution state of the test case as successful execution under the condition that the matching result of the test case is successful matching;
and determining the execution state of the test case as the execution failure under the condition that the matching result of the test case is the matching failure.
In one embodiment, each transaction log information in the transaction log information set further includes transaction status information; the transaction state information indicates that the transaction state of the target application software executing the test case is transaction success or transaction failure;
determining the execution state of the test case as successful execution under the condition that the matching result of the test case is successful, wherein the determining comprises the following steps:
determining the at least one transaction log information containing all interface information corresponding to the test case as target transaction log information under the condition that the matching result of the test case is successful;
and under the condition that the transaction state information contained in the target transaction log information represents that the transaction is successful, determining the execution state of the test case as successful execution.
In one embodiment, the obtaining of the test information set corresponding to the target application software includes:
acquiring each service scene information corresponding to the target application software and a test case corresponding to each service scene information;
extracting interface information corresponding to the service scene information from each service scene information;
and obtaining a test information set according to the test cases corresponding to the service scene information and the interface information corresponding to the service scene information.
In a second aspect, the present application further provides a device for determining test case execution information. The device comprises:
the acquisition module is used for acquiring a test information set and a transaction log information set corresponding to the target application software; the test information set comprises a plurality of test cases and a plurality of interface information corresponding to each test case; the interface information is information of an interface called by the target application software for executing the test cases, and the transaction log information set comprises transaction log information generated by the target application software for executing each test case;
the matching module is used for matching the transaction log information set according to a plurality of interface information corresponding to each test case to obtain a matching result of each test case;
and the determining module is used for determining the execution state of each test case according to the matching result of each test case and obtaining the test case execution information of the target application software according to the execution state of each test case.
In one embodiment, each interface information corresponds to a stage number, and the stage number of each interface information represents the calling sequence of the interface information in the test case to which the interface information belongs;
the matching module is specifically configured to:
taking the interface information corresponding to the minimum level as target interface information, and matching the target interface information with the transaction log information set; for each target interface information, under the condition that each transaction log information in the transaction log information set does not contain the target interface information, determining a test case corresponding to the target interface information and the grade of the target interface information as a first test case with failed matching; determining a test case corresponding to the target interface information and the grade of the target interface information as a second test case under the condition that at least one transaction log information in the transaction log information set contains the target interface information; determining the matching result of the second test case as successful matching under the condition that the target interface information is the last-stage interface information of the second test case; and under the condition that the target interface information is not the last-stage interface information of the second test case, taking the next-stage interface information of the target interface information as new target interface information, determining a set formed by the at least one transaction log information as a new transaction log information set, and returning to execute the step of matching the target interface information and the transaction log information set.
In one embodiment, the matching module is specifically configured to:
for each test case, matching a plurality of interface information corresponding to the test case with the transaction log information set, and determining the matching result of the test case as successful matching under the condition that at least one transaction log information in the transaction log information set contains all interface information corresponding to the test case; and under the condition that all transaction log information in the transaction log information set does not contain all interface information corresponding to the test case, determining the matching result of the test case as matching failure.
In one embodiment, the determining module is specifically configured to:
for each test case, determining the execution state of the test case as successful execution under the condition that the matching result of the test case is successful matching; and determining the execution state of the test case as the execution failure under the condition that the matching result of the test case is the matching failure.
In one embodiment, each transaction log information in the transaction log information set further includes transaction status information; the transaction state information indicates that the transaction state of the target application software executing the test case is transaction success or transaction failure;
the determining module is specifically configured to:
determining the at least one transaction log information containing all interface information corresponding to the test case as target transaction log information under the condition that the matching result of the test case is successful; and under the condition that the transaction state information contained in the target transaction log information represents that the transaction is successful, determining the execution state of the test case as successful execution.
In one embodiment, the obtaining module is specifically configured to:
acquiring each service scene information corresponding to the target application software and a test case corresponding to each service scene information; extracting interface information corresponding to the service scene information from each service scene information; and obtaining a test information set according to the test cases corresponding to the service scene information and the interface information corresponding to the service scene information.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the following steps when executing the computer program:
acquiring a test information set and a transaction log information set corresponding to target application software; the test information set comprises a plurality of test cases and a plurality of interface information corresponding to each test case; the interface information is information of an interface called by the target application software for executing the test cases, and the transaction log information set comprises transaction log information generated by the target application software for executing each test case;
matching a plurality of interface information corresponding to each test case with the transaction log information set to obtain a matching result of each test case;
and determining the execution state of each test case according to the matching result of each test case, and obtaining the test case execution information of the target application software according to the execution state of each test case.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring a test information set and a transaction log information set corresponding to target application software; the test information set comprises a plurality of test cases and a plurality of interface information corresponding to each test case; the interface information is information of an interface called by the target application software for executing the test cases, and the transaction log information set comprises transaction log information generated by the target application software for executing each test case;
matching the plurality of interface information corresponding to each test case with the transaction log information set to obtain a matching result of each test case;
and determining the execution state of each test case according to the matching result of each test case, and obtaining the test case execution information of the target application software according to the execution state of each test case.
In a fifth aspect, the present application further provides a computer program product. The computer program product comprising a computer program which when executed by a processor performs the steps of:
acquiring a test information set and a transaction log information set corresponding to target application software; the test information set comprises a plurality of test cases and a plurality of interface information corresponding to each test case; the interface information is information of an interface called by the target application software for executing the test cases, and the transaction log information set comprises transaction log information generated by the target application software for executing each test case;
matching a plurality of interface information corresponding to each test case with the transaction log information set to obtain a matching result of each test case;
and determining the execution state of each test case according to the matching result of each test case, and obtaining the test case execution information of the target application software according to the execution state of each test case.
According to the method, the device, the computer equipment, the storage medium and the computer program product for determining the test case execution information, the interface information corresponding to each test case is matched with the transaction log information set to obtain the matching result of each test case, then the execution state of each test case is determined according to the matching result of each test case, and further the test case execution information of the target application software is obtained. If a certain test case is successfully executed, it indicates that at least one transaction test successfully calls all interfaces corresponding to the test case, and then transaction log information generated by the transaction test contains all interface information corresponding to the test case; if all the transaction log information does not contain all the interface information corresponding to the test case, it is indicated that the test case is not executed or only a part of the test case is executed, and both the two cases can be regarded as execution failure. Therefore, the execution state of each test case can be accurately determined according to the matching result of each test case, and the test case execution information of the target application software is further obtained. Compared with the test case execution information which is manually compared and recorded, the consistency of the test case execution information determined by the method and the actual test condition of the target application software is high, namely the accuracy of the test case execution information is high.
Drawings
FIG. 1 is a flowchart illustrating a method for determining test case execution information according to an embodiment;
FIG. 2 is a flowchart illustrating obtaining a matching result for each test case in one embodiment;
FIG. 3 is a flowchart illustrating obtaining a matching result of each test case in another embodiment;
FIG. 4 is a block diagram illustrating an exemplary apparatus for determining test case execution information;
FIG. 5 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
First, before specifically describing the technical solution of the embodiment of the present application, a technical background or a technical evolution context on which the embodiment of the present application is based is described. With the development of internet finance, financial institutions such as banks release financial application software such as mobile banking and e-life, and users can conveniently conduct online transactions. Before formal online, the application software needs to be tested on the aspects of function, performance, safety and the like, particularly for a special financial field, the stability and safety of the application software can greatly influence the trust of a user, so that the application software can be online for the user after the test of the application software meets the requirement. At present, in the test work of financial application software, a tester generally performs a transaction test on the application software to be tested according to test cases, and then the tester needs to compare transaction test conditions (that is, actual execution conditions of the application software executing the test cases) with the test cases one by one and record the execution states of the test cases. For example, if the tester judges that a certain test case is successfully executed according to the transaction test condition, the execution state of the test case is recorded as successful execution; if the test case is judged to be unsuccessfully executed, recording the test case as an execution failure; if the transaction test is not performed on a certain test case, the execution state of the test case is temporarily unexecuted, so that the test case execution information of the application software can be obtained. The testing personnel and the product manager can know the testing condition of the application software according to the test case execution information, and if the execution states of all the test cases in the test case execution information are successfully executed, the application software passes the corresponding test.
However, the financial application software launched by banks is of many types, and the business scenario related to each application software is diverse, so that the test content responsible for the tester is many, and the method for obtaining the test case execution information through manual comparison and recording is prone to causing manual comparison errors or recording errors, so that the obtained test case execution information is inconsistent with the actual test condition of the application software, that is, the accuracy of the obtained test case execution information is not high. If the application software that actually fails the test is brought on line due to the error of the comparison record, a large loss may be caused. Based on the background, the applicant provides the determination method of the test case execution information through long-term research and development and experimental verification, and the test case execution information with high accuracy can be obtained. In addition, it should be noted that the applicant has paid a lot of creative efforts in finding the technical problems of the present application and the technical solutions described in the following embodiments.
In an embodiment, as shown in fig. 1, a method for determining test case execution information is provided, which is described by taking the method as an example applied to a terminal, and it is understood that the method may also be applied to a server, and may also be applied to a system including the terminal and the server, and is implemented through interaction between the terminal and the server. The terminal can be but not limited to various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, portable wearable devices and the like, and the server can be realized by an independent server or a server cluster formed by a plurality of servers. In this embodiment, the method includes the steps of:
step 101, obtaining a test information set and a transaction log information set corresponding to target application software.
The test information set comprises a plurality of test cases and a plurality of interface information corresponding to each test case. The interface information is information of an interface called by the target application software for executing the test case, and the interface information may be a name or other identifier (such as an interface number) of the interface. The transaction log information set comprises transaction log information generated by executing each test case by the target application software.
In implementation, a tester can set corresponding test cases for each business scenario related to the target application software, and determine a plurality of interface information corresponding to each test case. For example, for a service scenario of "e-life short message installment" related to the target application software "e-life", a corresponding test case may be set according to the service scenario, and a transaction test corresponding to the test case is executed by the target application software (e-life) to generate transaction log information. If the transaction test corresponding to the test case is successfully executed, the target application software calls an interface (for example, recorded as interface a1) corresponding to the installment-the interface (for example, recorded as interface b1) corresponding to the short message installment, so that the interface information corresponding to the test case is "interface a1 and interface b1 (which may be names or other identifiers of the interfaces)". The terminal may store each test case and the interface information in advance to obtain a test information set. The tester can execute corresponding transaction tests through the target application software according to the test cases so as to obtain transaction log information generated by the transaction tests. Each transaction log information may contain information of the interface actually invoked when the target application software performs the corresponding transaction test.
In this embodiment, the terminal may obtain a pre-stored test information set and transaction log information set corresponding to the target application software. It can be understood that the test information set acquired by the terminal may include all the test cases set for the target application software, or may include part of the test cases, and a tester may enable the terminal to acquire the test information set including all or part of the test cases according to the current test requirements.
And 102, matching the plurality of interface information corresponding to each test case with the transaction log information set to obtain a matching result of each test case.
In implementation, after the terminal acquires the test information set and the transaction log information set, the interface information corresponding to each test case in the test information set may be matched with the transaction log information set, for example, the interface information corresponding to each test case may be used as a keyword, and the keyword matching may be performed in the transaction log information set to obtain a matching result of each test case.
And 103, determining the execution state of each test case according to the matching result of each test case, and obtaining the test case execution information of the target application software according to the execution state of each test case.
In implementation, the terminal may determine the execution state of each test case according to the matching result of each test case, for example, if interface information corresponding to a certain test case is used as a keyword, when the keyword is matched in the transaction log information set, at least one transaction log information is matched, that is, at least one transaction log information includes the interface information corresponding to the test case, the execution state of the test case may be determined as successful execution; if the transaction log information is not matched, that is, the transaction log information in the transaction log information set does not contain the interface information corresponding to the test case, the execution state of the test case can be determined as an execution failure. Then, the terminal can collect the execution state of each test case to obtain the test case execution information of the target application software. The test case execution information at least includes an identifier of the test case (for example, a number or a name of the test case) and an execution state of the test case.
Optionally, the terminal may further obtain tester information corresponding to each test case in the test information set, and output all test case execution information or only test case execution information with an execution state of execution failure to the tester and related personnel through modes of OA system prompting, system to-do or mail prompting, and the like, thereby implementing an automatic early warning mechanism.
In the method for determining the test case execution information, the test information set and the transaction log information set corresponding to the target application software are obtained, the matching result of each test case is obtained according to the matching of the interface information corresponding to each test case in the test information set and the transaction log information set, then the execution state of each test case is determined according to the matching result of each test case, and further the test case execution information of the target application software is obtained. If a certain test case is successfully executed, it indicates that at least one transaction test successfully calls all interfaces corresponding to the test case, and then transaction log information generated by the transaction test contains all interface information corresponding to the test case; if all the transaction log information does not contain all the interface information corresponding to the test case, it is indicated that the test case is not executed or only a part of the test case is executed, and both the two cases can be regarded as execution failure. Therefore, the interface information corresponding to each test case is matched with the transaction log information set, the execution state of each test case can be accurately determined according to the matching result of each test case, and the test case execution information of the target application software with higher accuracy is further obtained.
In one embodiment, each interface information corresponds to a stage number, and the stage number of each interface information represents the calling sequence of the interface information in the test case to which the interface information belongs. As shown in fig. 2, the specific process of obtaining the matching result of each test case in step 102 includes the following steps:
step 201, taking the interface information corresponding to the minimum level as target interface information, and matching the target interface information with the transaction log information set.
In implementation, in a plurality of interface information corresponding to each test case, each interface information corresponds to a stage number, and the stage number of each interface information represents a calling sequence of the interface information in the test case to which the interface information belongs. For example, for the service scenario of "e-sms installment", the corresponding interface information is "interface a1 and interface b 1" according to the test case set in the service scenario, and the calling order of each interface is to call interface a1 first and then interface b1, so the number of stages of interface a1 can be set as one stage, and the number of stages of interface b1 can be set as two stages. The level of the interface information corresponding to other test cases is the same, and the interface information corresponding to each test case and the level corresponding to each interface information may be stored in a table form, such as the test case interface information table shown in table 1. The different test cases may include part of the same interface information, and the stage numbers of the same interface information in the different test cases may be the same or different. For example, in table 1, test case 1 and test case 2 contain the same interface information a1, and the number of stages of the interface information a1 in the two test cases is the same; test case 3 and test case 5 contain the same interface information c1, and the level of interface information c1 differs in the two test cases.
TABLE 1 test case interface information sheet
Figure BDA0003540397680000111
The terminal may use the interface information corresponding to the minimum level as the target interface information, which is described by taking the test case interface information table shown in table 1 as an example, and the terminal may use the first-level interface information as the target interface information if the interface information corresponding to the minimum level is the first-level interface information, in this example, the target interface information includes a1 and a 2. The terminal may then match each target interface information with the transaction log information set, e.g., the terminal may match each transaction log information in the transaction log information set with target interface information "a 1" as a keyword.
Step 202, for each target interface information, under the condition that each transaction log information in the transaction log information set does not contain the target interface information, determining the test case corresponding to the target interface information and the grade of the target interface information as a first test case with matching failure.
In implementation, for each target interface information, if the transaction log information including the target interface information is not matched in the transaction log information set by the terminal, that is, the transaction log information in the transaction log information set does not include the target interface information, the terminal may determine the test case corresponding to the target interface information and the stage number of the target interface information as the first test case with matching failure. For example, as shown in test cases 1 to 6 in table 1, if the terminal does not match transaction log information including the target interface information "a 2" in the transaction log information set, the terminal may determine test cases (i.e., test cases 5 and 6) corresponding to the target interface information "a 2" and one stage (the stage of the target interface information "a 2" is one stage) as the first test case with a matching failure, i.e., determine the matching result of the test cases 5 and 6 as a matching failure.
Step 203, in case that at least one transaction log information in the transaction log information set includes the target interface information, determining the test case corresponding to the target interface information and the stage number of the target interface information as a second test case.
In implementation, for each target interface information, if the terminal matches at least one transaction log information in the transaction log information set, where the transaction log information includes the target interface information, the terminal may determine, as the second test case, the test case corresponding to the target interface information and the stage number of the target interface information. For example, as shown in test cases 1 to 6 in table 1, if the terminal matches at least one transaction log information (e.g., 4 transaction log information) including the target interface information "a 1" in the transaction log information set, the terminal may determine the test cases (i.e., test cases 1 to 4) corresponding to the target interface information "a 1" and one stage (the stage of the target interface information "a 1" is one stage) as the second test case.
And 204, determining the matching result of the second test case as successful matching under the condition that the target interface information is the last-stage interface information of the second test case.
In implementation, after the terminal determines the second test case, the terminal may further determine whether the target interface information is the last level interface information of the second test case, and if the target interface information is the last level interface information of the second test case, determine the matching result of the second test case as successful matching.
And step 205, in the case that the target interface information is not the last stage interface information of the second test case, taking the next stage interface information of the target interface information as new target interface information, determining a set formed by the at least one transaction log information as a new transaction log information set, and returning to execute the step of matching the target interface information and the transaction log information set.
In implementation, if the terminal determines that the target interface information is not the last level interface information of the second test case, the terminal may use the next level interface information of the target interface information as new target interface information, determine a set composed of at least one transaction log information containing the target interface information as a new transaction log information set, and then return to the step of matching the target interface information with the transaction log information set in the execution step 201. For example, for the example in step 203, none of the target interface information "a 1" is the last level interface information of the second test cases 1 to 4, the terminal may take the next level interface information (i.e., the secondary interface information b1, b2 and b3) of the target interface information "a 1" as new target interface information, and the terminal may compose 4 transaction log information including the target interface information "a 1" into a new transaction log information set. The terminal may then match the new target interface information (i.e., secondary interface information b1, b2, and b3) with the new set of transaction log information.
For each new target interface information, if the terminal does not match the transaction log information containing the new target interface information in the new transaction log information set, for example, does not match the transaction log information containing the interface information b1, the terminal may determine, as a first test case with a failed matching, a test case (i.e., test case 1) corresponding to the new target interface information (i.e., interface information b1) and the level (i.e., level two) of the new target interface information, from among the determined second test cases; if the terminal matches at least one transaction log information in the new transaction log information set, where the transaction log information includes the new target interface information, for example, 1 transaction log information is matched, where the transaction log information includes interface information b2, and 2 transaction log information includes new target interface information b3, the terminal may determine, as the second test case, a test case (i.e., test case 2) corresponding to the new target interface information b2 and the level number (i.e., second level) of the new target interface information, and test cases (i.e., test cases 3 and 4) corresponding to the new target interface information b3 and the level number (i.e., second level) of the new target interface information, and further determine whether the new target interface information is the last level interface information of the second test case.
In this example, the target interface information b2 is the last level interface information of the test case 2, and the terminal may determine that the matching result of the test case 2 is a successful matching; if the target interface information b3 is not the last level interface information of the test cases 3 and 4, the terminal may use the next level interface information (interface information c1 and c2) of the target interface information b3 as new target interface information, determine a set of 2 transaction log information including the target interface information b3 as a new transaction log information set, and then return to perform the step of matching the target interface information with the transaction log information set, thereby determining the matching result of each test case.
In the embodiment, the interface information corresponding to each test case is classified, the interface information is matched step by step from the interface information of the minimum level, and if the interface information of each level (from the minimum level to the last level) corresponding to a certain test case is successfully matched, at least one transaction log information is indicated to contain all the interface information corresponding to the test case, so that the matching result of the test case is determined to be successful; if the matching of the target interface information of a certain level fails (namely the transaction log information containing the target interface information of the previous level is not matched in the transaction log information set containing the target interface information of the previous level), the matching result of each test case corresponding to the target interface information of the level is determined as the matching failure, namely, the interface information of the next level does not need to be further matched, and the matching result of each test case corresponding to the target interface information of the level can be obtained at the same time, so that the matching result of each test case can be accurately and efficiently determined.
In an embodiment, as shown in fig. 3, the specific process of obtaining the matching result corresponding to each test case in step 102 includes the following steps:
step 301, for each test case, matching a plurality of interface information corresponding to the test case with the transaction log information set, and determining that the matching result of the test case is successful under the condition that at least one transaction log information in the transaction log information set contains all interface information corresponding to the test case.
And 302, under the condition that all transaction log information in the transaction log information set does not contain all interface information corresponding to the test cases, determining the matching result of the test cases as matching failure.
In implementation, the terminal may match, for each test case, several pieces of interface information corresponding to the test case with the transaction log information set acquired in step 101. For example, the terminal may use 2 interface information "a 1" and "b 1" corresponding to the test case 1 in table 1 as keywords, perform keyword matching in the transaction log information set, and if at least one piece of matched transaction log information includes all interface information "a 1" and "b 1" corresponding to the test case, the terminal may determine that the matching result of the test case 1 is a successful matching; if the transaction log information containing the interface information "a 1" and "b 1" is not matched, that is, each transaction log information does not contain all the interface information corresponding to the test case, the terminal may determine the matching result corresponding to the test case 1 as a matching failure.
The embodiment provides another specific method for matching interface information, and the matching result of each test case can be accurately determined by performing full matching on all interface information corresponding to each test case and transaction log information in a transaction log information set.
In an embodiment, the process of determining the execution state corresponding to each test case in step 103 specifically includes: for each test case, determining the execution state of the test case as successful execution under the condition that the matching result of the test case is successful matching; and determining the execution state of the test case as the execution failure under the condition that the matching result of the test case is the matching failure.
In implementation, for each test case, the terminal may determine that the execution state corresponding to the test case is successfully executed if the matching result corresponding to the test case is a successful matching, and may determine that the execution state corresponding to the test case is failed if the matching result corresponding to the test case is a failed matching.
In this embodiment, according to the matching result corresponding to each test case, it can be effectively and accurately determined that the execution state corresponding to each test case is execution success or execution failure.
In one embodiment, each transaction log information in the transaction log information set further includes transaction state information, and the transaction state information indicates that the transaction state of the target application software executing the test case is transaction success or transaction failure. The process of determining the execution state corresponding to the test case as successful execution specifically includes the following steps:
under the condition that the matching result of the test case is successful, determining at least one transaction log information containing all interface information corresponding to the test case as target transaction log information; and determining the execution state of the test case as successful execution under the condition that the transaction state information contained in the target transaction log information indicates successful transaction.
In implementation, the transaction log information may further include transaction state information, that is, when the tester executes the corresponding transaction test through the target application software according to each test case, the transaction state information of each transaction test may indicate that the transaction state of each test case executed by the target application software is a transaction success or a transaction failure. If the terminal determines that the matching result of the test case is successful, it indicates that at least one transaction log information including all interface information corresponding to the test case is matched according to the interface information matching step, so that the terminal can determine the transaction log information including all interface information corresponding to the test case as target transaction log information and further determine transaction state information in the target transaction log information. If the transaction state information contained in the target transaction log information indicates that the transaction is successful, the terminal can determine the execution state of the test case as successful execution; if the target transaction log information contains the transaction state information indicating that the transaction failed, the execution state of the test case may be determined as the execution failure, or may be marked as a third execution state, for example, marked as the full flow is executed but the transaction fails. It can be understood that, for a test case that a transaction test target such as counterexample or destructive test is a transaction failure, the execution state of the test case can be determined to be successful when the transaction state information of the target transaction log information indicates that the transaction has failed. The transaction test targets of the test cases can be identified in advance to distinguish the transaction test targets of the test cases as transaction success or transaction failure.
In this embodiment, the execution state of the test case may be further determined according to the transaction state information when the matching result of the test case is that the matching is successful, so that the execution information of the test case may be more accurately determined, and the test case that is successfully matched but does not reach the transaction test target may be marked as a third execution state, so that the tester may more clearly know the execution state of each test case.
In an embodiment, the process of acquiring the test information set in step 101 specifically includes: acquiring all service scene information corresponding to target application software and test cases corresponding to all the service scene information; extracting interface information corresponding to the service scene information from each service scene information; and obtaining a test information set according to the test cases corresponding to the business scene information and the interface information corresponding to the business scene information.
In implementation, in the process of developing the target application software, information files (i.e., service scenario information) of each service scenario related to the target application software may be formed, so that a tester sets a corresponding test case according to each service scenario information. The terminal can acquire each service scenario information corresponding to the target application software and the test case corresponding to each service scenario information, and extract the interface information corresponding to the service scenario information from the service scenario information. Then, the terminal may summarize the test cases corresponding to the service scene information and the interface information corresponding to the service scene information to obtain a test information set for a subsequent interface information matching step.
Optionally, transaction log information generated by the tester performing the transaction test may be stored in the log module. The log module can also contain transaction log information of other testers for testing and transaction log information of other application software, and the terminal can perform pre-screening on the transaction log information in the log module. For example, the identity information of the tester, the test time, the application software identifier and the like can be used as screening conditions to screen out transaction log information meeting requirements, and the transaction log information is combined into a transaction log information set for subsequent interface information matching so as to improve the matching efficiency.
In one example, a tester needs to test a plurality of application software and determine test case execution information of each application software respectively, and then the terminal may match with each transaction log information in the log module according to the identification information of each application software as a keyword to obtain a transaction log information set corresponding to each application software. Each application software is a target application software, and the determination method of the test case execution information is executed for each application software respectively to obtain the test case execution information of each application software.
In this embodiment, the interface information is extracted through the service scenario information corresponding to the target application software, so that the interface information included in the test information set can be ensured, the information of all interfaces called in the process of successful execution of each test case is obtained, the matching result of each test case is further obtained according to the interface information matching, and the accuracy of the execution information of each test case can be ensured.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the present application further provides a device for determining test case execution information, which is used for implementing the method for determining test case execution information. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the method, so that specific limitations in the following embodiment of the device for determining one or more test case execution information may refer to the limitations in the foregoing method for determining test case execution information, and are not described herein again.
In one embodiment, as shown in fig. 4, an apparatus 400 for determining test case execution information is provided, including: an obtaining module 401, a matching module 402 and a determining module 403, wherein:
an obtaining module 401, configured to obtain a test information set and a transaction log information set corresponding to target application software; the test information set comprises a plurality of test cases and a plurality of interface information corresponding to each test case; the interface information is information of an interface called by the target application software executing the test cases, and the transaction log information set comprises transaction log information generated by the target application software executing each test case.
The matching module 402 is configured to match the transaction log information set with the interface information corresponding to each test case to obtain a matching result of each test case.
The determining module 403 is configured to determine an execution state of each test case according to the matching result of each test case, and obtain test case execution information of the target application software according to the execution state of each test case.
In one embodiment, each interface information corresponds to a stage number, and the stage number of each interface information represents a calling sequence of the interface information in the test case to which the interface information belongs. The matching module 402 is specifically configured to:
taking the interface information corresponding to the minimum level as target interface information, and matching the target interface information with the transaction log information set; for each target interface information, under the condition that each transaction log information in the transaction log information set does not contain the target interface information, determining a test case corresponding to the target interface information and the grade number of the target interface information as a first test case with matching failure; determining a test case corresponding to the target interface information and the grade of the target interface information as a second test case under the condition that at least one transaction log information in the transaction log information set contains the target interface information; determining the matching result of the second test case as successful matching under the condition that the target interface information is the last-stage interface information of the second test case; and under the condition that the target interface information is not the last-stage interface information of the second test case, taking the next-stage interface information of the target interface information as new target interface information, determining a set formed by at least one transaction log information as a new transaction log information set, and returning to execute the step of matching the target interface information and the transaction log information set.
In one embodiment, the matching module 402 is specifically configured to:
for each test case, matching a plurality of interface information corresponding to the test case with a transaction log information set, and determining the matching result of the test case as successful matching under the condition that at least one transaction log information in the transaction log information set contains all interface information corresponding to the test case; and under the condition that all transaction log information in the transaction log information set does not contain all interface information corresponding to the test cases, determining the matching result of the test cases as matching failure.
In an embodiment, the determining module 403 is specifically configured to:
for each test case, determining the execution state of the test case as successful execution under the condition that the matching result of the test case is successful matching; and determining the execution state of the test case as the execution failure under the condition that the matching result of the test case is the matching failure.
In one embodiment, each transaction log information in the transaction log information set further includes transaction status information; the transaction state information indicates that the transaction state of the target application software for executing the test case is transaction success or transaction failure. The determining module 403 is specifically configured to:
determining at least one transaction log information containing all interface information corresponding to the test case as target transaction log information under the condition that the matching result of the test case is successful; and determining the execution state of the test case as successful execution under the condition that the transaction state information contained in the target transaction log information indicates successful transaction.
In an embodiment, the obtaining module 401 is specifically configured to:
acquiring all service scene information corresponding to target application software and test cases corresponding to all the service scene information; extracting interface information corresponding to the service scene information from each service scene information; and obtaining a test information set according to the test cases corresponding to the business scene information and the interface information corresponding to the business scene information.
The modules in the device for determining the test case execution information may be implemented in whole or in part by software, hardware, or a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 5. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device 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 comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a method of determining test case execution information. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the above-described method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
In an embodiment, a computer program product is provided, comprising a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
The method, the device, the computer equipment, the storage medium and the computer program product for determining the test case execution information relate to the technical field of artificial intelligence, can be used in the field of financial science and technology or other related fields, and are not limited in application fields.
It should be noted that, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), Magnetic Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A method for determining test case execution information, the method comprising:
acquiring a test information set and a transaction log information set corresponding to target application software; the test information set comprises a plurality of test cases and a plurality of interface information corresponding to each test case; the interface information is information of an interface called by the target application software for executing the test cases, and the transaction log information set comprises transaction log information generated by the target application software for executing each test case;
matching a plurality of interface information corresponding to each test case with the transaction log information set to obtain a matching result of each test case;
and determining the execution state of each test case according to the matching result of each test case, and obtaining the test case execution information of the target application software according to the execution state of each test case.
2. The method according to claim 1, wherein each interface information corresponds to a stage number, and the stage number of each interface information represents a calling sequence of the interface information in the test case;
the matching between the plurality of interface information corresponding to each test case and the transaction log information set to obtain the matching result of each test case includes:
taking the interface information corresponding to the minimum series as target interface information, and matching the target interface information with the transaction log information set;
for each target interface information, under the condition that each transaction log information in the transaction log information set does not contain the target interface information, determining a test case corresponding to the target interface information and the grade of the target interface information as a first test case with failed matching;
determining a test case corresponding to the target interface information and the grade of the target interface information as a second test case under the condition that at least one transaction log information in the transaction log information set contains the target interface information;
determining the matching result of the second test case as successful matching under the condition that the target interface information is the last-stage interface information of the second test case;
and under the condition that the target interface information is not the last-stage interface information of the second test case, taking the next-stage interface information of the target interface information as new target interface information, determining a set formed by the at least one transaction log information as a new transaction log information set, and returning to execute the step of matching the target interface information and the transaction log information set.
3. The method of claim 1, wherein the matching the transaction log information set with a plurality of interface information corresponding to each of the test cases to obtain a matching result of each of the test cases comprises:
for each test case, matching a plurality of interface information corresponding to the test case with the transaction log information set, and determining the matching result of the test case as successful matching under the condition that at least one transaction log information in the transaction log information set contains all interface information corresponding to the test case;
and under the condition that all transaction log information in the transaction log information set does not contain all interface information corresponding to the test case, determining the matching result of the test case as matching failure.
4. The method according to claim 2 or 3, wherein the determining the execution state of each of the test cases according to the matching result of each of the test cases comprises:
for each test case, determining the execution state of the test case as successful execution under the condition that the matching result of the test case is successful matching;
and determining the execution state of the test case as the execution failure under the condition that the matching result of the test case is the matching failure.
5. The method of claim 4, wherein each transaction log information in the set of transaction log information further includes transaction status information; the transaction state information indicates that the transaction state of the target application software executing the test case is transaction success or transaction failure;
determining the execution state of the test case as successful execution under the condition that the matching result of the test case is successful, wherein the determining comprises the following steps:
determining the at least one transaction log information containing all interface information corresponding to the test case as target transaction log information under the condition that the matching result of the test case is successful;
and determining the execution state of the test case as successful execution under the condition that the transaction state information contained in the target transaction log information indicates successful transaction.
6. The method according to claim 1, wherein the obtaining of the test information set corresponding to the target application software comprises:
acquiring each service scene information corresponding to the target application software and a test case corresponding to each service scene information;
extracting interface information corresponding to the service scene information from each service scene information;
and obtaining a test information set according to the test cases corresponding to the service scene information and the interface information corresponding to the service scene information.
7. An apparatus for determining test case execution information, the apparatus comprising:
the acquisition module is used for acquiring a test information set and a transaction log information set corresponding to the target application software; the test information set comprises a plurality of test cases and a plurality of interface information corresponding to each test case; the interface information is information of an interface called by the target application software for executing the test cases, and the transaction log information set comprises transaction log information generated by the target application software for executing each test case;
the matching module is used for matching the transaction log information set according to a plurality of interface information corresponding to each test case to obtain a matching result of each test case;
and the determining module is used for determining the execution state of each test case according to the matching result of each test case and obtaining the test case execution information of the target application software according to the execution state of each test case.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program realizes the steps of the method of any one of claims 1 to 6 when executed by a processor.
CN202210237264.3A 2022-03-10 2022-03-10 Method and device for determining test case execution information and computer equipment Pending CN114579462A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210237264.3A CN114579462A (en) 2022-03-10 2022-03-10 Method and device for determining test case execution information and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210237264.3A CN114579462A (en) 2022-03-10 2022-03-10 Method and device for determining test case execution information and computer equipment

Publications (1)

Publication Number Publication Date
CN114579462A true CN114579462A (en) 2022-06-03

Family

ID=81780634

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210237264.3A Pending CN114579462A (en) 2022-03-10 2022-03-10 Method and device for determining test case execution information and computer equipment

Country Status (1)

Country Link
CN (1) CN114579462A (en)

Similar Documents

Publication Publication Date Title
US20210241273A1 (en) Smart contract platform
CN112035350B (en) Test method and device for block chain system and computer equipment
CN112711640A (en) Method and device for configuring business handling process
CN113312259B (en) Interface testing method and device
CN111159482A (en) Data verification method and system
CN108228611B (en) Document information copying method and device
CN116561003A (en) Test data generation method, device, computer equipment and storage medium
CN114579462A (en) Method and device for determining test case execution information and computer equipment
CN114490415A (en) Service testing method, computer device, storage medium, and computer program product
CN113902415A (en) Financial data checking method and device, computer equipment and storage medium
CN113835780A (en) Event response method and device
US11443064B2 (en) Verifiable removal of item of confidential information from data of a record
CN113806372B (en) New data information construction method, device, computer equipment and storage medium
CN117455386A (en) Resource auditing method and device, computer equipment and storage medium thereof
CN117194217A (en) Interface testing method, device, computer equipment and storage medium
CN117390000A (en) Resource exchange data processing method, system, computer device and storage medium
CN118035095A (en) Method and device for testing business processing object, computer equipment and storage medium
CN117331812A (en) Service code verification method, device, computer equipment, storage medium and product
CN115033478A (en) Test resource pushing method, device, equipment, storage medium and program product
CN117436057A (en) Security verification method, security verification device, computer equipment and storage medium
CN117435478A (en) Program logic function detection method, device, computer equipment and storage medium
CN115271353A (en) Checking task assignment method and device, computer equipment and storage medium
CN113342681A (en) Regression testing method and device
CN115982151A (en) Data redundancy identification method and device, electronic equipment and storage medium
CN115187211A (en) Transaction item checking method and device, storage medium and equipment

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