CN112015655A - Test case distribution method, device, equipment and readable storage medium - Google Patents

Test case distribution method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN112015655A
CN112015655A CN202010902715.1A CN202010902715A CN112015655A CN 112015655 A CN112015655 A CN 112015655A CN 202010902715 A CN202010902715 A CN 202010902715A CN 112015655 A CN112015655 A CN 112015655A
Authority
CN
China
Prior art keywords
tested
function
test
cases
regression
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.)
Granted
Application number
CN202010902715.1A
Other languages
Chinese (zh)
Other versions
CN112015655B (en
Inventor
李刘强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202010902715.1A priority Critical patent/CN112015655B/en
Publication of CN112015655A publication Critical patent/CN112015655A/en
Application granted granted Critical
Publication of CN112015655B publication Critical patent/CN112015655B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application provides a test case allocation method, a test case allocation device, test case allocation equipment and a readable storage medium, wherein the regression weight of a function to be tested is calculated according to the conversion rate of the function to be tested and the problem rate of the function to be tested, the conversion rate indicates the probability of transaction when the function to be tested responds to click operation, the problem rate indicates the probability of problem occurrence when the function to be tested responds to a preset initial regression test, the function to be tested is any function to be regressed, the number of cases of the function to be tested is calculated according to the preset total number of cases and the regression weight of the function to be tested, and the preset test cases are allocated to the function to be tested according to the number of cases. The regression weight of the function to be tested can represent the necessary degree of regression testing of the function to be tested in all functions, the defect of poor testing effect caused by subjectively determining the number of cases of the function to be tested according to experience is avoided, and the accuracy and the comprehensiveness of the coverage range of the testing cases are improved.

Description

Test case distribution method, device, equipment and readable storage medium
Technical Field
The present application relates to the field of software testing technologies, and in particular, to a method, an apparatus, a device, and a readable storage medium for distributing test cases.
Background
Regression testing refers to re-testing after the code has been modified to confirm that the modification has not introduced new errors. The regression test is used as a component of the software life cycle, and occupies a great workload proportion in the whole software test process, and multiple regression tests can be carried out at each stage of software development.
At present, in the regression testing process of software, a tester allocates a test case for each function according to testing experience, and in the regression testing, the number of the test cases of the function is influenced by the horizontal factors and the subjective factors of the tester, so that the testing effect of the regression testing is poor.
Disclosure of Invention
The application provides a method, a device, equipment and a readable storage medium for distributing test cases, which aim to improve the test effect of regression testing and comprise the following steps:
a method of distributing test cases, comprising:
calculating regression weight of the functions to be tested according to the conversion rate of the functions to be tested and the problem rate of the functions to be tested, wherein the conversion rate indicates the probability of transaction when the functions to be tested respond to click operation, the problem rate indicates the probability of problems when the functions to be tested respond to a preset initial regression test, and the functions to be tested are any functions to be subjected to the regression test;
calculating the number of cases of the function to be tested according to the preset total number of cases and the regression weight of the function to be tested, wherein the total number of cases is the preset number of test cases;
and distributing the test cases to the functions to be tested according to the number of the cases of the functions to be tested.
Optionally, before the calculating the regression weight of the function to be tested according to the conversion rate of the function to be tested and the problem rate of the function to be tested, the method further includes:
calculating the ratio of the number of the initial question lists of the functions to be tested to the number of the initial test cases of the functions to be tested to obtain the problem rate of the functions to be tested; the initial question sheet of the function to be tested is a test case which has problems in the process of executing the initial regression test on the function to be tested, and the initial test case of the function to be tested is a case used for executing the initial regression test on the function to be tested;
and calculating the ratio of the transaction amount of the function to be tested to the click amount of the function to be tested as the conversion rate of the function to be tested.
Optionally, before the obtaining the problem rate of the function to be tested, further comprising:
acquiring the number of the initial question lists of each function; the initial question sheet of the function is a test case which has a problem in the process of executing the initial regression test on the function, and the initial test case of the function is a case used for executing the initial regression test on the function;
and taking the function with the number of the initial question lists not being zero as the function to be tested.
Optionally, calculating the regression weight of the function to be tested according to the conversion rate of the function to be tested and the problem rate of the function to be tested, including:
and taking a preset first numerical value as the weight of the conversion rate, taking a preset second numerical value as the weight of the problem rate, and weighting and adding the conversion rate of the function to be tested and the problem rate of the function to be tested to obtain the regression weight of the function to be tested.
Optionally, calculating the regression weight of the function to be tested according to the conversion rate of the function to be tested and the problem rate of the function to be tested, including:
taking a preset first numerical value as the weight of the conversion rate, taking a preset second numerical value as the weight of the problem rate, and carrying out weighted addition on the conversion rate of the function to be tested and the problem rate of the function to be tested to obtain a first weight of the function to be tested;
and normalizing the first weight of the function to be tested to obtain the regression weight of the function to be tested.
Optionally, calculating the number of cases of the function to be tested according to a preset total number of cases and the regression weight of the function to be tested, including:
and calculating the product of the regression weight of the function to be tested and the total number of the cases to obtain the number of the cases of the function to be tested.
A test case dispensing apparatus, comprising:
the system comprises a regression weight determining unit, a test unit and a test unit, wherein the regression weight determining unit is used for calculating the regression weight of a function to be tested according to the conversion rate of the function to be tested and the problem rate of the function to be tested, the conversion rate indicates the probability that the function to be tested responds to click operation to achieve transaction, the problem rate indicates the probability that the function to be tested responds to a preset initial regression test to cause a problem, and the function to be tested is any function point to be subjected to regression test;
the case number determining unit is used for calculating the number of the cases with the functions to be tested according to the preset total number of the cases and the regression weight of the functions to be tested, wherein the total number of the cases is the preset number of the test cases;
and the case distribution unit is used for distributing the test cases to the functions to be tested according to the number of the cases of the functions to be tested.
Optionally, the apparatus further comprises:
the problem rate determining unit is used for calculating the ratio of the number of the initial problem tickets of the functions to be tested to the number of the initial test cases of the functions to be tested to obtain the problem rate of the functions to be tested; the initial question sheet of the function to be tested is a test case which has problems in the process of executing the initial regression test on the function to be tested, and the initial test case of the function to be tested is a case used for executing the initial regression test on the function to be tested;
and the conversion rate determining unit is used for calculating the ratio of the transaction amount of the function to be tested to the click amount of the function to be tested as the conversion rate of the function to be tested.
A test case dispensing apparatus, comprising: a memory and a processor;
the memory is used for storing programs;
the processor is configured to execute the program to implement the steps of the test case distribution method described above.
A readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method for assigning test cases as described above.
It can be seen from the foregoing technical solutions that, in the distribution method, the apparatus, the device, and the readable storage medium for test cases provided in this embodiment of the present application, the regression weight of the function to be tested is calculated according to the conversion rate of the function to be tested and the problem rate of the function to be tested, where the conversion rate indicates a probability that the function to be tested responds to a click operation to reach a transaction, the problem rate indicates a probability that the function to be tested responds to a preset initial regression test and a problem occurs, the function to be tested is any function to be regressed, further, the number of cases to be tested is calculated according to the total number of cases and the regression weight of the function to be tested, and the preset test cases are distributed to the function to be tested according to the number of cases. In the method, since the problem rate of the functions to be tested indicates the degree of the problems of the functions to be tested in the initial regression test, and the conversion rate of the functions to be tested indicates the probability of the transaction completion of the functions to be tested in the use process of the online version, it can be understood that the regression weight of any function to be tested can represent the necessary degree of the functions to be tested in all the functions to perform the regression test, and it can be understood that if the regression weights of the functions to be tested are different, the number of test cases allocated to the functions to be tested by the method is different. Therefore, compared with the prior art, the defect of poor test effect caused by subjectively determining the number of the cases with the functions to be tested according to experience by a tester is avoided, and the accuracy and the comprehensiveness of the coverage range of the test cases are further improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart illustrating an embodiment of a test case distribution method according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a test case distribution method according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a test case distribution device according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a test case distribution apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The method for distributing the test cases provided by the embodiment of the application is applied to but not limited to determining that the test cases are distributed to each function to be tested in the regression test of the software, and the method is suitable for the regression test server of the software. The present embodiment is described with a specific implementation of a method for distributing test cases of various functions in a mobile banking system. Fig. 1 is a schematic flow chart of a method for distributing test cases according to an embodiment of the present application, and as shown in fig. 1, the method may specifically include the following steps S101 to S109.
S101, acquiring the number of initial question lists of each function, and taking the function with the number of the initial question lists not equal to zero as a function to be tested.
In this embodiment, the initial problem tickets of any function are test cases with problems in the process of performing the initial regression test on the function, and the initial test cases of any function are cases used for performing the initial regression test on the function, that is, the number of the initial problem tickets is the number of the initial problem tickets submitted by the function in the initial regression test.
In this embodiment, the functions submitting the initial question list form a function set to be tested, where the function set to be tested includes at least one function to be tested. The method of acquiring the number of initial problem tickets of functions can be referred to in the prior art.
S102, acquiring the problem rate of the functions to be tested.
In this embodiment, the problem rate of the function to be tested is a ratio of the number of initial problem sheets of the function to be tested to the number of initial test cases of the function to be tested, where the initial problem sheet of the function to be tested is a test case in which a problem occurs during an initial regression test performed on the function to be tested, and the initial test case of the function to be tested is a case used for performing the initial regression test on the function to be tested.
Taking the function to be tested as a function Dj,j∈[1,m](m is the number of functions to be tested) as an example, function D is calculatedjNumber of initial question sheets and function DjAs a function D, is the ratio of the number of initial test cases ofjThe problem rate of (2). Function DjThe method for calculating the problem rate of (2) can be seen in formula (1), as follows:
Figure BDA0002660294470000061
in the formula (1), NjAs a function DjProblem rate of (2), Wj0As a function DjNumber of initial question sheets, Sj0As a function DjNumber of initial test cases.
S103, acquiring the click quantity of the function to be tested and the transaction quantity of the function to be tested.
In this embodiment, the method for obtaining the click quantity of the function to be tested and the transaction quantity of the function to be tested includes: the data acquisition points are pre-embedded before the mobile phone bank version is released to be on line, and the click quantity and the transaction quantity of the functions to be tested in a preset period are acquired.
It should be noted that the click quantity of the function to be tested is the number of times of click operations that the function to be tested responds to in the preset period, and the transaction quantity of the function to be tested is the number of times of transactions that the function to be tested responds to the click operations in the preset period to achieve.
And S104, calculating the ratio of the transaction amount of the function to be tested to the click amount of the function to be tested as the conversion rate of the function to be tested.
Example above, function D to be testedjThe conversion of (c) can be calculated as shown in equation (2) as follows:
Figure BDA0002660294470000062
in the formula (2), MjFor function D to be testedjConversion of (1), FjFor function D to be testedjAmount of transaction of CjFor function D to be testedjThe click volume of (c).
S105, acquiring a preset first numerical value of the function to be tested and a preset second numerical value of the function to be tested.
In this embodiment, the first value and the second value are set according to practical applications, and the sum of the first value and the second value is 1. Optionally, the first value is preset to 0.5, and the second value is preset to 0.5.
It should be noted that the first value of the function to be tested indicates a proportion of the conversion rate of the function to be tested in the first weight of the function to be tested, and the second value of the function to be tested indicates a proportion of the problem rate of the function to be tested in the first weight of the function to be tested.
The first values of the different functions to be tested may be the same or different.
S106, taking the first numerical value as the weight of the conversion rate of the function to be tested, taking the second numerical value as the weight of the problem rate of the function to be tested, and weighting and adding the conversion rate of the function to be tested and the problem rate of the function to be tested to obtain the first weight of the function to be tested.
Taking the function to be tested as the function D to be testedjFor example, the first weight of the function to be tested is calculated according to equation (3) as follows:
qj=α1Mj2Nj (3)
in the formula (3), qjFor function D to be testedjFirst weight of MjFor function D to be testedjConversion of (2), NjFor function D to be testedjProblem rate of (a)1Is a preset first value, alpha2Is a preset second value.
S107, normalizing the first weight of the function to be tested to obtain the regression weight of the function to be tested.
In this embodiment, the normalization method can be referred to in the prior art, for example, the first weight of each function to be tested in the function set D to be tested is normalized by using a Z-score normalization method to obtain the function D to be testedjRegression weight Q ofj
And S108, calculating the product of the regression weight of the function to be tested and the total number of the cases to obtain the number of the cases of the function to be tested.
The total number of cases in this embodiment is preset according to actual requirements, and the function to be tested is taken as the function D to be testedjFor example, the number of cases to be tested is calculated according to equation (4) as follows:
Sj=Qj*S (4)
in the formula (4), SjFor function D to be testedjS is the total number of preset cases, QjIs the regression weight of the function to be tested.
And S109, distributing the preset test cases to the functions to be tested according to the number of the function cases to be tested.
It can be seen from the foregoing technical solutions that, in the method for assigning test cases provided in this embodiment of the present application, the regression weight of the function to be tested is calculated according to the conversion rate of the function to be tested and the problem rate of the function to be tested, where the conversion rate indicates a probability that the function to be tested responds to a click operation to achieve a transaction, the problem rate indicates a probability that the function to be tested responds to a preset initial regression test to cause a problem, the function to be tested is any function to be regression tested, further, the number of cases to be tested is calculated according to the preset total number of cases and the regression weight of the function to be tested, and the preset test cases are assigned to the function to be tested according to the number of cases. In the method, since the problem rate of the functions to be tested indicates the degree of the problems of the functions to be tested in the initial regression test, and the conversion rate of the functions to be tested indicates the probability of the transaction completion of the functions to be tested in the use process of the online version, it can be understood that the regression weight of any function to be tested can represent the necessary degree of the functions to be tested in all the functions to perform the regression test, and it can be understood that if the regression weights of the functions to be tested are different, the number of test cases allocated to the functions to be tested by the method is different. Therefore, compared with the prior art, the defect of poor test effect caused by subjectively determining the number of the cases with the functions to be tested according to experience by a tester is avoided, and the accuracy and the comprehensiveness of the coverage range of the test cases are further improved.
Further, the ratio of the number of the initial question sheets of the functions to be tested to the number of the initial test cases of the functions to be tested is calculated to serve as the problem rate of the functions to be tested, the ratio of the transaction amount of the function points to the click amount of the function points is calculated to serve as the conversion rate of the functions to be tested, and the problem rate of the functions to be tested and the conversion rate of the functions to be tested are weighted and added to obtain the regression weight of the functions to be tested. The regression weight of the function to be tested is larger when the problem rate of the function to be tested is larger and/or the conversion rate of the function to be tested is larger for any function to be tested, and the accuracy of the number of cases of each function to be tested is improved because the larger the regression weight is, the larger the number of cases of the function to be tested is.
It should be noted that fig. 1 is only an optional specific implementation manner of the distribution method of the test case provided in the embodiment of the present application, and the method may further include other optional specific implementation manners, for example, S108 normalizes the first weight of the function to be tested to obtain the regression weight of the function to be tested, and as an optional step, optionally, the first weight of the function to be tested may be directly used as the regression weight of the function to be tested.
In summary, the method for distributing test cases provided in the embodiment of the present application may be summarized as a schematic flow chart of a method for distributing test cases shown in fig. 2, and as shown in fig. 2, the method may include S201 to S203.
S201, calculating regression weight of the function to be tested according to the conversion rate of the function to be tested and the problem rate of the function to be tested.
In this embodiment, the conversion rate indicates that the function to be tested responds to the click operation to reach the probability of a transaction, the problem rate indicates that the function to be tested responds to a preset initial regression test to cause the probability of a problem, and the function to be tested is any one of the functions to be tested.
In this embodiment, an optional method for calculating the regression weight of the function to be tested according to the conversion rate of the function to be tested and the problem rate of the function to be tested can be seen in S106 to S107. The conversion rate of the function to be tested may be a ratio of a transaction amount of the function to be tested to a click amount of the function to be tested, which may be specifically referred to as S103 to S104. The problem rate of the function to be tested may be a ratio of the number of initial problem sheets of the function to be tested to the number of initial test cases of the function to be tested, which may be specifically referred to as S102.
It should be noted that, the embodiment of the present application may further include other optional methods for calculating the regression weight of the function to be tested, for example, the first weight of the function to be tested obtained by performing S106 is directly used as the regression weight of the function to be tested.
It should be further noted that the calculation method of the conversion rate of the function to be tested and the problem rate of the function to be tested is not limited to S103 to S104 or S102, and may include other methods, which are not described herein again.
S202, calculating the number of the cases to be tested according to the preset total number of the cases and the regression weight of the function to be tested.
In this embodiment, the total number of cases is the number of the preset test cases,
in this embodiment, the regression weight of the function to be tested represents a ratio of the number of cases of the function to be tested to the total number of the preset cases, and an optional method for calculating the number of cases of the function to be tested may refer to S108 described above, and it should be noted that other methods for calculating the number of cases of the function to be tested may also be included.
S203, distributing the preset test cases to the functions to be tested according to the number of the cases with the functions to be tested.
It can be seen from the foregoing technical solutions that, in the method for assigning test cases provided in this embodiment of the present application, the regression weight of the function to be tested is calculated according to the conversion rate of the function to be tested and the problem rate of the function to be tested, where the conversion rate indicates a probability that the function to be tested responds to a click operation to achieve a transaction, the problem rate indicates a probability that the function to be tested responds to a preset initial regression test to cause a problem, the function to be tested is any function to be regression tested, further, the number of cases to be tested is calculated according to the preset total number of cases and the regression weight of the function to be tested, and the preset test cases are assigned to the function to be tested according to the number of cases. In the method, since the problem rate of the functions to be tested indicates the degree of the problems of the functions to be tested in the initial regression test, and the conversion rate of the functions to be tested indicates the probability of the transaction completion of the functions to be tested in the use process of the online version, it can be understood that the regression weight of any function to be tested can represent the necessary degree of the functions to be tested in all the functions to perform the regression test, and it can be understood that if the regression weights of the functions to be tested are different, the number of test cases allocated to the functions to be tested by the method is different. Therefore, compared with the prior art, the defect of poor test effect caused by subjectively determining the number of the cases with the functions to be tested according to experience by a tester is avoided, and the accuracy and the comprehensiveness of the coverage range of the test cases are further improved.
Fig. 3 is a schematic structural diagram illustrating a test case dispensing apparatus according to an embodiment of the present disclosure, where as shown in fig. 3, the apparatus may include:
the regression weight determining unit 301 is configured to calculate a regression weight of a function to be tested according to a conversion rate of the function to be tested and a problem rate of the function to be tested, where the conversion rate indicates a probability that the function to be tested responds to a click operation to complete a transaction, the problem rate indicates a probability that the function to be tested responds to a preset initial regression test to cause a problem, and the function to be tested is any one function point to be subjected to the regression test;
a case number determining unit 302, configured to calculate the number of cases with the function to be tested according to a preset total number of cases and the regression weight of the function to be tested, where the total number of cases is the preset number of test cases;
a case distributing unit 303, configured to distribute the test cases to the functions to be tested according to the number of cases of the functions to be tested.
Optionally, the apparatus further comprises:
the problem rate determining unit is used for calculating the regression weight of the function to be tested before calculating the regression weight of the function to be tested according to the conversion rate of the function to be tested and the problem rate of the function to be tested:
calculating the ratio of the number of the initial question lists of the functions to be tested to the number of the initial test cases of the functions to be tested to obtain the problem rate of the functions to be tested; the initial question sheet of the function to be tested is a test case which has problems in the process of executing the initial regression test on the function to be tested, and the initial test case of the function to be tested is a case used for executing the initial regression test on the function to be tested;
the conversion rate determining unit is used for calculating the regression weight of the function to be tested before calculating the regression weight of the function to be tested according to the conversion rate of the function to be tested and the problem rate of the function to be tested: and calculating the ratio of the transaction amount of the function to be tested to the click amount of the function to be tested as the conversion rate of the function to be tested.
Optionally, the apparatus further comprises: a function to be tested determining unit, configured to, before the obtaining of the problem rate of the function to be tested:
acquiring the number of the initial question lists of each function; the initial question sheet of the function is a test case which has a problem in the process of executing the initial regression test on the function, and the initial test case of the function is a case used for executing the initial regression test on the function;
and taking the function with the number of the initial question lists not being zero as the function to be tested.
Optionally, the regression weight determining unit is configured to calculate the regression weight of the function to be tested according to the conversion rate of the function to be tested and the problem rate of the function to be tested, and includes: the regression weight determination unit is specifically configured to:
and taking a preset first numerical value as the weight of the conversion rate, taking a preset second numerical value as the weight of the problem rate, and weighting and adding the conversion rate of the function to be tested and the problem rate of the function to be tested to obtain the regression weight of the function to be tested.
Optionally, the regression weight determining unit is configured to calculate the regression weight of the function to be tested according to the conversion rate of the function to be tested and the problem rate of the function to be tested, and includes: the regression weight determination unit is specifically configured to:
taking a preset first numerical value as the weight of the conversion rate, taking a preset second numerical value as the weight of the problem rate, and carrying out weighted addition on the conversion rate of the function to be tested and the problem rate of the function to be tested to obtain a first weight of the function to be tested;
and normalizing the first weight of the function to be tested to obtain the regression weight of the function to be tested.
Optionally, the case number determining unit is configured to calculate the number of cases of the function to be tested according to a preset total number of cases and the regression weight of the function to be tested, and includes: the case quantity determination unit is specifically configured to:
and calculating the product of the regression weight of the function to be tested and the total number of the cases to obtain the number of the cases of the function to be tested.
Fig. 4 shows a schematic structural diagram of a distribution apparatus for the test cases, which may include: at least one processor 401, at least one communication interface 402, at least one memory 403 and at least one communication bus 404;
in the embodiment of the present application, the number of the processor 401, the communication interface 402, the memory 403 and the communication bus 404 is at least one, and the processor 401, the communication interface 402 and the memory 403 complete communication with each other through the communication bus 404;
processor 401 may be a central processing unit CPU, or an application Specific Integrated circuit asic, or one or more Integrated circuits configured to implement embodiments of the present invention, or the like;
the memory 403 may include a high-speed RAM memory, and may further include a non-volatile memory (non-volatile memory) or the like, such as at least one disk memory;
the memory stores a program, and the processor can execute the program stored in the memory to realize the steps of the test case allocation method provided by the embodiment of the application, as follows:
a method of distributing test cases, comprising:
calculating regression weight of the functions to be tested according to the conversion rate of the functions to be tested and the problem rate of the functions to be tested, wherein the conversion rate indicates the probability of transaction when the functions to be tested respond to click operation, the problem rate indicates the probability of problems when the functions to be tested respond to a preset initial regression test, and the functions to be tested are any functions to be subjected to the regression test;
calculating the number of cases of the function to be tested according to the preset total number of cases and the regression weight of the function to be tested, wherein the total number of cases is the preset number of test cases;
and distributing the test cases to the functions to be tested according to the number of the cases of the functions to be tested.
Optionally, before the calculating the regression weight of the function to be tested according to the conversion rate of the function to be tested and the problem rate of the function to be tested, the method further includes:
calculating the ratio of the number of the initial question lists of the functions to be tested to the number of the initial test cases of the functions to be tested to obtain the problem rate of the functions to be tested; the initial question sheet of the function to be tested is a test case which has problems in the process of executing the initial regression test on the function to be tested, and the initial test case of the function to be tested is a case used for executing the initial regression test on the function to be tested;
and calculating the ratio of the transaction amount of the function to be tested to the click amount of the function to be tested as the conversion rate of the function to be tested.
Optionally, before the obtaining the problem rate of the function to be tested, further comprising:
acquiring the number of the initial question lists of each function; the initial question sheet of the function is a test case which has a problem in the process of executing the initial regression test on the function, and the initial test case of the function is a case used for executing the initial regression test on the function;
and taking the function with the number of the initial question lists not being zero as the function to be tested.
Optionally, calculating the regression weight of the function to be tested according to the conversion rate of the function to be tested and the problem rate of the function to be tested, including:
and taking a preset first numerical value as the weight of the conversion rate, taking a preset second numerical value as the weight of the problem rate, and weighting and adding the conversion rate of the function to be tested and the problem rate of the function to be tested to obtain the regression weight of the function to be tested.
Optionally, calculating the regression weight of the function to be tested according to the conversion rate of the function to be tested and the problem rate of the function to be tested, including:
taking a preset first numerical value as the weight of the conversion rate, taking a preset second numerical value as the weight of the problem rate, and carrying out weighted addition on the conversion rate of the function to be tested and the problem rate of the function to be tested to obtain a first weight of the function to be tested;
and normalizing the first weight of the function to be tested to obtain the regression weight of the function to be tested.
Optionally, calculating the number of cases of the function to be tested according to a preset total number of cases and the regression weight of the function to be tested, including:
and calculating the product of the regression weight of the function to be tested and the total number of the cases to obtain the number of the cases of the function to be tested.
The embodiment of the present application further provides a readable storage medium, where the readable storage medium may store a computer program suitable for being executed by a processor, and when the computer program is executed by the processor, the computer program implements the steps of the method for assigning test cases provided in the embodiment of the present application, as follows:
a method of distributing test cases, comprising:
calculating regression weight of the functions to be tested according to the conversion rate of the functions to be tested and the problem rate of the functions to be tested, wherein the conversion rate indicates the probability of transaction when the functions to be tested respond to click operation, the problem rate indicates the probability of problems when the functions to be tested respond to a preset initial regression test, and the functions to be tested are any functions to be subjected to the regression test;
calculating the number of cases of the function to be tested according to the preset total number of cases and the regression weight of the function to be tested, wherein the total number of cases is the preset number of test cases;
and distributing the test cases to the functions to be tested according to the number of the cases of the functions to be tested.
Optionally, before the calculating the regression weight of the function to be tested according to the conversion rate of the function to be tested and the problem rate of the function to be tested, the method further includes:
calculating the ratio of the number of the initial question lists of the functions to be tested to the number of the initial test cases of the functions to be tested to obtain the problem rate of the functions to be tested; the initial question sheet of the function to be tested is a test case which has problems in the process of executing the initial regression test on the function to be tested, and the initial test case of the function to be tested is a case used for executing the initial regression test on the function to be tested;
and calculating the ratio of the transaction amount of the function to be tested to the click amount of the function to be tested as the conversion rate of the function to be tested.
Optionally, before the obtaining the problem rate of the function to be tested, further comprising:
acquiring the number of the initial question lists of each function; the initial question sheet of the function is a test case which has a problem in the process of executing the initial regression test on the function, and the initial test case of the function is a case used for executing the initial regression test on the function;
and taking the function with the number of the initial question lists not being zero as the function to be tested.
Optionally, calculating the regression weight of the function to be tested according to the conversion rate of the function to be tested and the problem rate of the function to be tested, including:
and taking a preset first numerical value as the weight of the conversion rate, taking a preset second numerical value as the weight of the problem rate, and weighting and adding the conversion rate of the function to be tested and the problem rate of the function to be tested to obtain the regression weight of the function to be tested.
Optionally, calculating the regression weight of the function to be tested according to the conversion rate of the function to be tested and the problem rate of the function to be tested, including:
taking a preset first numerical value as the weight of the conversion rate, taking a preset second numerical value as the weight of the problem rate, and carrying out weighted addition on the conversion rate of the function to be tested and the problem rate of the function to be tested to obtain a first weight of the function to be tested;
and normalizing the first weight of the function to be tested to obtain the regression weight of the function to be tested.
Optionally, calculating the number of cases of the function to be tested according to a preset total number of cases and the regression weight of the function to be tested, including:
and calculating the product of the regression weight of the function to be tested and the total number of the cases to obtain the number of the cases of the function to be tested.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for assigning test cases, comprising:
calculating regression weight of the functions to be tested according to the conversion rate of the functions to be tested and the problem rate of the functions to be tested, wherein the conversion rate indicates the probability of transaction when the functions to be tested respond to click operation, the problem rate indicates the probability of problems when the functions to be tested respond to a preset initial regression test, and the functions to be tested are any functions to be subjected to the regression test;
calculating the number of cases of the function to be tested according to the preset total number of cases and the regression weight of the function to be tested, wherein the total number of cases is the preset number of test cases;
and distributing the test cases to the functions to be tested according to the number of the cases of the functions to be tested.
2. The method of claim 1, further comprising, prior to said calculating regression weights for said functions to be tested as a function of conversion rates for said functions to be tested and problem rates for said functions to be tested:
calculating the ratio of the number of the initial question lists of the functions to be tested to the number of the initial test cases of the functions to be tested to obtain the problem rate of the functions to be tested; the initial question sheet of the function to be tested is a test case which has problems in the process of executing the initial regression test on the function to be tested, and the initial test case of the function to be tested is a case used for executing the initial regression test on the function to be tested;
and calculating the ratio of the transaction amount of the function to be tested to the click amount of the function to be tested as the conversion rate of the function to be tested.
3. The method of claim 2, further comprising, prior to said obtaining a problem rate for said function under test:
acquiring the number of the initial question lists of each function; the initial question sheet of the function is a test case which has a problem in the process of executing the initial regression test on the function, and the initial test case of the function is a case used for executing the initial regression test on the function;
and taking the function with the number of the initial question lists not being zero as the function to be tested.
4. The method of claim 1, wherein calculating the regression weight for the function under test as a function of the conversion rate of the function under test and the problem rate of the function under test comprises:
and taking a preset first numerical value as the weight of the conversion rate, taking a preset second numerical value as the weight of the problem rate, and weighting and adding the conversion rate of the function to be tested and the problem rate of the function to be tested to obtain the regression weight of the function to be tested.
5. The method of claim 1, wherein calculating the regression weight for the function under test as a function of the conversion rate of the function under test and the problem rate of the function under test comprises:
taking a preset first numerical value as the weight of the conversion rate, taking a preset second numerical value as the weight of the problem rate, and carrying out weighted addition on the conversion rate of the function to be tested and the problem rate of the function to be tested to obtain a first weight of the function to be tested;
and normalizing the first weight of the function to be tested to obtain the regression weight of the function to be tested.
6. The method as claimed in claim 4 or 5, wherein the calculating the number of cases of the function to be tested according to the preset total number of cases and the regression weight of the function to be tested comprises:
and calculating the product of the regression weight of the function to be tested and the total number of the cases to obtain the number of the cases of the function to be tested.
7. A test case dispensing apparatus, comprising:
the system comprises a regression weight determining unit, a test unit and a test unit, wherein the regression weight determining unit is used for calculating the regression weight of a function to be tested according to the conversion rate of the function to be tested and the problem rate of the function to be tested, the conversion rate indicates the probability that the function to be tested responds to click operation to achieve transaction, the problem rate indicates the probability that the function to be tested responds to a preset initial regression test to cause a problem, and the function to be tested is any function point to be subjected to regression test;
the case number determining unit is used for calculating the number of the cases with the functions to be tested according to the preset total number of the cases and the regression weight of the functions to be tested, wherein the total number of the cases is the preset number of the test cases;
and the case distribution unit is used for distributing the test cases to the functions to be tested according to the number of the cases of the functions to be tested.
8. The apparatus of claim 7, further comprising:
the problem rate determining unit is used for calculating the ratio of the number of the initial problem tickets of the functions to be tested to the number of the initial test cases of the functions to be tested to obtain the problem rate of the functions to be tested; the initial question sheet of the function to be tested is a test case which has problems in the process of executing the initial regression test on the function to be tested, and the initial test case of the function to be tested is a case used for executing the initial regression test on the function to be tested;
and the conversion rate determining unit is used for calculating the ratio of the transaction amount of the function to be tested to the click amount of the function to be tested as the conversion rate of the function to be tested.
9. A test case dispensing apparatus, comprising: a memory and a processor;
the memory is used for storing programs;
the processor is used for executing the program to realize the steps of the distribution method of the test case according to any one of claims 1 to 6.
10. A readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the individual steps of the method of assigning test cases according to any one of claims 1 to 6.
CN202010902715.1A 2020-09-01 2020-09-01 Method, device, equipment and readable storage medium for distributing test cases Active CN112015655B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010902715.1A CN112015655B (en) 2020-09-01 2020-09-01 Method, device, equipment and readable storage medium for distributing test cases

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010902715.1A CN112015655B (en) 2020-09-01 2020-09-01 Method, device, equipment and readable storage medium for distributing test cases

Publications (2)

Publication Number Publication Date
CN112015655A true CN112015655A (en) 2020-12-01
CN112015655B CN112015655B (en) 2023-08-08

Family

ID=73516502

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010902715.1A Active CN112015655B (en) 2020-09-01 2020-09-01 Method, device, equipment and readable storage medium for distributing test cases

Country Status (1)

Country Link
CN (1) CN112015655B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116069629A (en) * 2021-12-27 2023-05-05 芯华章科技(厦门)有限公司 Test design method, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005309631A (en) * 2004-04-20 2005-11-04 Advanced Telecommunication Research Institute International Problem set optimization device and computer program
CN106575248A (en) * 2014-05-18 2017-04-19 周凯 Performance testing system and method
CN109800169A (en) * 2019-01-24 2019-05-24 拉扎斯网络科技(上海)有限公司 Acquisition methods, device, readable storage medium storing program for executing and the electronic equipment of test case
CN110633222A (en) * 2019-11-01 2019-12-31 中国银行股份有限公司 Method and device for determining regression test case
CN111382031A (en) * 2020-04-30 2020-07-07 中国银行股份有限公司 Test method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005309631A (en) * 2004-04-20 2005-11-04 Advanced Telecommunication Research Institute International Problem set optimization device and computer program
CN106575248A (en) * 2014-05-18 2017-04-19 周凯 Performance testing system and method
CN109800169A (en) * 2019-01-24 2019-05-24 拉扎斯网络科技(上海)有限公司 Acquisition methods, device, readable storage medium storing program for executing and the electronic equipment of test case
CN110633222A (en) * 2019-11-01 2019-12-31 中国银行股份有限公司 Method and device for determining regression test case
CN111382031A (en) * 2020-04-30 2020-07-07 中国银行股份有限公司 Test method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116069629A (en) * 2021-12-27 2023-05-05 芯华章科技(厦门)有限公司 Test design method, electronic equipment and storage medium
CN116069629B (en) * 2021-12-27 2023-10-17 芯华章科技(厦门)有限公司 Test design method, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112015655B (en) 2023-08-08

Similar Documents

Publication Publication Date Title
KR102193502B1 (en) Method and device for obtaining a payment threshold
CN108764705A (en) A kind of data quality accessment platform and method
CN109727070B (en) Method and device for determining potential active users
CN109933534B (en) Method and device for determining financial test object
CN109885834B (en) Method and device for predicting age and gender of user
CN112015655B (en) Method, device, equipment and readable storage medium for distributing test cases
CN110084694A (en) A kind of order allocation method and relevant device based on data processing
CN112446640A (en) Information system change risk assessment method, related equipment and readable storage medium
CN109308660A (en) A kind of reference Rating Model appraisal procedure, device, equipment and storage medium
CN109460778B (en) Activity evaluation method, activity evaluation device, electronic equipment and storage medium
KR101566601B1 (en) Risk management device
CN115169881A (en) Task allocation method and device and electronic equipment
CN110992166B (en) Method and device for testing online loan application
CN110299184B (en) Flash memory read voltage determination method and device, computer equipment and storage medium
CN108446907A (en) Safe checking method and device
CN109034994A (en) Credit rating method and device, computer readable storage medium, terminal
CN110888809A (en) Test task risk prediction method and device
CN109059989B (en) Method, system and equipment for evaluating remaining life of instrument
CN111833141A (en) Information push processing method, device, equipment and storage medium
CN111427778A (en) Test method, test device, terminal equipment and storage medium
CN111833142A (en) Information push processing method, device, equipment and storage medium
CN113610644B (en) System transaction screening method and device
CN112084106B (en) Method and device for selecting test data, computing equipment and computer storage medium
CN114943569B (en) Data processing method, device, equipment and medium
CN115858340A (en) Physical node deployment method and device, computer 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
GR01 Patent grant
GR01 Patent grant