CN117632741A - Determination method and device of regression test case library, electronic equipment and storage medium - Google Patents

Determination method and device of regression test case library, electronic equipment and storage medium Download PDF

Info

Publication number
CN117632741A
CN117632741A CN202311657751.6A CN202311657751A CN117632741A CN 117632741 A CN117632741 A CN 117632741A CN 202311657751 A CN202311657751 A CN 202311657751A CN 117632741 A CN117632741 A CN 117632741A
Authority
CN
China
Prior art keywords
test case
regression test
coverage
determining
function
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
CN202311657751.6A
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.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202311657751.6A priority Critical patent/CN117632741A/en
Publication of CN117632741A publication Critical patent/CN117632741A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method and a device for determining a regression test case library, electronic equipment and a storage medium, and relates to the technical field of testing, wherein the method comprises the following steps: determining attribute information of a function to be tested; determining coverage item information of a function to be tested based on the attribute information, wherein the coverage item information comprises at least one coverage dimension, and the coverage dimension comprises at least one equivalent parameter; and determining a regression test case resource library of the function to be tested based on each equivalent parameter of each coverage dimension. According to the technical scheme, the regression test case resource library of the function to be tested can be determined according to the coverage dimension of the function to be tested, the equivalent parameters of each coverage dimension and other coverage item information, the number of test cases of the regression test is reduced while the regression test effect is ensured, the test time of the regression test is shortened, the test workload of a tester is reduced, and the test efficiency of the function to be tested is improved.

Description

Determination method and device of regression test case library, electronic equipment and storage medium
Technical Field
The present invention relates to the field of testing technologies, and in particular, to a method and apparatus for determining a regression test case library, an electronic device, and a storage medium.
Background
Regression testing is a type of verifiability test that is re-performed after an original code of a software application/system has been modified to check whether the current modification introduced a new error or caused other code to produce an error. The regression test depends on the regression test case resource library, so the construction mode of the regression test case resource library is one of the key problems for the tested personnel to pay attention to.
At present, the construction method of the test case resource library used for the regression test mainly comprises two types, wherein one type is to construct the regression test case resource library based on all test cases used by the software application/system, and the other type is to select part of test cases from the resource whole library to form the regression test case resource library based on test experience by a tester.
However, the regression test case resource library constructed by all the test cases used by the software application/system has larger test case quantity, the regression test cannot use all the test cases, the test case utilization rate is low, the test efficiency is limited, the test staff selects the test cases from the resource full library based on test experience, the test ability of the test staff depends on the test ability, once the test ability of the test staff is limited or the test staff is doped with subjective consciousness, the selection of the test cases is not representative, the overall of the constructed regression test case resource library is limited, and the effect of the regression test is affected.
Disclosure of Invention
The invention provides a method, a device, electronic equipment and a storage medium for determining a regression test case library, and aims to reduce the number of test cases of a regression test while ensuring the regression test effect, shorten the test time of the regression test, reduce the test workload of testers and improve the test efficiency of functions to be tested.
According to an aspect of the present invention, there is provided a method for determining a regression test case library, the method comprising:
determining attribute information of a function to be tested;
determining coverage item information of a function to be tested based on the attribute information, wherein the coverage item information comprises at least one coverage dimension, and the coverage dimension comprises at least one equivalent parameter;
and determining a regression test case resource library of the function to be tested based on each equivalent parameter of each coverage dimension.
Optionally, determining the regression test case resource library of the function to be tested based on each equivalent parameter of each coverage dimension includes: determining a first regression test case resource library, wherein no test case exists in the first regression test case resource library; sequentially adding test cases corresponding to the equivalent parameters of each coverage dimension into a first regression test case resource library; and after all the test cases corresponding to the equivalent parameters of each coverage dimension are added to the first regression test case resource library, determining the first regression test case resource library as a regression test case resource library.
Optionally, determining the regression test case resource library of the function to be tested based on each equivalent parameter of each coverage dimension includes: determining a second regression test case resource library, wherein the second regression test case resource library is a regression test case resource full library of the function to be tested; and matching in the regression test case resource full library based on each equivalent parameter, and determining the regression test case resource library according to the matching result.
Optionally, after determining the regression test case resource library of the function to be tested, the method further includes: determining whether an update instruction of a regression test case resource library is received; and if the update instruction is received, updating the regression test case resource library.
Optionally, the update instruction includes a function adjustment instruction and a time limit instruction, wherein the function adjustment instruction includes an adjustment type and an adjustment content, and the adjustment type includes adding the adjustment content and deleting the adjustment content.
Optionally, when the update instruction is a function adjustment instruction, updating the regression test case resource library includes: determining whether the adjustment type is adding adjustment content or deleting adjustment content or whether the adjustment content exists in the coverage item information; if the adjustment type is to add adjustment content and the adjustment content does not exist in the coverage item information, adding the test case corresponding to the adjustment content to a regression test case resource library; if the adjustment type is that the adjustment content is deleted and the adjustment content exists in the coverage item information, deleting the test case corresponding to the adjustment content in the regression test case resource library; wherein the adjustment content is an equivalent parameter of the overlay dimension or an equivalent parameter of the overlay dimension and the overlay dimension.
Optionally, when the update instruction is a time limit instruction, updating the regression test case resource library includes: determining the latest use time of the test case corresponding to each equivalent parameter; determining invalid equivalent parameters based on the preset duration, each latest use time and the current time, wherein the invalid equivalent parameters are equivalent parameters with the time difference between the latest use time and the current time being greater than or equal to the preset duration; and deleting the test cases corresponding to the invalid equivalent parameters in the regression test case resource library.
According to another aspect of the present invention, there is provided a device for determining a regression test case library, where the device for determining a regression test case library applies to implement the method for determining a regression test case library in any embodiment of the present invention, the device includes:
the acquisition module is used for determining the function to be tested and the attribute information of the function to be tested;
the system comprises a determining module, a testing module and a judging module, wherein the determining module is used for determining coverage item information of a function to be tested based on attribute information, wherein the coverage item information comprises at least one coverage dimension, and the coverage dimension comprises at least one equivalent parameter;
the construction module is used for determining a regression test case resource library of the function to be tested based on each equivalent parameter of each coverage dimension.
According to another aspect of the present invention, there is provided an electronic device including:
at least one processor; and a memory communicatively coupled to the at least one processor;
the memory stores a computer program executable by the at least one processor, so that the at least one processor can execute the regression test case library determination method according to any embodiment of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement a method for determining a regression test case library according to any one of the embodiments of the present invention when executed.
According to the technical scheme, the function to be tested and the attribute information of the function to be tested are determined; determining coverage item information of a function to be tested based on the attribute information, wherein the coverage item information comprises at least one coverage dimension, and the coverage dimension comprises at least one equivalent parameter; and determining a regression test case resource library of the function to be tested based on each equivalent parameter of each coverage dimension. The regression test case resource library of the function to be tested can be determined according to the coverage dimension of the function to be tested and the coverage item information such as the equivalent parameters of each coverage dimension, the number of the test cases of the regression test is reduced while the regression test effect is ensured, the test time of the regression test is shortened, the test workload of a tester is reduced, and the test efficiency of the function to be tested is improved. The method solves the problems that the number of the regression test case resource library test cases constructed by all the test cases used by the software application/system is large, all the test cases cannot be used in the regression test, the utilization rate of the test cases is low, and the test efficiency is limited; the method for selecting the test cases from the resource full library by the testers based on the test experience depends on the test capability of the testers, and once the test capability of the testers is limited or subjective consciousness is doped, the selection of the test cases is not representative, the comprehensiveness of the constructed regression test case resource library is limited, and the regression test effect is affected.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for determining a regression testing case library according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for determining a regression testing case library according to a second embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a determining device for a regression testing case library according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flow chart of a method for determining a regression test case library according to a first embodiment of the present invention, where the embodiment may be applied to the case of building and maintaining a regression test case resource library of a function/software application/system to be tested based on coverage dimensions and equivalence classes of the function/software application/system to be tested, and the method may be performed by a device for determining a regression test case library according to the present invention, where the device may be implemented in a hardware and/or software form, and in a specific embodiment, the device may be integrated in an electronic device. The following embodiment will be described taking the example of the integration of the apparatus in an electronic device, and referring to fig. 1, the method specifically includes the following steps:
S101, determining attribute information of the function to be tested.
The function to be tested can be understood as a function requiring regression testing in a banking system, including transfer, remittance, deposit, withdrawal and the like, and the attribute information of the function to be tested can be understood as the associated information of the function to be tested, namely the associated parameters related to the function to be tested. Specifically, taking a bank transfer function as an example, the input items related to the transfer function include parameters such as a payee, a transaction amount, a payer, an account arrival time, a transfer passage (belonging to logic rules), a used transaction medium, and the like, and such parameters can be understood as attribute information of the transfer function, and the attribute information of the function to be determined can be used for determining coverage dimensions of the function to be tested and equivalent parameters of each coverage dimension.
For example, determining a function to be tested and attribute information of the function to be tested may be understood as determining specific content of the function to be tested (for example, what the function to be tested is) and associated information of the function to be tested (for example, what parameters are involved when the function to be tested is used).
The method has the advantages that coverage item information such as coverage dimensions of functions to be tested and equivalent parameters of the coverage dimensions can be quickly carded out, and the construction rate of the regression test case resource library is improved.
S102, determining coverage item information of the function to be tested based on the attribute information.
The coverage item information may be understood as an integration result of attribute information of the function to be tested, including at least one coverage dimension, where the coverage dimension includes at least one equivalent parameter, and the equivalent parameter may be understood as an equivalent class obtained after the coverage dimension is processed by using an equivalent class division method.
Specifically, taking a bank account transfer function as an example, attribute information of the account transfer function comprises a payee, a transaction amount, a payer, account arrival time, an account transfer channel, a used transaction medium and the like, and each attribute information is analyzed, classified and integrated to comb out five covering dimensions of the transaction amount, the account arrival form, the payee, a security medium and the account transfer channel. Wherein the equivalent parameters of the transaction amount include categories of less than the payment token (which can be understood as a soft token in a banking system), greater than the payment token, less than 100 tens of thousands, greater than 500 tens of thousands, etc.; the equivalent parameters of the account form comprise the categories of real-time in line, delay in line, real-time across line, delay across line and the like, the equivalent parameters of the payee comprise the categories of the line, the other line and the like, the equivalent parameters of the security medium comprise the categories of payment labels (which can be understood as soft token in a bank system), K treasures, faces, K reams and the like, the equivalent parameters of the transfer channel comprise the categories of in-line, super-network, silver-connected, small amount, large amount and the like, and the coverage item information is the information set of each coverage dimension and each equivalent parameter of each coverage dimension.
It should be noted that the equivalent parameters of each coverage dimension may be set and adjusted according to the test requirements and the test rules of the system, which is not limited in this embodiment.
Determining coverage information of the function to be tested based on the attribute information may be understood as analyzing and integrating the attribute information of the function to be tested to obtain at least one coverage dimension of the function to be tested and each equivalent parameter of each coverage dimension. The method has the advantages that the coverage item capable of comprehensively covering the attribute information of the function to be tested can be formulated, so that a comprehensive, concise and accurate regression test case resource library of the function to be tested can be constructed.
S103, determining a regression test case resource library of the function to be tested based on each equivalent parameter of each coverage dimension.
The regression test case resource library can be understood as a case library composed of test cases corresponding to the equivalent parameters of each coverage dimension.
Specifically, determining the regression test case resource library of the function to be tested based on each equivalent parameter of each coverage dimension can be understood as determining the test case of each equivalent parameter of the function to be tested, and determining the regression test case resource library according to the combination result of the test cases of each equivalent parameter.
In one embodiment, determining a regression test case repository for a function to be tested based on each equivalent parameter for each overlay dimension includes: determining a first regression test case resource library, wherein no test case exists in the first regression test case resource library; sequentially adding test cases corresponding to the equivalent parameters of each coverage dimension into a first regression test case resource library; and after all the test cases corresponding to the equivalent parameters of each coverage dimension are added to the first regression test case resource library, determining the first regression test case resource library as a regression test case resource library.
The regression test case resource library can be constructed by sequentially adding the test cases corresponding to the equivalent parameters of the coverage dimension of the function to be tested into the empty resource library.
The first regression test case resource library can be regarded as an empty case resource library, the test case adding mode can be to sequentially add the test cases with the equivalent parameters to the first regression test case resource library according to the arrangement sequence of the coverage dimensions and the equivalent parameters of the coverage dimensions until all the equivalent parameters are added to the first regression test case resource library, and the first regression test case resource library containing all the coverage item information of the function to be tested is the regression test case resource library to be constructed.
Taking the transfer function as an example, five coverage dimensions of the transfer function are transaction amount, an account-arrival form, a payee, a security medium and a transfer channel in sequence, equivalent parameters of the transaction amount are less than a payment mark limit, greater than a payment mark limit, less than 100 ten thousand, greater than 100 ten thousand and greater than 500 ten thousand in sequence, equivalent parameters of the account-arrival form are real-time in line, delay in line, real-time in line and delay in line, equivalent parameters of the payee are principal line and other line in sequence, equivalent parameters of the security medium are payment mark, K treasures, face and K orders in sequence, and equivalent parameters of the transfer channel are line, super network, silver-connected, small and large. Firstly, the invention adds the test cases with transaction amount smaller than the payment mark limit, larger than the payment mark limit, smaller than 100 ten thousand, larger than 100 ten thousand and larger than 500 ten thousand into the first regression test case resource library, and continuously adds the test cases with account form, payee, security medium and each equivalent parameter of the transfer channel until the large test cases are added into the transfer channel, and determines that the first regression test case resource library is the regression test case resource library.
It should be noted that if the first regression test case resource library is not an empty library, it is required to sequentially detect whether the first regression test case resource library contains test cases corresponding to each equivalent parameter of each coverage dimension, if not, adding the test case of the equivalent parameter, and if so, continuously detecting the next equivalent parameter or the next coverage dimension until the equivalent parameters of all coverage dimensions are detected, and determining that the construction of the regression test case resource library is completed.
In another embodiment, determining a regression test case repository for a function to be tested based on each equivalent parameter for each overlay dimension includes: determining a second regression test case resource library, wherein the second regression test case resource library is a regression test case resource full library of the function to be tested; and matching in the regression test case resource full library based on each equivalent parameter, and determining the regression test case resource library according to the matching result.
The regression test case resource library can be constructed by integrating the test cases in the history regression test case resource library, for example, redundant test cases (test cases which are irrelevant to the coverage dimension and the equivalent parameter of the function to be tested) in the history regression test case resource library are deleted, candidate test cases (test cases which are not contained in the history regression test case resource library and are not included in the coverage dimension and the equivalent parameter of the function to be tested) are added into the history regression test case resource library, and the like.
The second regression test case resource library is a regression test case resource full library of the function to be tested, namely the history regression test case resource library. Specifically, in general, the historical regression test case resource library includes all test cases related to the function to be tested, that is, the test cases in the historical regression test case resource library include not only the test cases corresponding to the coverage item information, but also invalid test cases unrelated to the coverage item information.
Specifically, the essence of matching in the regression test case resource full library based on the equivalent parameters is to select test cases of the equivalent parameters from the regression test case resource full library so as to construct the regression test case resource library according to the test cases of the equivalent parameters.
For example, assuming that the regression test case resource complete library includes test case 1, test case 2 and test case 3, the coverage dimension includes dimension 1 and dimension 2, dimension 1 includes equivalent parameter 1, dimension 2 includes equivalent parameter 2, equivalent parameter 1 corresponds to test case 3, equivalent parameter 2 corresponds to test case 1, then the matching result can be understood as test case 1 and test case 3 screened from the regression test case resource complete library based on equivalent parameter 1 and equivalent parameter 2, and the constructed regression test case resource library is the test case library composed of test case 1 and test case 3.
The method introduces the concept of coverage dimension, effectively reduces the number of cases of the regression test case asset library (namely the resource library), reduces the construction time, construction cost and maintenance cost of the regression test case resource library, and shortens the regression test time. And secondly, each test case of the invention has corresponding coverage dimension and equivalent parameter, and the establishment of the case of the regression test case asset library is based on the fact that the establishment of the case is reasonable, and the dimension, equivalent item and factor related to the case are clear.
Table 1 is a summary table of coverage information of a regression test case repository with transfer function, and whether the coverage is in Table 1 is a test case showing that the regression test case repository contains the equivalent parameters.
TABLE 1
As can be seen from Table 1, the constructed regression test case resource library contains test cases of all coverage dimensions of the function to be tested and all equivalent parameters of each coverage dimension.
Furthermore, the invention can display the coverage information of the function to be tested so that the testers can know and check the related data of the function to be tested, and the testers can conveniently maintain and update the regression test case resource library of the function to be tested.
According to the technical scheme, the function to be tested and the attribute information of the function to be tested are determined; determining coverage item information of a function to be tested based on the attribute information, wherein the coverage item information comprises at least one coverage dimension, and the coverage dimension comprises at least one equivalent parameter; and determining a regression test case resource library of the function to be tested based on each equivalent parameter of each coverage dimension. The regression test case resource library of the function to be tested can be determined according to the coverage dimension of the function to be tested and the coverage item information such as the equivalent parameters of each coverage dimension, the number of the test cases of the regression test is reduced while the regression test effect is ensured, the test time of the regression test is shortened, the test workload of a tester is reduced, and the test efficiency of the function to be tested is improved. The method solves the problems that the number of the regression test case resource library test cases constructed by all the test cases used by the software application/system is large, all the test cases cannot be used in the regression test, the utilization rate of the test cases is low, and the test efficiency is limited; the method for selecting the test cases from the resource full library by the testers based on the test experience depends on the test capability of the testers, and once the test capability of the testers is limited or subjective consciousness is doped, the selection of the test cases is not representative, the comprehensiveness of the constructed regression test case resource library is limited, and the regression test effect is affected.
Example two
Fig. 2 is a flow chart of a method for determining a regression test case library according to a second embodiment of the present invention, where the present embodiment may be applied to the case of building and maintaining a regression test case resource library of a function/software application/system to be tested based on coverage dimensions and equivalence classes of the function/software application/system to be tested, and the method may be performed by a device for determining a regression test case library according to the present invention, where the device may be implemented in a hardware and/or software form, and in a specific embodiment, the device may be integrated in an electronic device. The following embodiment will be described taking the example of the integration of the device in an electronic apparatus, and referring to fig. 2, the method specifically includes the following steps:
s201, determining attribute information of the function to be tested.
In this embodiment, the function to be tested may be understood as a function requiring regression testing in a banking system, including transfer, remittance, deposit, withdrawal, etc., and the attribute information of the function to be tested may be understood as related information of the function to be tested, that is, related parameters related to the function to be tested. Specifically, taking a bank transfer function as an example, the input items related to the transfer function include parameters such as a payee, a transaction amount, a payer, an account arrival time, a transfer passage (belonging to logic rules), a used transaction medium, and the like, and such parameters can be understood as attribute information of the transfer function, and the attribute information of the function to be determined can be used for determining coverage dimensions of the function to be tested and equivalent parameters of each coverage dimension.
S202, determining coverage item information of the function to be tested based on the attribute information.
In this embodiment, the coverage information may be understood as an integration result of attribute information of the function to be tested, including at least one coverage dimension, where the coverage dimension includes at least one equivalent parameter, and the equivalent parameter may be understood as an equivalent class obtained after the coverage dimension is processed by using an equivalent class division method. Taking a bank account transfer function as an example, attribute information of the account transfer function comprises a payee, a transaction amount, a payer, account arrival time, an account transfer channel, a used transaction medium and the like, and the attribute information is analyzed, classified and integrated to obtain five covering dimensions of the transaction amount, the account arrival form, the payee, a security medium and the account transfer channel. Wherein the equivalent parameters of the transaction amount comprise less than the payment sign limit, greater than the payment sign limit, less than 100 tens of thousands, greater than 500 tens of thousands and the like; the equivalent parameters of the account form comprise the categories of real-time in line, delay in line, real-time across line, delay across line and the like, the equivalent parameters of the payee comprise the categories of the present line, the other line and the like, the equivalent parameters of the security medium comprise the categories of payment marks, K treasures, faces, K reams and the like, and the equivalent parameters of the transfer channel comprise the categories of in line, super network, silver-colored couplet, small amount, large amount and the like.
S203, determining a regression test case resource library of the function to be tested based on each equivalent parameter of each coverage dimension.
In this embodiment, the regression test case repository may be understood as a test case repository composed of test cases corresponding to each equivalent parameter of each overlay dimension. Specifically, determining the regression test case resource library of the function to be tested based on each equivalent parameter of each coverage dimension can be understood as determining the test case of each equivalent parameter of the function to be tested, and determining the regression test case resource library according to the combination result of the test cases of each equivalent parameter.
S204, determining whether an update instruction of the regression test case resource library is received.
If the update instruction is received, S205 is executed, otherwise S204 is continued.
In order to ensure the instantaneity, indirection and comprehensiveness of the regression test case resource library, the embodiment can adjust the test cases in the regression test case resource library in real time, for example, the test cases with newly added equivalent parameters with the coverage dimension, the test cases with outdated equivalent parameters with the coverage dimension, and the like, and the embodiment is not limited to the above.
The update instruction of the regression test case resource library can be understood as indicative information of the test case for adjusting the regression test case resource library, and the update instruction comprises a function adjustment instruction and a time limit instruction, wherein the function adjustment instruction comprises an adjustment type and an adjustment content, the adjustment type comprises adding the adjustment content and deleting the adjustment content, the adjustment content comprises a coverage dimension and an equivalent parameter, and the time limit instruction can be understood as indicative information of deleting the overdue test case.
S205, updating a regression test case resource library.
Specifically, updating the regression test case repository may be understood as adjusting test cases in the regression test case repository based on an update instruction, for example, adding test cases corresponding to adjustment content to the regression test case repository based on increasing adjustment content requirements, deleting test cases corresponding to adjustment content in the regression test case repository based on deleting adjustment content requirements, deleting test cases exceeding a time limit (generally, test cases not used in a preset time period) based on a time limit instruction, and the like, which is not limited by the embodiment.
When the update instruction is a function adjustment instruction, updating the regression test case resource library, including: determining whether the adjustment type is adding adjustment content or deleting adjustment content or whether the adjustment content exists in the coverage item information; if the adjustment type is to add adjustment content and the adjustment content does not exist in the coverage item information, adding the test case corresponding to the adjustment content to a regression test case resource library; if the adjustment type is that the adjustment content is deleted and the adjustment content exists in the coverage item information, deleting the test case corresponding to the adjustment content in the regression test case resource library; wherein the adjustment content is an equivalent parameter of the overlay dimension or an equivalent parameter of the overlay dimension and the overlay dimension.
The adjustment content comprises equivalent parameters, an overlay dimension and equivalent parameters of the overlay dimension, and the equivalent parameters are used for indicating specific items needing to be added or deleted. Specifically, whether to add or delete a test case is also determined, and the test case is added to the regression test case resource library only when the test case to be added is a test case not in the regression test case resource library, and similarly, the test case is deleted from the regression test case resource library only when the test case to be deleted is a test case existing in the regression test case resource library.
In an embodiment, a requirement of adding adjustment content is received, the adjustment content is a mobile phone shield of a security medium, and each equivalent parameter of the security medium, which is a coverage dimension, is detected, and the equivalent parameter of the mobile phone shield is not included in the existing resource library, so that a test case of the mobile phone shield is added to the existing regression test case resource library.
And the table 2 is a coverage information summary table of the regression test case resource library added with the mobile phone shield, namely, the updated coverage information summary table of the regression test case resource library, and similarly, whether the coverage in the table 2 is a test case indicating that the regression test case resource library contains the equivalent parameters.
TABLE 2
As can be seen from Table 2, the updated regression test case repository has an additional property of the handset shield as compared to the original regression test case repository (i.e., table 1).
In another embodiment, a requirement of adding adjustment content is received, the adjustment content is a transfer statement (coverage dimension), the transfer statement includes three equivalent parameters of a number of characters less than 10, a number of characters equal to 10 and a number of characters greater than 10, the coverage dimension is detected, the coverage dimension of the transfer statement is not included in the existing repository, the coverage dimension of the transfer statement is added, and test cases corresponding to the equivalent parameters of the transfer statement are added to the existing regression test case repository.
TABLE 3 Table 3
And in the same way, whether the coverage item in the table 3 is a test case indicating that the regression test case resource library contains the equivalent parameter is in the coverage item.
As can be seen from Table 3, the updated regression test case library adds the asset of the transfer statement as compared to the original regression test case library (i.e., table 1).
When the update instruction is a time limit instruction, updating the regression test case resource library, including: determining the latest use time of the test case corresponding to each equivalent parameter; determining invalid equivalent parameters based on the preset duration, each latest use time and the current time, wherein the invalid equivalent parameters are equivalent parameters with the time difference between the latest use time and the current time being greater than or equal to the preset duration; and deleting the test cases corresponding to the invalid equivalent parameters in the regression test case resource library.
The latest use time can be understood as the latest use time of the test case, the preset time length can be understood as a standard for determining whether the test case fails, specifically, the invention considers that the test case with the time difference between the latest use time and the current time being greater than or equal to the preset time length is the failure test case, the equivalent parameter corresponding to the failure test case is an invalid equivalent parameter, the preset time length is related according to the construction logic of the test case, and the embodiment does not limit the failure test case.
It is worth noting that after deleting the test cases corresponding to the invalid equivalent parameters in the regression test case resource library, the invalid equivalent parameters are deleted from the coverage information table, so that the instantaneity, the comprehensiveness and the integrity of the coverage information table are ensured.
According to the technical scheme, the function to be tested and the attribute information of the function to be tested are determined; determining coverage item information of a function to be tested based on the attribute information, wherein the coverage item information comprises at least one coverage dimension, and the coverage dimension comprises at least one equivalent parameter; determining a regression test case resource library of the function to be tested based on each equivalent parameter of each coverage dimension; determining whether an update instruction of a regression test case resource library is received; if an update instruction is received, updating a regression test case resource library; and if the update instruction is not received, returning to the step of executing the update instruction for determining whether the regression test case resource library is received. The regression test case resource library of the function to be tested can be determined according to the coverage dimension of the function to be tested and the coverage item information such as the equivalent parameters of each coverage dimension, the number of the test cases of the regression test is reduced while the regression test effect is ensured, the test time of the regression test is shortened, the test workload of a tester is reduced, and the test efficiency of the function to be tested is improved. And secondly, the invention can also update the regression test case resource library at regular time to ensure the comprehensiveness, the integrity and the effectiveness of the regression test case resource library. The method solves the problems that the number of the regression test case resource library test cases constructed by all the test cases used by the software application/system is large, all the test cases cannot be used in the regression test, the utilization rate of the test cases is low, and the test efficiency is limited; the method for selecting the test cases from the resource full library by the testers based on the test experience depends on the test capability of the testers, and once the test capability of the testers is limited or subjective consciousness is doped, the selection of the test cases is not representative, the comprehensiveness of the constructed regression test case resource library is limited, and the regression test effect is affected.
Example III
Fig. 3 is a schematic structural diagram of a determining device for a regression testing case library according to a third embodiment of the present invention. As shown in fig. 3, the apparatus includes: an acquisition module 301, a determination module 302 and a construction module 303.
The obtaining module 301 is configured to determine a function to be tested and attribute information of the function to be tested.
A determining module 302, configured to determine coverage information of the function to be tested based on the attribute information, where the coverage information includes at least one coverage dimension, and the coverage dimension includes at least one equivalent parameter.
The construction module 303 is configured to determine a regression test case resource library of the function to be tested based on each equivalent parameter of each coverage dimension.
Optionally, the determining module 302 is specifically configured to determine a first regression test case resource library, where no test case exists in the first regression test case resource library; sequentially adding test cases corresponding to the equivalent parameters of each coverage dimension into a first regression test case resource library; and after all the test cases corresponding to the equivalent parameters of each coverage dimension are added to the first regression test case resource library, determining the first regression test case resource library as a regression test case resource library.
Optionally, the determining module 302 is specifically configured to determine a second regression test case resource library, where the second regression test case resource library is a regression test case resource full library of the function to be tested; and matching in the regression test case resource full library based on each equivalent parameter, and determining the regression test case resource library according to the matching result.
Optionally, the construction module 303 is further configured to determine whether an update instruction of the regression test case resource library is received after determining the regression test case resource library of the function to be tested; and if the update instruction is received, updating the regression test case resource library.
Optionally, the update instruction includes a function adjustment instruction and a time limit instruction, wherein the function adjustment instruction includes an adjustment type and an adjustment content, and the adjustment type includes adding the adjustment content and deleting the adjustment content.
Optionally, when the update instruction is a function adjustment instruction, the construction module 303 is specifically configured to determine whether the adjustment type is adding adjustment content or deleting adjustment content, and whether adjustment content exists in the coverage item information; if the adjustment type is to add adjustment content and the adjustment content does not exist in the coverage item information, adding the test case corresponding to the adjustment content to a regression test case resource library; if the adjustment type is that the adjustment content is deleted and the adjustment content exists in the coverage item information, deleting the test case corresponding to the adjustment content in the regression test case resource library; wherein the adjustment content is an equivalent parameter of the overlay dimension or an equivalent parameter of the overlay dimension and the overlay dimension.
Optionally, when the update instruction is a time limit instruction, the construction module 303 is specifically configured to determine the latest use time of the test case corresponding to each equivalent parameter; determining invalid equivalent parameters based on the preset duration, each latest use time and the current time, wherein the invalid equivalent parameters are equivalent parameters with the time difference between the latest use time and the current time being greater than or equal to the preset duration; and deleting the test cases corresponding to the invalid equivalent parameters in the regression test case resource library.
The determining device of the regression test case library provided by the embodiment of the invention can execute the determining method of the regression test case library provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the executing method.
Example IV
Fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a Memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a random access Memory (also referred to as a random access Memory, random Access Memory, RAM) 13, etc., in which a computer program executable by the at least one processor is stored, and the processor 11 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the determination of a regression test case library.
In some embodiments, the method of determining the regression test case library may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the regression test case library determination method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the method of determining the regression test case library in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above can be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server) or that includes a middleware component (e.g., an application server) or that includes a front-end component through which a user can interact with an implementation of the systems and techniques described here, or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for determining a regression test case library, comprising:
determining attribute information of a function to be tested;
determining coverage information of the function to be tested based on the attribute information, wherein the coverage information comprises at least one coverage dimension, and the coverage dimension comprises at least one equivalent parameter;
and determining a regression test case resource library of the function to be tested based on each equivalent parameter of each coverage dimension.
2. The method of claim 1, wherein determining the regression test case resource library for the function under test based on each equivalent parameter for each overlay dimension comprises:
determining a first regression test case resource library, wherein no test case exists in the first regression test case resource library;
sequentially adding test cases corresponding to the equivalent parameters of each coverage dimension into the first regression test case resource library;
and after all the test cases corresponding to the equivalent parameters of each coverage dimension are added to the first regression test case resource library, determining the first regression test case resource library as the regression test case resource library.
3. The method of claim 1, wherein determining the regression test case resource library for the function under test based on each equivalent parameter for each overlay dimension comprises:
determining a second regression test case resource library, wherein the second regression test case resource library is a regression test case resource full library of the function to be tested;
and matching in the regression test case resource total library based on the equivalent parameters, and determining the regression test case resource library according to a matching result.
4. The method of claim 1, further comprising, after determining the regression test case repository for the function under test:
determining whether an update instruction of the regression test case resource library is received;
and if the updating instruction is received, updating the regression test case resource library.
5. The method of claim 4, wherein the update instructions comprise function adjustment instructions and time limit instructions, wherein the function adjustment instructions comprise an adjustment type and adjustment content, the adjustment type comprising adding adjustment content and deleting adjustment content.
6. The method of claim 5, wherein when the update instruction is the function adjustment instruction, the updating the regression test case repository comprises:
determining whether the adjustment type is the addition adjustment content or the deletion adjustment content, and whether the adjustment content exists in the coverage item information;
if the adjustment type is the added adjustment content and the adjustment content does not exist in the coverage item information, adding a test case corresponding to the adjustment content to the regression test case resource library;
If the adjustment type is the adjustment content deleting and the adjustment content exists in the coverage item information, deleting the test case corresponding to the adjustment content in the regression test case resource library;
wherein the adjustment content is an equivalent parameter of the coverage dimension or an equivalent parameter of the coverage dimension and the coverage dimension.
7. The method of claim 5, wherein when the update instruction is the time limit instruction, the updating the regression test case repository comprises:
determining the latest use time of the test case corresponding to each equivalent parameter;
determining invalid equivalent parameters based on preset duration, each latest use time and the current time, wherein the invalid equivalent parameters are equivalent parameters with the time difference between the latest use time and the current time being greater than or equal to the preset duration;
and deleting the test cases corresponding to the invalid equivalent parameters in the regression test case resource library.
8. A regression test case library determining apparatus, comprising:
the acquisition module is used for determining a function to be tested and attribute information of the function to be tested;
a determining module, configured to determine coverage information of the function to be tested based on the attribute information, where the coverage information includes at least one coverage dimension, and the coverage dimension includes at least one equivalent parameter;
And the construction module is used for determining the regression test case resource library of the function to be tested based on each equivalent parameter of each coverage dimension.
9. An electronic device, the electronic device comprising:
at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the regression test case library determination method of any one of claims 1 to 7.
10. A computer readable storage medium storing computer instructions for causing a processor to implement the method of determining a regression test case library of any one of claims 1 to 7 when executed.
CN202311657751.6A 2023-12-05 2023-12-05 Determination method and device of regression test case library, electronic equipment and storage medium Pending CN117632741A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311657751.6A CN117632741A (en) 2023-12-05 2023-12-05 Determination method and device of regression test case library, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311657751.6A CN117632741A (en) 2023-12-05 2023-12-05 Determination method and device of regression test case library, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117632741A true CN117632741A (en) 2024-03-01

Family

ID=90031842

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311657751.6A Pending CN117632741A (en) 2023-12-05 2023-12-05 Determination method and device of regression test case library, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117632741A (en)

Similar Documents

Publication Publication Date Title
CN116431505A (en) Regression testing method and device, electronic equipment, storage medium and product
CN115599679A (en) Test rule base updating method and device, electronic equipment and storage medium
CN115794744A (en) Log display method, device, equipment and storage medium
CN114490408A (en) Test case generation method, device, equipment, storage medium and product
CN115242731A (en) Message processing method, device, equipment and storage medium
CN114693116A (en) Method and device for detecting code review validity and electronic equipment
CN117632741A (en) Determination method and device of regression test case library, electronic equipment and storage medium
CN111429257B (en) Transaction monitoring method and device
CN114443493A (en) Test case generation method and device, electronic equipment and storage medium
CN114490406A (en) Test coverage item management method, device, equipment and medium
CN116070601B (en) Data splicing method and device, electronic equipment and storage medium
CN116955504B (en) Data processing method and device, electronic equipment and storage medium
CN117609086A (en) Method and device for determining test content, electronic equipment and storage medium
CN117762781A (en) Determination method and device for test cases, electronic equipment and storage medium
CN115983222A (en) EasyExcel-based file data reading method, device, equipment and medium
CN115797033A (en) Capital supervision method and device, electronic equipment and storage medium
CN116308713A (en) Multiplexing method and device for business transaction codes, electronic equipment and storage medium
CN117437033A (en) Early warning method, early warning device, early warning equipment and readable storage medium
CN117455684A (en) Data processing method, device, electronic equipment, storage medium and product
CN116720972A (en) System docking method and device, electronic equipment and storage medium
CN115600819A (en) Risk assessment method and device, electronic equipment and storage medium
CN118037024A (en) Service processing method and device, electronic equipment and storage medium
CN116150031A (en) Program performance test early warning method, device, equipment and storage medium
CN115617462A (en) Test script generation method, device, equipment and storage medium
CN117708201A (en) Association rule mining method and device, electronic equipment and storage medium

Legal Events

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