CN109726124B - Test system, test method, management device, test device and computing equipment - Google Patents

Test system, test method, management device, test device and computing equipment Download PDF

Info

Publication number
CN109726124B
CN109726124B CN201811566132.5A CN201811566132A CN109726124B CN 109726124 B CN109726124 B CN 109726124B CN 201811566132 A CN201811566132 A CN 201811566132A CN 109726124 B CN109726124 B CN 109726124B
Authority
CN
China
Prior art keywords
test
round
cases
priority
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.)
Active
Application number
CN201811566132.5A
Other languages
Chinese (zh)
Other versions
CN109726124A (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.)
Beijing IQIYI Science and Technology Co Ltd
Original Assignee
Beijing IQIYI Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing IQIYI Science and Technology Co Ltd filed Critical Beijing IQIYI Science and Technology Co Ltd
Priority to CN201811566132.5A priority Critical patent/CN109726124B/en
Publication of CN109726124A publication Critical patent/CN109726124A/en
Application granted granted Critical
Publication of CN109726124B publication Critical patent/CN109726124B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a test system, a test method, a management device, a test device and computing equipment. The method comprises the following steps: the management device selects a first round of test cases from the test case set according to the test task sent by the test device, sends the first round of test cases to the test device for testing, and receives the test results of the round of test cases; if the failure rate does not meet the test ending condition, the priority of the test cases which are not tested in the test case set is adjusted, a new round of test cases are selected from the test cases which are not tested and are sent to the test device to execute a new round of test, and when the failure rate of the round of test cases displayed by the test result meets the test stopping condition, the test can be ended. Therefore, by applying the embodiment of the invention, the problem is detected as early as possible and the test is ended by adjusting the priority of the test cases which are not tested, but the test is ended after all the test cases are executed, so that the test time is shortened.

Description

Test system, test method, management device, test device and computing equipment
Technical Field
The present invention relates to the field of automated testing technologies, and in particular, to a testing system, a testing method, a management device, a testing device, and a computing device.
Background
Automated testing is a process that translates human-driven testing behavior into machine execution. And automatically testing the program according to a preset plan of a test engineer through automatic test equipment, so that the purpose of knowing the quality and performance of the product is achieved.
At present, when the automatic test equipment performs a test, firstly, a corresponding number of test cases are obtained according to a preset test duration in test plan information to serve as test cases to be performed, then the test cases to be performed are performed one by one, the test is stopped until the test duration reaches the preset test duration, namely, the automatic test equipment finishes the test and feeds back the test result after all the test cases to be performed are performed.
Obviously, in the prior art, the test stopping condition is a test method reaching the preset test duration, and all the test cases to be executed must be finished after the execution. Thus, a problem of long test execution time results.
Disclosure of Invention
The embodiment of the invention aims to provide a test system, a test method, a management device, a test device and computing equipment so as to shorten test time.
The specific technical scheme is as follows:
in a first aspect, there is provided a test system, the system comprising: a management device and a test device;
the test device sends a test task comprising the time length required by the test to the management device;
the management device determines the total amount of test cases required by the test according to the length required by the test in the test task, and determines the number of test cases required by each round of test in the test according to the total amount of test cases required by the test;
the management device sorts the test cases in the test case set according to the order of the priority from large to small, and sequentially selects the test cases meeting the number required by the test of the round, so as to obtain a subset of the test cases of the round; the test case set comprises test cases which are not tested in the test;
the management device sends the subset of the test cases of the round to the test device;
the testing device performs the round of testing by using the received subset of the round of testing cases; after the test of the round is finished, the test result of the round is sent to the management device;
the management device judges whether the test is finished or not based on the received test result of the round; if the judging result is that the test is finished, sending a notice of test failure to the test device; otherwise, updating the test case set, starting the next round of test, and returning to execute the step of selecting the number of test cases meeting the requirement of the round of test.
Further, the managing device may determine whether the test is ended based on the received test result of the present round, and may include:
determining the total number of test cases of the round and the total number of failed test cases according to the received test results of the round;
taking the ratio of the total number of failed test cases to the total number of the test cases of the round as the failure rate of the test cases of the round;
judging whether the failure rate is larger than a preset threshold value;
if yes, determining that the judging result is ending the test, otherwise, determining that the judging result is not ending the test.
Further, each test case corresponds to a function to be tested;
the management device may be further configured to, prior to starting a next round of testing:
determining the total amount of test cases corresponding to each function to be tested in the round of test;
determining the number of test cases with test failures corresponding to each function to be tested in the round of test according to the test result of the round of test;
aiming at each function to be tested in the round of test, obtaining the test passing rate of the function to be tested in the round of test according to the total amount of test cases corresponding to the function to be tested and the number of test cases failing to be tested corresponding to the function to be tested;
And aiming at each function to be tested in the round of test, if the test passing rate of the function to be tested is not greater than a preset function test passing rate threshold, the priority of the test case corresponding to the test function in the updated test case set is improved.
Further, the management device may be specifically configured to, when executing the step of increasing the priority of the test case corresponding to the test function in the updated test case set:
and improving the priority of the target test case corresponding to the test function in the updated test case set, wherein the priority of the target test case is the same as the priority of the test case of the test failure corresponding to the test function to be tested in the round of test.
Further, before the step of increasing the priority of the target test case corresponding to the test function in the updated test case set, the management device may be further configured to:
determining the priority of a test case which fails to be tested and corresponds to the function to be tested in the round of test; counting the number of test cases which fail the test corresponding to each priority;
the management device may be specifically configured to, when executing the step of increasing the priority of the target test case corresponding to the test function in the updated test case set:
According to the counted number of test cases which fail to test and correspond to each priority, the priority of the target test case which corresponds to the test function and is the priority in the updated test case set is improved; the more the counted number of test cases with failed tests corresponding to each priority, the higher the improvement degree of the test cases with corresponding test functions and the priority in the updated test case set.
Further, the system may further include: a result feedback device;
the result feedback device is used for receiving the test result of each round of test after the test device sends the test result of the round of test.
Further, the result feedback device may be further configured to:
after the test of the round is finished, counting the test result of each test case, and generating the test result of the round; and sending the test result of the round to the result feedback device so that the result feedback device outputs the test result of the round to a user.
In a second aspect, a test method is provided, the method being applied to a management device in a test system; the test system further comprises: a testing device; the method comprises the following steps:
Receiving a test task which is sent by a test device and comprises the time length required by the test;
determining the total amount of test cases required for completing the test task according to the received test task required time for the test;
determining the number of test cases required by each round of test in the test according to the total amount of the test cases in the test;
sequencing the test cases in the test case set according to the order of the priority from large to small, and sequentially selecting the test cases meeting the number required by the test of the round to obtain a subset of the test cases of the round; the test case set comprises test cases which are not tested in the test;
the subset of the test cases of the round is sent to a test device for testing, so that the test device utilizes the received subset of the test cases of the round to perform the test of the round, and after the test of the round is finished, the test result of the round is sent to the management device;
receiving the test result of the round sent by the test device;
judging whether the test is finished or not based on the received test result of the round;
if the judging result is that the test is finished, sending a test failure notification to the test device; otherwise, updating the test case set, starting the next round of test, and returning to execute the step of selecting the number of test cases meeting the requirement of the round of test.
Further, the step of determining whether the test is ended based on the received test result of the present round may include:
determining the total number of test cases of the round and the total number of failed test cases according to the received test results of the round;
taking the ratio of the total number of failed test cases to the total number of the test cases of the round as the failure rate of the test cases of the round;
judging whether the failure rate is larger than a preset threshold value;
if yes, determining that the judging result is ending the test, otherwise, determining that the judging result is not ending the test.
Further, each test case corresponds to a function to be tested;
the step of starting the next round of testing may further comprise:
determining the total amount of test cases corresponding to each function to be tested in the round of test;
determining the number of test cases with test failures corresponding to each function to be tested in the round of test according to the test result of the round of test;
aiming at each function to be tested in the round of test, obtaining the test passing rate of the function to be tested in the round of test according to the total amount of test cases corresponding to the function to be tested and the number of test cases failing to be tested corresponding to the function to be tested;
And aiming at each function to be tested in the round of test, if the test passing rate of the function to be tested is not greater than a preset function test passing rate threshold, the priority of the test case corresponding to the test function in the updated test case set is improved.
Further, the step of increasing the priority of the test case corresponding to the test function in the updated test case set may include, for each function to be tested in the current round of testing, if the test passing rate of the function to be tested is not greater than the preset function test passing rate threshold value:
and improving the priority of the target test case corresponding to the test function in the updated test case set, wherein the priority of the target test case is the same as the priority of the test case of the test failure corresponding to the test function to be tested in the round of test.
Further, before the step of increasing the priority of the target test case corresponding to the test function in the updated test case set, the method may further include:
determining the priority of a test case which fails to be tested and corresponds to the function to be tested in the round of test; counting the number of test cases which fail the test corresponding to each priority;
The step of increasing the priority of the target test case corresponding to the test function in the updated test case set may include:
according to the counted number of test cases which fail to test and correspond to each priority, the priority of the target test case which corresponds to the test function and is the priority in the updated test case set is improved; the more the counted number of test cases with failed tests corresponding to each priority, the higher the improvement degree of the test cases with corresponding test functions and the priority in the updated test case set.
In a third aspect, a testing method is provided, which is applied to a testing device in a testing system; the test system further comprises: a management device; the method comprises the following steps:
sending a test task comprising the time length required by the test to a management device;
receiving a subset of the test cases of the round sent by the management device;
performing the test of the round by using the received subset of test cases of the round;
after the test of the round is finished, sending a test result of the round to the management device;
if a test failure notification of the current round of test sent by the management device is received, ending the test; otherwise, receiving a next round of test case subsets sent by the management device;
And taking the received next round of test case subset as the current round of test case subset, and returning to the step of performing the current round of test by utilizing the received current round of test case subset.
In a fourth aspect, there is provided a management device for use in a test system, the test system further comprising: a testing device; the management device includes:
the test task receiving unit is used for receiving a test task which is sent by the test device and comprises the time length required by the test;
the test case total amount determining unit is used for determining the total amount of the test cases required for completing the test task according to the received test task required length;
the number determining unit of the test cases of the round is used for determining the number of the test cases required by each round of test in the test according to the total number of the test cases of the test;
the test case selection unit of the round is used for sequencing the test cases in the test case set according to the order of the priority from big to small, and sequentially selecting the test cases meeting the number required by the test of the round to obtain a subset of the test cases of the round; the test case set comprises test cases which are not tested in the test;
The test case transmission unit is used for transmitting the test case subset of the round to the test device for testing, so that the test device can utilize the received test case subset of the round to perform the test of the round, and after the test of the round is finished, the test result of the round is transmitted to the management device;
the test result receiving unit is used for receiving the test result of the round sent by the test device;
the judging unit is used for judging whether the test is finished or not based on the received test result of the round;
the test ending notification unit is used for sending a test failure notification to the test device if the judgment result is that the test is ended; otherwise, updating the test case set, starting the next round of test, namely calling the test case selection unit of the round, and executing the step of returning to select the number of test cases meeting the requirement of the round of test.
Further, the judging unit for judging whether the test is ended may include:
the round test case quantity determining subunit is used for determining the total quantity of the round test cases and the total quantity of failed test cases according to the received round test result;
The failure rate calculation subunit of the test cases of the present round is used for taking the ratio of the total number of the failed test cases to the total number of the test cases of the present round as the failure rate of the test cases of the present round;
the test case failure rate judging subunit is used for judging whether the failure rate is greater than a preset threshold value;
and the test ending determining subunit is used for determining that the judging result is ending the test if the failure rate is judged to be greater than the preset threshold value, or determining that the judging result is not ending the test.
Further, each test case corresponds to a function to be tested;
the management device may further include:
the test case total amount determining unit of the function to be tested is used for determining the total amount of the test cases corresponding to each function to be tested in the round of test;
the number determining unit of the test failure cases of the function to be tested is used for determining the number of the test cases of the test failure corresponding to each function to be tested in the test of the round according to the test result of the round;
the test passing rate determining unit is used for obtaining the test passing rate of the function to be tested in the round of test according to the total amount of test cases corresponding to the function to be tested and the number of test cases corresponding to the function to be tested and failing to test aiming at each function to be tested in the round of test;
And the test case priority modifying unit is used for aiming at each function to be tested in the round of test, and if the test passing rate of the function to be tested is not greater than a preset function test passing rate threshold value, the priority of the test case corresponding to the test function in the updated test case set is improved.
Further, the test case priority modification unit may include:
and the test case priority modification subunit is used for improving the priority of the target test case corresponding to the test function in the updated test case set, wherein the priority of the target test case is the same as the priority of the test case which fails to be tested and corresponds to the test function in the round of test.
Further, the test case priority modification unit may further include:
the number statistics subunit of the failed test cases is used for determining the priority of the test cases of the test failure corresponding to the function to be tested in the round of test; counting the number of test cases which fail the test corresponding to each priority;
the test case priority modification subunit includes:
the test case priority modification module is used for improving the priority of the target test case which corresponds to the test function and is the priority in the updated test case set according to the counted number of test cases which are failed in the test and correspond to each priority; the more the counted number of test cases with failed tests corresponding to each priority, the higher the improvement degree of the test cases with corresponding test functions and the priority in the updated test case set.
In a fifth aspect, there is provided a test apparatus for use in a test system, the test system further comprising: a management device; the test device comprises:
the test task sending unit is used for sending a test task comprising the time length required by the test to the management device;
the round of test case receiving unit is used for receiving the round of test case subset sent by the management device;
the test unit is used for carrying out the test of the round by utilizing the received subset of the test cases of the round;
the test result transmitting unit is used for transmitting the test result of the round to the management device after the test of the round is finished;
the ending test determining unit is used for ending the test if the test failure notification of the current round of test sent by the management device is received;
the next round of test case receiving unit is used for receiving a next round of test case subset sent by the management device if the test failure notification of the current round of test sent by the management device is not received;
and the test case determining unit is used for taking the received next round of test case subset as the test case subset of the round, calling the test unit and returning to the step of carrying out the test of the round by utilizing the received test case subset of the round.
In a sixth aspect, a computing device is provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
a memory for storing a computer program;
the processor is used for executing the programs stored in the memory, and the following method steps are realized:
receiving a test task which is sent by a test device and comprises the time length required by the test;
determining the total amount of test cases required for completing the test task according to the received test task required time for the test;
determining the number of test cases required by each round of test in the test according to the total amount of the test cases in the test;
sequencing the test cases in the test case set according to the order of the priority from large to small, and sequentially selecting the test cases meeting the number required by the test of the round to obtain a subset of the test cases of the round; the test case set comprises test cases which are not tested in the test;
the subset of the test cases of the round is sent to a test device, so that the test device performs the test of the round by utilizing the received subset of the test cases of the round, and after the test of the round is finished, the test result of the round is sent to the management device;
Receiving the test result of the round sent by the test device;
judging whether the test is finished or not based on the received test result of the round;
if the judging result is that the test is finished, sending a test failure notification to the test device; otherwise, updating the test case set, starting the next round of test, and returning to execute the step of selecting the number of test cases meeting the requirement of the round of test.
The following method steps may also be implemented:
sending a test task comprising the time length required by the test to a management device;
receiving a subset of the test cases of the round sent by the management device;
performing the test of the round by using the received subset of test cases of the round;
after the test of the round is finished, sending a test result of the round to the management device;
if a test failure notification of the current round of test sent by the management device is received, ending the test; otherwise, receiving a next round of test case subsets sent by the management device;
and taking the received next round of test case subset as the current round of test case subset, and returning to the step of performing the current round of test by utilizing the received current round of test case subset.
In a seventh aspect, embodiments of the present invention also provide a computer readable storage medium having stored therein a computer program which, when executed by a processor, implements the steps of any of the test methods described above.
As can be seen from the above technical solution, by applying the test system, the test method, the management device, the test device and the computing device provided by the embodiments of the present invention, the management device determines, according to the test task sent by the test device, the test case of each round from the test case set, and if the failure rate of the test case of this round is greater than the preset failure rate threshold, the test can be completed without executing all the test cases, thereby shortening the test time.
In addition, as each test case in the test case set is preset with a priority, each priority corresponds to one function to be tested of the tested program, after the first round of test is finished, the priority of the test case corresponding to the test function, of which the test passing rate is smaller than the preset function test passing rate threshold, in the test case set can be timely adjusted, the selection of the next round of test cases is more targeted, the preset test ending condition can be met more quickly, and the test time is further shortened.
Of course, it is not necessary for any one product or method of practicing the invention to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a test system according to an embodiment of the present invention;
FIG. 2 is an interactive flow chart of the test system of FIG. 1;
FIG. 3 is a schematic flow chart of a testing method for a management device according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart of another testing method for a management device according to an embodiment of the present invention;
FIG. 5 is a flow chart of a testing method for a testing device according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a management device applied to a test system according to an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a test device applied to a test system according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a computing device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order to shorten the test time, the embodiments of the present invention provide a test system, a test method, a management device, a test device and a computing device, which are described in detail below.
The test system provided by the embodiment of the invention is first described below.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a test system according to an embodiment of the present invention, which may include: a management device 101 and a test device 102. Wherein,,
the test device 102 sends a test task including a time length required for the test to the management device 101;
the management device 101 determines the total amount of test cases required by the current test according to the length required by the current test in the test task, and determines the number of test cases required by each round of test in the current test according to the total amount of test cases required by the current test;
the management device 101 sorts the test cases in the test case set according to the order of the priority from large to small, and sequentially selects the test cases meeting the number required by the test of the round, so as to obtain a subset of the test cases of the round; the test case set comprises test cases which are not tested in the test;
the management device 101 transmits the subset of the test cases of the present round to the test device 102;
The test device 102 performs the test of the present round by using the received subset of test cases of the present round; after the test of the present round is finished, the test result of the present round is sent to the management device 101;
the management device 101 determines whether the test is ended or not based on the received test result of the present round; if the judging result is that the test is finished, sending a notice of test failure to the test device 102; otherwise, updating the test case set, starting the next round of test, and returning to execute the step of selecting the test cases meeting the number required by the round of test.
Optionally, the determining, by the management device 101, whether the test is ended based on the received test result of the present round may include:
determining the total number of test cases of the round and the total number of failed test cases according to the received test results of the round;
taking the ratio of the total number of failed test cases to the total number of the test cases of the round as the failure rate of the test cases of the round;
judging whether the failure rate is larger than a preset threshold value;
if yes, determining that the judging result is ending the test, otherwise, determining that the judging result is not ending the test.
Optionally, each test case corresponds to a function to be tested;
The management device 101 may also be configured to, prior to starting the next round of testing:
determining the total amount of test cases corresponding to each function to be tested in the round of test;
determining the number of test cases with test failures corresponding to each function to be tested in the round of test according to the test result of the round;
aiming at each function to be tested in the round of test, obtaining the test passing rate of the function to be tested in the round of test according to the total quantity of test cases corresponding to the function to be tested and the quantity of test cases failing to be tested corresponding to the function to be tested;
for each function to be tested in the round of test, if the test passing rate of the function to be tested is not greater than the preset function test passing rate threshold, the priority of the test case corresponding to the test function in the updated test case set is improved.
Optionally, when executing the step of increasing the priority of the test case corresponding to the test function in the updated test case set, the management apparatus 101 may specifically be configured to:
and improving the priority of the target test case corresponding to the test function in the updated test case set, wherein the priority of the target test case is the same as the priority of the test case of the test failure corresponding to the test function to be tested in the round of test.
Optionally, before the step of increasing the priority of the target test case corresponding to the test function in the updated test case set, the management apparatus 101 may be further configured to:
determining the priority of a test case which fails to be tested and corresponds to the function to be tested in the round of test; counting the number of test cases which fail the test corresponding to each priority;
the management apparatus 101 may be specifically configured to, when executing the step of increasing the priority of the target test case corresponding to the test function in the updated test case set:
according to the counted number of test cases which fail to test and correspond to each priority, the priority of the target test case which corresponds to the test function and is the priority in the updated test case set is improved; the more the counted number of test cases failing in the test corresponding to each priority, the higher the improvement degree of the test cases corresponding to the test function and having the priority in the updated test case set.
In the embodiment of the invention, after the first round of test is finished, the priority of the test case corresponding to the test function, of which the test passing rate is smaller than the preset function test passing rate threshold, in the updated test case set is adjusted in time. Therefore, the selection of the next round of test cases is ensured to be more targeted, so that the test cases can meet the preset test ending conditions more quickly, and the test time is further shortened.
As shown in fig. 1, the test system further includes: a result feedback device 103;
and the result feedback device 103 is used for receiving the test result of each round of test after the test device sends the test result of the round.
By applying the embodiment, the result feedback device 103 can send the test result after each test case is executed by the test device 102, so that a user can know the test result of each test case in real time, and can timely find the defects in the tested program, thereby realizing the improvement of the feedback speed of the test result.
As the embodiment of the invention can detect the defects in the tested program and generate the test report without waiting for the execution of all test cases, compared with the prior art, the embodiment of the invention shortens the generation time of the test report, namely improves the feedback speed of the test result.
In addition, the result feedback device 103 is further configured to, after ending the present round of testing: counting the test result of each test case to generate a test result of the round; and sending the test result of the round to the result feedback device so that the result feedback device outputs the test result of the round to a user.
Referring to fig. 2, fig. 2 is an interactive flow chart of the test system shown in fig. 1, which may specifically include the following steps:
S201: the test device sends a test task including the time length required by the test to the management device.
S202: according to the time length required by the current test in the test task, the management device determines the total amount of the test cases required by the completion of the current test, and determines the number of the test cases required by each round of test in the current test according to the total amount of the test cases required by the current test.
S203: the case management device selects a test case for the first round of testing from the test case set.
S204: the management device sends the generated first round of test cases to the test device.
S205: the test device executes the received first round of test cases.
S206: the test device feeds back the test result of each test case in the first round of test cases to the result feedback device in real time.
S207: the result feedback device receives the test result of each test case in the first round of test cases.
S208: the test device sends the test result of the first round of test cases to the management device.
S209: the management device judges whether the failure rate of the first round of test cases meets the preset test ending condition according to the number of the test cases of the round and the number of the test cases which fail in the test result of the round.
S210: if the failure rate of the first round of test cases does not meet the preset test ending condition, updating the test case set, and selecting the test cases for the second round of test from the updated test case set according to the total quantity of the test cases and the quantity of the test cases of the first round.
S211: the management device sends the second round of test cases to the test device.
S212: the test device executes the second round of test cases.
S213: the test device feeds back the test result of each test case in the second round of test cases to the result feedback device in real time.
S214: the result feedback device receives the test result of each test case in the second round of test cases.
S215: the testing device sends the second round of testing results to the management device.
S216: the management device judges whether the failure power of the second round of test cases meets the preset test ending condition according to the number of the second round of test cases and the number of the failed test cases in the second round of test results.
S217: if the failure rate of the second round of test cases meets the preset test ending condition, the management device sends a notification of test failure.
S218: the management device sends a notice of test failure to the test device.
S219: the test device ends the test.
S220: and the testing device sends the generated test result of the round to the result feedback device.
S221: and the result feedback device sends the received test result of the round to the user terminal.
By applying the test system provided by the embodiment of the invention, according to the test task comprising the time length required by the test, the management device determines the test case of each round from the test case set, and if the failure rate of the test case of the round meets the preset test ending condition, the test can be completed without executing all the test cases, thereby shortening the test time.
The following describes a testing method provided by the embodiment of the invention.
Referring to fig. 3, a test method provided by an embodiment of the present invention is applied to a management device in a test system; the test system further comprises: a testing device; the method comprises the following steps:
s301, receiving a test task sent by a test device.
The test task may include a time period required for the present test.
In the implementation, the object to be tested may be a program installed in an electronic device such as a mobile phone, a tablet computer or a portable computer, and may provide an application service corresponding to a user during operation. The test device sends a test task including the time length required by the test, the management device receives the test task, and then, step S302 is executed according to the test task.
S302, determining the total amount of test cases required for completing the test task according to the length required by the test in the received test task.
In implementation, when the test device tests the received test cases, the test time required by each test case is the same. In this way, the management device can determine the total number of test cases required by the test device to complete the test task by dividing the total time required by the test in the received test task by the test time of each test case.
S303, determining the number of test cases required by each round of test in the test according to the total number of the test cases required by the test.
In the implementation, the total number of test rounds may be preset, in this step, after the total number of test cases required for completing the current test task determined in step S302, the number of test cases required for each round of test in the current test may be determined according to the preset total number of test rounds required for the current test; specifically, the management device may equally divide the determined total amount of test cases required for completing the current test task according to a preset total number of test rounds required for the current test, that is, the number of test cases included in each round of test in the current test is the same; of course, the management device may also randomly determine the number of test cases required by each round of test according to the preset total number of test cases required by the current test, so long as the total number of test cases of each round is the same as the total number of test cases required by the current test.
It should be noted that, the test case set includes test cases corresponding to all the functions to be tested of the program to be tested. Each test case is preset with priority, and corresponds to one function to be tested of the tested program; the priority of each test case is as follows: the test case is a priority which is preferably selected for the function to be tested of the corresponding tested program.
S304, sequencing the test cases in the test case set according to the order of the priority from large to small, and sequentially selecting the test cases meeting the number required by the test of the round to obtain a subset of the test cases of the round.
The test case set comprises test cases which are not tested in the test.
In this step, the management device sequentially sorts the test cases in the test case set from large to small according to the priority of the test cases, and then selects each round of test cases for testing according to a preset test case selection policy, which may be a test case selection policy for selecting test cases from high to low according to the priority of the test cases, or a test case selection policy for selecting test cases randomly or other types of test cases such as test cases. The management device selects the test cases with the number determined in step S303 from the test case set as the subset of the test cases of the present round according to the preset test case selection policy and the number of test cases required for each round of test in the present test determined in step S303. The number of the test cases in the test case set of the round of test is smaller than the total number of the test cases required by the test.
It can be understood that, when the present round of test is the first round of test, step S304 is to select the number of test cases meeting the requirement of the first round of test from the test case set including the test cases which have not been tested in the present test, so as to obtain the first round of test case subset; if the test is not the first test, the test is to select a subset of test cases for the test from the set of test cases which have not been tested after all test cases before the test are removed.
For example, the test case set preset by the management device includes 100 test cases, and the test case set for the first round of test cases is determined to include 10 test cases by the method of the steps; when the second round of test is needed, the management device selects the test cases for the second round of test from the remaining 90 test cases which are not tested after removing the 10 test cases for the first round of test; that is, in the embodiment of the present invention, each time a round of test is performed, the test cases that have been tested in this round are removed from the test case set.
Further, when the management device determines that the failure rate of the test case of the current round meets the preset test ending condition, and notifies the test device to end the test, the management device needs to restore the set of test cases which are not tested to the set of test cases before the test is not performed.
S305, the subset of the test cases of the round is sent to the test device, so that the test device can conduct the test of the round by utilizing the received subset of the test cases of the round, and after the test of the round is finished, the test result of the round is sent to the management device.
Specifically, in step S304, after the test case of the first round of test is selected, the selected test case may be added to the test case list, and the first round of test case list is generated as the test case list of the present round.
In this way, in this step, the first round of test case list may be sent to the test device, so that the test device performs the test of the round by using the received subset of test cases of the round; and after the test of the round is finished, the test device sends the test result of the round to the management device.
The test case list is shown in table 1:
TABLE 1
Figure BDA0001914563520000181
As can be seen from table 1, in general, the priorities of test cases in a test case set can be classified into high priority, medium priority, and low priority. The management device selects each round of test cases for testing according to a preset test case selection strategy, and the strategies such as selecting the test cases from high to low or randomly selecting the test cases according to the priority of the test cases are not limited by the embodiment of the invention.
S306, receiving the test result of the round sent by the test device.
S307, based on the received test result of the round, judging whether the test is finished. If the determination result is that the test is ended, step S308 is executed, otherwise step S309 is executed.
In the step, the management device judges whether the test is finished or not, namely, the ratio of the number of failed test cases in the test result of the round to the number of the test cases of the round can be calculated firstly, then whether the ratio is larger than a preset failure rate threshold value is judged, and if the ratio is larger than the preset failure rate threshold value, the judgment result is determined to be that the test is finished; otherwise, determining that the test is not finished.
And S308, if the judgment result is that the test is finished, sending a test failure notification to the test device.
Specifically, if the failure rate of the test case of the present round is greater than a preset failure rate threshold, the management device may send a test failure notification to the test device; and after the test device receives the test failure notification sent by the management device, ending the test.
In the implementation, after notifying the test device to end the test, the management device may receive the test result of the round sent by the test device, and analyze the test result of each test case in the test result of the round to modify the priority of the test case in the updated test case set.
Specifically, the management device obtains a test case for failing each function test to be tested from the test results of the round; and calculating the test passing rate of each function in the test cases according to the total number of the test cases corresponding to each function in the test cases and the failure test cases corresponding to each function in the test cases.
The test passing rate corresponding to the function is a ratio of a difference value of the number of total test cases corresponding to the test function in the round minus the number of failed test cases corresponding to the function in the round test to the number of total test cases corresponding to the function in the round test.
And then, the management device judges whether the test passing rate of each function in the test cases of the round is larger than a preset function test passing rate threshold value.
And if the test passing rate corresponding to the function is smaller than the preset function test passing rate threshold, the management device modifies the priority of the test case corresponding to the test function in the updated test case set. In the embodiment of the invention, the following methods for modifying the priorities of the test cases corresponding to the test functions in the updated test case set are provided, and the methods are specifically as follows:
In the first embodiment, the management device increases the priorities of all the test cases corresponding to the test function by one step in the updated test case set.
It should be noted that, since the functions to be tested of the program to be tested may be one or more, when the functions to be tested of the program to be tested are more than one, then the above steps determine whether the test passing rate of each function in the test case of the present round is greater than the result obtained by the preset function test passing rate threshold, and the corresponding test passing rate of the one or more functions of the program to be tested may occur. The method described by the embodiment of the invention can be known that firstly, in each round of test, the test passing rate of the function in the function to be tested corresponding to the program to be tested is compared with the preset function test passing rate threshold; then, finding out the function of the program to be tested, of which the test passing rate of the function in the functions to be tested corresponding to the program to be tested is smaller than a preset function test passing rate threshold value; and finally, modifying the priority of the test case corresponding to the function of the found program to be tested in the updated test case set.
For example, there are 2 functions to be tested in a certain program a to be tested, which are: function 1 and function 2; the priorities of test cases in the test case set can be classified into a high priority, a medium priority, and a low priority. According to a preset test case selection strategy and a preset test task, the management device selects a first round of test cases for testing from a pre-stored test case set containing the 2 functions. Assume that the total number of test cases in the first round of test cases is 20, wherein the number of test cases corresponding to the function 1 is 10, and the number of test cases corresponding to the function 2 is 10. The number of test cases corresponding to each function in each round of test cases can be the same or different.
Specifically, assuming that the preset function test passing rate threshold is 70%, in the first round of test, 2 test cases in the test cases corresponding to the function 1 fail to test, and the function test passing rate corresponding to the function 1 is (10-2)/10=80%; if 5 test cases corresponding to the function 2 fail in test, the pass rate of the function test corresponding to the function 2 is (10-5)/10=50%.
Because the function test passing rate corresponding to the function 2 is smaller than the preset function test passing rate threshold, all test cases corresponding to the function 2 in the updated test case set need to be modified in priority. Preferentially, modifying the priority of the test case corresponding to the function 2 in the updated test case set to be low-priority to be medium-priority; and modifying the test case with the priority of the middle priority corresponding to the function 2 into a high priority, wherein in the updated test case set, the test case with the priority of the high priority corresponding to the function 2 still has the high priority.
In a second embodiment, the management device increases the priorities of all test cases corresponding to the test function by one step in the updated test case set.
The priority corresponding to the test cases of each function in the test case set is one of preset priority levels.
For example, assume that the priority level corresponding to the test case of each function in the test case set is 10; when the function test passing rate corresponding to the function 2 of the tested program A is smaller than the preset function test passing rate threshold in the first round of test, modifying the priority of all test cases corresponding to the function 2 in the updated test case set; that is, in the updated test case set, the priority of the test case corresponding to the function 2 is 1 level, 2 level, 3 level to 10 level, which all need to be modified; wherein a larger number represents a higher level of priority. Preferentially, in the updated test case set, modifying the test case corresponding to the function 2 with the priority of 1 into 2, modifying the test case with the priority of 2 into 3, and the like; the priority of the test case with the priority of 10 corresponding to the function 2 is still 10.
In a third embodiment, the management device increases the priority of the target test case corresponding to the test function by one step in the updated test case set.
The priority of the target test case is the same as the priority of the test case with the test failure corresponding to the function to be tested in the round of test.
For example, there are 2 functions to be tested in a certain program to be tested a, which are respectively: function 1 and function 2; the priorities of test cases in the test case set can be classified into a high priority, a medium priority, and a low priority. When the corresponding function test passing rate of the function 2 of the tested program A is smaller than a preset function test passing rate threshold value in the first round of test, modifying the priority of the target test case corresponding to the function 2 in the updated test case set; that is, the priority of the test cases with the same priority as the test cases with the failed test corresponding to the function 2 in the updated test case set is increased by one step.
In the fourth embodiment, the management device increases the priority of the target test case corresponding to the test function by one step in the updated test case set.
The priority corresponding to the test cases of each function in the test case set is one of preset priority levels.
Specifically, determining the priority of the test cases with failed tests corresponding to the function to be tested in the round of test, and counting the number of the test cases with failed tests corresponding to each determined priority; according to the counted number of test cases which fail to test and correspond to each priority, the priority of the target test case which corresponds to the test function and is the priority in the updated test case set is improved; the more the counted number of test cases failing in the test corresponding to each priority, the higher the improvement degree of the test cases corresponding to the test function and having the priority in the updated test case set.
For example, assume that the priority level corresponding to the test case of each function in the test case set is 10; when the function test passing rate corresponding to the function 2 of the tested program A is smaller than a preset function test passing rate threshold in the first round of test, the priorities of the test cases of which the tests corresponding to the function 2 in the current round of test fail are respectively 4, 5 and 8; the test cases with the priority of 4 levels, which correspond to the test failure of the function 2 in the round of test, are 8, 4 in 5 levels and 2 in 8 levels. Then, the priority of the test cases corresponding to the function 2 in the updated test case set is increased to a preset priority level, for example, the priority of the test case with the priority of 4 in the test cases corresponding to the function 2 is increased to 8; the priority of the test case with the priority of 5 levels in the test cases corresponding to the function 2 is improved to 6 levels; and (3) improving the priority of the test case with the priority of 8 in the test cases corresponding to the function 2 to 9.
S309, updating the test case set, starting the next round of test, and returning to the step S304.
In this step, after the judgment result in the step S307 is that the test is not finished, the management device deletes the test case tested in the previous round from the test case set, that is, updates the test case set; then, from the updated test case set, according to the priority level corresponding to the test cases, the test cases with the same number as the previous test cases are selected as the test cases for the next test.
The step S305 is the same as that of the step S305, and the test case for the next round of test selected may be added to the test case list to generate the test case list for the next round as the test case list for the present round.
By applying the test method provided by the embodiment of the invention, according to the test task comprising the time length required by the test, the management device determines the test case of each round from the test case set, and if the failure rate of the test case of the round is greater than the preset failure rate threshold value, the test can be completed without executing all the test cases, thereby shortening the test time.
For clarity of description, a test method applied to the management device in the test system is described in detail in time sequence, referring to fig. 4. The method specifically comprises the following steps:
s401: and receiving a test task which is sent by the test device and comprises the time length required by the test.
S402: and determining the total amount of test cases required for completing the test according to the received test task.
S403: and determining the number of the test cases required by each round of test in the test according to the total number of the test cases required by the test.
S404: the test cases in the test case set are ordered according to the order of the priority from big to small, the test cases used for the first round of test are selected from the test case set, and the first round of test cases are used as the test cases of the first round.
S405: and sending the test cases of the round to a testing device for testing.
S406: and receiving the test result of the round returned by the test device.
S407: and calculating the ratio of the total number of the failed test cases in the test cases of the round to the total number of the test cases of the round, and taking the ratio as the failure rate of the test cases of the round.
S408: judging whether the failure rate of the test case of the round is larger than a preset threshold value; if yes, executing step S409; if not, execution begins at step S410.
S409: and after the test is finished, notifying the test device of test failure, and recovering the test case set to an initial state.
S410: judging and judging whether the test duration used from the beginning of the first round of test in the test to the ending of the test of the round reaches the preset total duration in the test task. If yes, go to step S411; if not, go to step S412.
S411: and (5) notifying the testing device to finish the test after the test is finished, and recovering the test case set to an initial state.
S412: and calculating the test passing rate of each function in the test cases of the round according to the total number of the test cases corresponding to each function in the test cases of the round and the number of the failure test cases corresponding to each function in the test case results of the round.
S413: judging whether the test passing rate of each function in the test case of the round is larger than a preset function test passing rate threshold value; if yes, start execution from step S416; if not, execution begins at step S414.
S414: and deleting the tested test cases in the test cases of the round from the test case set, and updating the test case set.
S415: and step S417, the priority of the test case corresponding to the test function with the test passing rate smaller than the preset function test passing rate threshold value in the updated test case set is improved.
S416: the test cases tested in the test cases of the present round are deleted from the test case set, the test case set is updated, and step S417 is executed.
S417: according to the total quantity of the test cases and the quantity of the test cases of the round, the test cases with the quantity identical to that of the first round of test cases are selected from the updated test case set to be used as the test cases for the next round of test, and when no test cases exist in the test case set or the quantity of the test cases in the test case set cannot meet the condition that the quantity identical to that of the first round of test cases cannot be met, the test is ended, the test device is informed to end the test, and the test case set is restored to an initial state.
S418: the next round of test cases are taken as the test cases of the present round, and step S405 is returned.
By applying the test method provided by the embodiment of the invention, the management device determines the test cases of each round from the test case set according to the test task sent by the test device, and if the failure rate of the test cases of the round is greater than the preset failure rate threshold, the test can be completed without executing all the test cases, thereby shortening the test time.
In addition, as the priority is preset for each test case in the test case set, each test case corresponds to one function to be tested of the tested program, the priority of the test case corresponding to the test function, of which the test passing rate is smaller than the preset function test passing rate threshold, in the test case set can be adjusted in time after the first round of test is finished, the selection of the next round of test cases is more targeted, the preset test ending condition can be met more quickly, and the test time is further shortened.
Further, after the management device notifies the testing device to end the test, the management device needs to restore the set of test cases, which only include test cases that have not been tested, to the initial state before the test is not performed.
Specifically, before the management device performs the test, each test case in the test case set and the priority corresponding to each test case can be backed up; after the test device finishes the test, the management device can use the backup test case set to recover the test case set after the test is performed for a plurality of rounds. Specifically, the test cases deleted in the current multi-round test can be recovered from the backup test case set to the test case set; and the priority of each test case in the backup test case set is used for recovering the priority of the test case with the priority modified in the current multi-round test.
For a specific implementation of each step in fig. 4 and the related explanation, reference may be made to the method embodiment shown in fig. 3, which is not described herein.
Referring to fig. 5, a flowchart of a testing method for a testing device provided by the embodiment of the invention in fig. 5 includes the following steps:
s501: and sending the test task to the management device.
The test task may include a time period required for the present test.
S502: and receiving the subset of the test cases of the round sent by the management device.
The management device determines the total amount of test cases required by the test task according to the received test task, and then selects the test cases meeting the number required by the test in the test case set; the number of the test cases of the round is smaller than the total number of the test cases required by the test.
Specifically, the set of test cases may be ranked according to the priority of each test case in the function of the program under test. The management device selects test cases according to all functions to be tested of the tested program, wherein the number of the test cases selected from each test case set can be the same or different.
For example, when the functions to be detected by the tested program include color gamut coverage rate and color reproduction accuracy of the display, the two functions can respectively select the same number of test cases when the functions are selected, and also can select different numbers of test cases according to the difficulty of the functions to be detected, namely, several test cases can be selected more for the color reproduction accuracy of the display, and the color gamut coverage rate of the display is already a mature technology, and multiple detection is not needed, so that several test cases can be selected less.
S503: and carrying out the round of test by using the received subset of the round of test cases.
S504: and after the test of the round is finished, sending the test result of the round to the management device.
Specifically, the test results of the present round may include test results of each test case in the test case set for the present round of testing.
In addition, after the test device sends the test result of the round to the management device, the test device can also send the test result of the round to the result feedback device, so that the result feedback device outputs the test result of the round to the user.
S505: if a test failure notice of the current round of test sent by the management device is received, sending the generated current round of test result to a result feedback device, and ending the current test; if the test ending notification sent by the management device is received, ending the test; otherwise, receiving the subset of the next round of test cases sent by the management device.
The next round of test cases subset is the test cases which are selected from the updated test case set for the next round of test according to the number of the test cases of the round and the number of the test cases which fail in the test result of the round by the management device after judging that the failure rate of the test cases of the round is not more than a preset failure rate threshold value according to the total quantity of the test cases and the number of the test cases of the round.
In some embodiments, the test failure notification is sent after the management device determines that the failure rate of the test case of the round is greater than the preset failure rate threshold according to the number of test cases of the round and the number of failed test cases in the test result of the round.
Correspondingly, after the test device receives the test failure notification sent by the management device, the test device firstly generates a test result of the round, which comprises test results of each test case on each function to be tested of the tested program;
then, the test result of the round is sent to a result feedback device, so that the result feedback device outputs the test result to a user;
then, the test result of the round is sent to a management device, so that the management device obtains a test case of failure of the function test to be tested from the test result of the round; calculating the test passing rate of each function in the test cases of the round according to the total number of the test cases corresponding to each function in the test cases of the round and the number of the failure test cases corresponding to each function in the test cases of the round; judging whether the test passing rate of each function in the test case of the round is larger than a preset function test passing rate threshold value; if not, the priority of the test case corresponding to the test function in the updated test case set is increased.
S506: the received subset of test cases of the next round is taken as the subset of test cases of the present round, and the step S503 is returned. By applying the test method provided by the embodiment of the invention, the management device determines the test cases of each round from the test case set according to the test task sent by the test device, and if the failure rate of the test cases of the round is greater than the preset failure rate threshold, the test can be completed without executing all the test cases, thereby shortening the test time.
Based on the same technical conception, the embodiment of the invention also provides a management device applied to the test system, corresponding to the embodiment of the method shown in FIG. 3; the test system further comprises: test apparatus, as shown in fig. 6, the management apparatus includes:
the test task receiving unit 601 is configured to receive a test task including a duration required for the present test sent by the test device;
the test case total amount determining unit 602 is configured to determine the total amount of test cases required for completing the test task according to the received test task required length of the test;
the number of test cases determining unit 603 is configured to determine, according to the total number of test cases of the current test, the number of test cases required for each round of test in the current test;
The test case selection unit 604 is configured to sort the test cases in the test case set according to the order from the higher priority to the lower priority, and sequentially select the test cases meeting the number required by the test of the present round, so as to obtain a subset of test cases of the present round; the test case set comprises test cases which are not tested in the test;
the test case transmission unit 605 is configured to transmit the test case subset to the test device, so that the test device performs the test by using the received test case subset, and transmit the test result to the management device after the test is completed;
the test result receiving unit 606 is configured to receive a test result of the present round sent by the testing device;
a judging unit 607, configured to judge whether the test is ended based on the received test result of the present round;
a test end notification unit 608, configured to send a test failure notification to the test device if the determination result is that the test is ended; otherwise, updating the test case set, starting the next round of test, namely calling the test case selection unit of the round, and executing the step of returning to select the number of test cases meeting the requirement of the round of test.
In the embodiment of the present invention, the judging unit for judging whether the test is ended may include:
the round test case quantity determining subunit is used for determining the total quantity of the round test cases and the total quantity of failed test cases according to the received round test result;
the failure rate calculation subunit of the test cases of the present round is used for taking the ratio of the total number of the failed test cases to the total number of the test cases of the present round as the failure rate of the test cases of the present round;
the test case failure rate judging subunit is used for judging whether the failure rate is greater than a preset threshold value;
and the test ending determining subunit is used for determining that the judging result is ending the test if the failure rate is judged to be greater than the preset threshold value, or determining that the judging result is not ending the test.
In the embodiment of the invention, each test case corresponds to a function to be tested;
the management device may further include:
the test case total amount determining unit of the function to be tested is used for determining the total amount of the test cases corresponding to each function to be tested in the round of test;
the test failure case number determining unit is used for determining the number of test cases of test failure corresponding to each function to be tested in the round of test according to the test result of the round of test;
The test passing rate determining unit is used for obtaining the test passing rate of each function to be tested in the round of test according to the total quantity of test cases corresponding to the function to be tested and the quantity of test cases corresponding to the function to be tested and failing to test;
the test case priority modifying unit is used for aiming at each function to be tested in the round of test, if the test passing rate of the function to be tested is not greater than the preset function test passing rate threshold value, the priority of the test case corresponding to the test function in the updated test case set is improved.
In the embodiment of the present invention, the test case priority modification unit may include:
the test case priority modification subunit is configured to increase the priority of a target test case corresponding to the test function in the updated test case set, where the priority of the target test case is the same as the priority of a test case that fails to be tested and corresponds to the test function in the round of test.
In the embodiment of the present invention, the test case priority modification unit may further include:
the number statistics subunit of the failed test cases is used for determining the priority of the test cases of the test failure corresponding to the function to be tested in the round of test; counting the number of test cases which fail the test corresponding to each priority;
The test case priority modification subunit may include:
the test case priority modification module is used for improving the priority of the target test case which corresponds to the test function and is the priority in the updated test case set according to the counted number of test cases which are failed in the test and correspond to each priority; the more the counted number of test cases failing in the test corresponding to each priority, the higher the improvement degree of the test cases corresponding to the test function and having the priority in the updated test case set.
By applying the management device provided by the embodiment of the invention, the management device determines the test cases of each round from the test case set according to the test task sent by the test device, and if the failure rate of the test cases of the round is greater than the preset failure rate threshold, the test can be completed without executing all the test cases, thereby shortening the test time.
Fig. 7 is a schematic structural diagram of a test device for use in a test system according to the embodiment shown in fig. 6; as shown in fig. 7, the test apparatus includes:
a test task sending unit 701, configured to send a test task including a time length required for the present test to the management device;
The test case receiving unit 702 is configured to receive the subset of test cases of the present round sent by the management device;
a test unit 703, configured to perform a current round of test by using the received subset of current round of test cases;
the primary test result sending unit 704 is configured to send a primary test result to the management device after the primary test is finished;
an ending test determining unit 705, configured to end the test if a test failure notification sent by the management device is received;
a next round of test case receiving unit 706, configured to receive the next round of test case subset sent by the management device if the test failure notification of the present round of test sent by the management device is not received;
the test case determination unit 707 is configured to take the received next round of test case subset as the test case subset of the round, and call the test unit to perform the test of the round by using the received test case subset of the round.
By applying the test device provided by the embodiment of the invention, the management device determines the test cases of each round from the test case set according to the test task sent by the test device, and if the failure rate of the test cases of the round is greater than the preset failure rate threshold, the test can be completed without executing all the test cases, thereby shortening the test time.
The embodiment of the invention also provides a computing device, as shown in fig. 8, which comprises: a processor 801, a communication interface 802, a memory 803, and a communication bus 804, wherein the processor 801, the communication interface 802, the memory 803 complete communication with each other through the communication bus 804,
a memory 803 for storing a computer program;
the processor 801 is configured to implement the method steps of the test method according to any of the above embodiments when executing the program stored in the memory.
In addition, other implementation manners of a test method implemented by the processor 801 executing the program stored in the memory 803 are the same as those mentioned in the foregoing method embodiment, and will not be described herein again.
The communication bus mentioned above for the electronic devices may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer readable storage medium is provided, where instructions are stored, which when run on a computer, cause the computer to perform the test system, the test method, the management device, the test device, and the electronic device method according to any of the above embodiments.
It is noted that relational terms such as first and second, and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for apparatus, electronic devices, and computer-readable storage medium embodiments, the description is relatively simple, as it is substantially similar to method embodiments, with reference to portions of the description of method embodiments being relevant.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (17)

1. A test system, the test system comprising: a management device and a test device; wherein,,
the test device sends a test task comprising the time length required by the test to the management device;
the management device determines the total amount of test cases required by the test according to the length required by the test in the test task, and determines the number of test cases required by each round of test in the test according to the total amount of test cases required by the test;
The management device sorts the test cases in the test case set according to the order of the priority from large to small, and sequentially selects the test cases meeting the number required by the test of the round, so as to obtain a subset of the test cases of the round; the test case set comprises test cases which are not tested in the test; the higher the priority of the test case is, the lower the test passing rate of the function to be tested corresponding to the test case is;
the management device sends the subset of the test cases of the round to the test device;
the testing device performs the round of testing by using the received subset of the round of testing cases; after the test of the round is finished, the test result of the round is sent to the management device;
the management device determines the total number of test cases of the round and the total number of failed test cases according to the received test results of the round; taking the ratio of the total number of failed test cases to the total number of the test cases of the round as the failure rate of the test cases of the round; judging whether the failure rate is larger than a preset threshold value; if the failure rate is larger than the preset threshold value, determining that the test is finished, and sending a notification of test failure to the test device; if the failure rate is not greater than the preset threshold, determining that the test is not ended, deleting the test cases used in the test of the round from the test case set to obtain an updated test case set, starting the next round of test, and returning to execute the step of selecting the test cases meeting the number required by the test of the round.
2. The system of claim 1, wherein each test case corresponds to a function to be tested;
the management device is further configured to, before starting the next round of testing:
determining the total amount of test cases corresponding to each function to be tested in the round of test;
determining the number of test cases with test failures corresponding to each function to be tested in the round of test according to the test result of the round of test;
aiming at each function to be tested in the round of test, obtaining the test passing rate of the function to be tested in the round of test according to the total amount of test cases corresponding to the function to be tested and the number of test cases failing to be tested corresponding to the function to be tested;
and aiming at each function to be tested in the round of test, if the test passing rate of the function to be tested is not greater than a preset function test passing rate threshold, the priority of the test case corresponding to the test function in the updated test case set is improved.
3. The system according to claim 2, wherein the management device, when executing the step of increasing the priority of the test case corresponding to the test function in the updated test case set, is specifically configured to:
And improving the priority of the target test case corresponding to the test function in the updated test case set, wherein the priority of the target test case is the same as the priority of the test case of the test failure corresponding to the test function to be tested in the round of test.
4. The system of claim 3, wherein, prior to the step of increasing the priority of the target test case corresponding to the test function in the updated set of test cases, the managing means is further configured to:
determining the priority of a test case which fails to be tested and corresponds to the function to be tested in the round of test; counting the number of test cases which fail the test corresponding to each priority;
the management device is specifically configured to, when executing the step of increasing the priority of the target test case corresponding to the test function in the updated test case set:
according to the counted number of test cases which fail to test and correspond to each priority, the priority of the target test case which corresponds to the test function and is the priority in the updated test case set is improved; the more the counted number of test cases with failed tests corresponding to each priority, the higher the improvement degree of the test cases with corresponding test functions and the priority in the updated test case set.
5. The system of claim 1, wherein the system further comprises: a result feedback device;
the result feedback device is used for receiving the test result of each round of test after the test device sends the test result of the round of test.
6. The system of claim 5, wherein the result feedback device is further configured to:
after the test of the round is finished, counting the test result of each test case, and generating the test result of the round; and sending the test result of the round to the result feedback device so that the result feedback device outputs the test result of the round to a user.
7. The test method is characterized by being applied to a management device in a test system; the test system further comprises: a testing device; the method comprises the following steps:
receiving a test task which is sent by the test device and comprises the time length required by the test;
determining the total amount of test cases required for completing the test according to the length required by the test in the received test task;
determining the number of test cases required by each round of test in the test according to the total number of the test cases required by the test;
Sequencing the test cases in the test case set according to the order of the priority from large to small, and sequentially selecting the test cases meeting the number required by the test of the round to obtain a subset of the test cases of the round; the test case set comprises test cases which are not tested in the test; the higher the priority of the test case is, the lower the test passing rate of the function to be tested corresponding to the test case is;
the subset of the test cases of the round is sent to the test device, so that the test device performs the test of the round by utilizing the received subset of the test cases of the round, and after the test of the round is finished, the test result of the round is sent to the management device;
receiving the test result of the round sent by the test device;
determining the total number of test cases of the round and the total number of failed test cases according to the received test results of the round;
taking the ratio of the total number of failed test cases to the total number of the test cases of the round as the failure rate of the test cases of the round;
judging whether the failure rate is larger than a preset threshold value;
if the failure rate is larger than the preset threshold value, determining that the test is finished, and sending a test failure notification to the test device; if the failure rate is not greater than the preset threshold, determining that the test is not ended, deleting the test cases used in the test of the round from the test case set to obtain an updated test case set, starting the next round of test, and returning to execute the step of selecting the test cases meeting the number required by the test of the round.
8. The method of claim 7, wherein each test case corresponds to a function to be tested;
before the step of starting the next round of testing, the method further comprises the following steps:
determining the total amount of test cases corresponding to each function to be tested in the round of test;
determining the number of test cases with test failures corresponding to each function to be tested in the round of test according to the test result of the round of test;
aiming at each function to be tested in the round of test, obtaining the test passing rate of the function to be tested in the round of test according to the total amount of test cases corresponding to the function to be tested and the number of test cases failing to be tested corresponding to the function to be tested;
and aiming at each function to be tested in the round of test, if the test passing rate of the function to be tested is not greater than a preset function test passing rate threshold, the priority of the test case corresponding to the test function in the updated test case set is improved.
9. The method of claim 8, wherein the step of increasing the priority of the test case corresponding to the test function in the updated set of test cases comprises:
and improving the priority of the target test case corresponding to the test function in the updated test case set, wherein the priority of the target test case is the same as the priority of the test case of the test failure corresponding to the test function to be tested in the round of test.
10. The method of claim 9, wherein before the step of increasing the priority of the target test case corresponding to the test function in the updated test case set, the method further comprises:
determining the priority of a test case which fails to be tested and corresponds to the function to be tested in the round of test; counting the number of test cases which fail the test corresponding to each priority;
the step of improving the priority of the target test case corresponding to the test function in the updated test case set includes:
according to the counted number of test cases which fail to test and correspond to each priority, the priority of the target test case which corresponds to the test function and is the priority in the updated test case set is improved; the more the counted number of test cases with failed tests corresponding to each priority, the higher the improvement degree of the test cases with corresponding test functions and the priority in the updated test case set.
11. The testing method is characterized by being applied to a testing device in a testing system; the test system further comprises: a management device; the method comprises the following steps:
Sending a test task comprising the time length required by the test to the management device;
receiving a subset of the test cases of the round sent by the management device; the management device sequentially selects test cases meeting the number required by the round of test from a test case set according to the order of the priority from large to small, wherein the test case set comprises test cases which are not tested in the test, and the higher the priority of the test cases, the lower the test passing rate of the function to be tested corresponding to the test cases; the management device determines the total amount of test cases required by the test according to the length required by the test and then determines the total amount;
performing the test of the round by using the received subset of test cases of the round;
after the test of the round is finished, sending a test result of the round to the management device;
if a test failure notification of the current round of test sent by the management device is received, ending the test; otherwise, receiving a next round of test case subsets sent by the management device after updating the test case set; the method for updating the test case set by the management device comprises the following steps: deleting the test cases used in the round of test from the test case set;
Taking the received next round of test case subset as the current round of test case subset, and returning to the step of performing the current round of test by utilizing the received current round of test case subset;
the process of sending the test failure notification of the round of test by the management device comprises the following steps: determining the total number of test cases of the round and the total number of failed test cases according to the received test results of the round; taking the ratio of the total number of failed test cases to the total number of the test cases of the round as the failure rate of the test cases of the round; judging whether the failure rate is larger than a preset threshold value; if the failure rate is larger than the preset threshold value, determining that the test is finished, and sending a test failure notification of the current round of test to the test device;
the process of the management device for transmitting the next round of test case subsets after updating the test case set comprises the following steps: if the failure rate is not greater than the preset threshold value, determining that the test is not finished, updating the test case set, starting the next round of test, sequentially selecting test cases meeting the requirement of the next round of test from the test case set according to the order of the priority from high to low, and sending the test cases as a test case subset of the next round of test cases to the test device.
12. A management device applied to a test system, characterized in that: the test system further comprises: a testing device; the management device includes:
the test task receiving unit is used for receiving a test task which is sent by the test device and comprises the time length required by the test;
the test case total amount determining unit is used for determining the total amount of the test cases required for completing the test task according to the received test task required length;
the number determining unit of the test cases of the round is used for determining the number of the test cases required by each round of test in the test according to the total number of the test cases of the test;
the test case selection unit of the round is used for sequencing the test cases in the test case set according to the order of the priority from big to small, and sequentially selecting the test cases meeting the number required by the test of the round to obtain a subset of the test cases of the round; the test case set comprises test cases which are not tested in the test; the higher the priority of the test case is, the lower the test passing rate of the function to be tested corresponding to the test case is;
the test case transmission unit is used for transmitting the test case subset of the round to the test device so that the test device can perform the test of the round by utilizing the received test case subset of the round, and transmitting the test result of the round to the management device after the test of the round is finished;
The test result receiving unit is used for receiving the test result of the round sent by the test device;
the judging unit is used for judging whether the test is ended or not, and determining the total number of the test cases of the round and the total number of the failed test cases according to the received test result of the round; taking the ratio of the total number of failed test cases to the total number of the test cases of the round as the failure rate of the test cases of the round; judging whether the failure rate is larger than a preset threshold value; if the failure rate is greater than the preset threshold value, determining that the test is finished; if the failure rate is not greater than the preset threshold value, determining that the test is not ended;
the test ending notification unit is used for sending a test failure notification to the test device if the test is ended; and if the test is not finished, deleting the test cases used in the test of the round from the test case set to obtain an updated test case set, starting the next round of test, and triggering the test case selection unit of the round to execute the step of selecting the test cases meeting the number required by the test of the round.
13. The apparatus of claim 12, wherein each test case corresponds to a function to be tested;
The management device further includes:
the test case total amount determining unit of the function to be tested is used for determining the total amount of the test cases corresponding to each function to be tested in the round of test;
the number determining unit of the test failure cases of the function to be tested is used for determining the number of the test cases of the test failure corresponding to each function to be tested in the test of the round according to the test result of the round;
the test passing rate determining unit is used for obtaining the test passing rate of the function to be tested in the round of test according to the total amount of test cases corresponding to the function to be tested and the number of test cases corresponding to the function to be tested and failing to test aiming at each function to be tested in the round of test;
and the test case priority modifying unit is used for aiming at each function to be tested in the round of test, and if the test passing rate of the function to be tested is not greater than a preset function test passing rate threshold value, the priority of the test case corresponding to the test function in the updated test case set is improved.
14. The apparatus of claim 13, wherein the test case priority modification unit comprises:
and the test case priority modification subunit is used for improving the priority of the target test case corresponding to the test function in the updated test case set, wherein the priority of the target test case is the same as the priority of the test case which fails to be tested and corresponds to the test function in the round of test.
15. The apparatus of claim 14, wherein the test case priority modification unit further comprises:
the number statistics subunit of the failed test cases is used for determining the priority of the test cases of the test failure corresponding to the function to be tested in the round of test; counting the number of test cases which fail the test corresponding to each priority;
the test case priority modification subunit includes:
the test case priority modification module is used for improving the priority of the target test case which corresponds to the test function and is the priority in the updated test case set according to the counted number of test cases which are failed in the test and correspond to each priority; the more the counted number of test cases with failed tests corresponding to each priority, the higher the improvement degree of the test cases with corresponding test functions and the priority in the updated test case set.
16. A test device for use in a test system, comprising: the test system further comprises: a management device; the test device comprises:
a test task sending unit, configured to send a test task including a duration required for the present test to the management device;
The round of test case receiving unit is used for receiving the round of test case subset sent by the management device; the management device sequentially selects test cases meeting the number required by the round of test from a test case set according to the order of the priority from large to small, wherein the test case set comprises test cases which are not tested in the test, and the higher the priority of the test cases, the lower the test passing rate of the function to be tested corresponding to the test cases; the management device determines the total amount of test cases required by the test according to the length required by the test and then determines the total amount;
the test unit is used for carrying out the test of the round by utilizing the received subset of the test cases of the round;
the test result transmitting unit is used for transmitting the test result of the round to the management device after the test of the round is finished;
the ending test determining unit is used for ending the test if the test failure notification of the current round of test sent by the management device is received;
the next round of test case receiving unit is used for receiving a next round of test case subset sent by the management device after updating the test case set if the test failure notification of the current round of test sent by the management device is not received; the method for updating the test case set by the management device comprises the following steps: deleting the test cases used in the round of test from the test case set;
The test case determining unit of the present round is used for taking the received next round of test case subset as the test case subset of the present round, calling the test unit and carrying out the test of the present round by utilizing the received test case subset of the present round;
the process of sending the test failure notification of the round of test by the management device comprises the following steps: determining the total number of test cases of the round and the total number of failed test cases according to the received test results of the round; taking the ratio of the total number of failed test cases to the total number of the test cases of the round as the failure rate of the test cases of the round; judging whether the failure rate is larger than a preset threshold value; if the failure rate is larger than the preset threshold value, determining that the test is finished, and sending a test failure notification of the current round of test to the test device;
the process of the management device for transmitting the next round of test case subsets after updating the test case set comprises the following steps: if the failure rate is not greater than the preset threshold value, determining that the test is not finished, updating the test case set, starting the next round of test, sequentially selecting test cases meeting the requirement of the next round of test from the test case set according to the order of the priority from high to low, and sending the test cases as a test case subset of the next round of test cases to the test device.
17. A computing device comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
a memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 7 to 10 or for carrying out the method steps of claim 11 when executing a program stored on a memory.
CN201811566132.5A 2018-12-20 2018-12-20 Test system, test method, management device, test device and computing equipment Active CN109726124B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811566132.5A CN109726124B (en) 2018-12-20 2018-12-20 Test system, test method, management device, test device and computing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811566132.5A CN109726124B (en) 2018-12-20 2018-12-20 Test system, test method, management device, test device and computing equipment

Publications (2)

Publication Number Publication Date
CN109726124A CN109726124A (en) 2019-05-07
CN109726124B true CN109726124B (en) 2023-06-02

Family

ID=66297063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811566132.5A Active CN109726124B (en) 2018-12-20 2018-12-20 Test system, test method, management device, test device and computing equipment

Country Status (1)

Country Link
CN (1) CN109726124B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111104318B (en) * 2019-12-12 2023-06-02 北京爱奇艺科技有限公司 Unit test result export method and device and electronic equipment
CN113297090B (en) * 2021-06-11 2024-01-23 南方电网数字平台科技(广东)有限公司 System test method, device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214139A (en) * 2011-06-01 2011-10-12 北京航空航天大学 Automatic test performance control and debugging method facing distributed system
US8539282B1 (en) * 2009-06-30 2013-09-17 Emc Corporation Managing quality testing
US10037263B1 (en) * 2016-07-27 2018-07-31 Intuit Inc. Methods, systems, and articles of manufacture for implementing end-to-end automation of software services

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2358563A1 (en) * 2001-10-05 2003-04-05 Ibm Canada Limited - Ibm Canada Limitee Method and system for managing software testing
CN101984416B (en) * 2010-11-02 2014-12-10 中兴通讯股份有限公司 Method and device for generating test case
CN102880545A (en) * 2012-08-30 2013-01-16 中国人民解放军63928部队 Method for dynamically adjusting priority sequence of test cases
CN103699475B (en) * 2012-09-27 2016-09-28 西门子公司 The method that test case in fuzz testing is optimized, device and system
CN105005531B (en) * 2015-07-27 2017-09-12 昆明理工大学 A kind of test cases selection method based on debugging rate
CN106362402A (en) * 2016-10-12 2017-02-01 大连文森特软件科技有限公司 VR driving game making and experiencing system based on online visual programming
CN108132724A (en) * 2016-11-30 2018-06-08 中兴通讯股份有限公司 A kind of touch screen debugs detection method and device
CN108268366B (en) * 2016-12-30 2021-01-22 腾讯科技(深圳)有限公司 Test case execution method and device
CN106897219B (en) * 2017-02-14 2020-01-17 深圳市广和通无线通信软件有限公司 Method and device for testing stability of mobile terminal system
CN106776351B (en) * 2017-03-09 2019-08-16 浙江理工大学 A kind of combined test use-case prioritization method based on One-test-at-a-time strategy
US10365994B2 (en) * 2017-04-24 2019-07-30 Facebook, Inc. Dynamic scheduling of test cases
CN108073518A (en) * 2018-01-24 2018-05-25 广东睿江云计算股份有限公司 A kind of testing case management and device
CN108388509B (en) * 2018-02-07 2020-07-03 平安科技(深圳)有限公司 Software testing method, computer readable storage medium and terminal equipment
CN108446231A (en) * 2018-03-19 2018-08-24 重庆邮电大学 A kind of testing protocol consistency use-case priority ordering method based on risk analysis

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8539282B1 (en) * 2009-06-30 2013-09-17 Emc Corporation Managing quality testing
CN102214139A (en) * 2011-06-01 2011-10-12 北京航空航天大学 Automatic test performance control and debugging method facing distributed system
US10037263B1 (en) * 2016-07-27 2018-07-31 Intuit Inc. Methods, systems, and articles of manufacture for implementing end-to-end automation of software services

Also Published As

Publication number Publication date
CN109726124A (en) 2019-05-07

Similar Documents

Publication Publication Date Title
CN109586952B (en) Server capacity expansion method and device
CN109739527B (en) Method, device, server and storage medium for client gray scale release
CN109726124B (en) Test system, test method, management device, test device and computing equipment
CN107621963B (en) Software deployment method, software deployment system and electronic equipment
CN109032954B (en) User selection method and device for A/B test, storage medium and terminal
CN111865665B (en) Network equipment fault self-healing method and device
CN112068935B (en) Kubernetes program deployment monitoring method, kubernetes program deployment monitoring device and kubernetes program deployment monitoring equipment
US9886226B2 (en) Image forming device, image forming method, and non-transitory computer readable medium
CN115102841B (en) Network fault recovery method, device, equipment and storage medium
CN107391363B (en) Test resource scheduling method and device and electronic equipment
CN110737548B (en) Data request method and server
CN110618853B (en) Detection method, device and equipment for zombie container
CN113448844B (en) Method and device for regression testing and electronic equipment
CN110096305B (en) Gray scale distribution method, device, equipment and storage medium
WO2022095847A1 (en) System upgrading method and apparatus, device, and storage medium
CN111984527A (en) Software performance testing method, device, equipment and medium
CN111367782B (en) Regression testing data automatic generation method and device
CN111125240B (en) Distributed transaction realization method and device, electronic equipment and storage medium
CN108280024B (en) Flow distribution strategy testing method and device and electronic equipment
CN110908489B (en) Test method and test equipment for battery management system
CN111651350A (en) Test case processing method, device and equipment and computer readable storage medium
CN115391110A (en) Test method of storage device, terminal device and computer readable storage medium
CN113296945A (en) Continuous integration method, system, equipment and computer readable storage medium
CN106685966B (en) Method, device and system for detecting leakage information
CN111506492B (en) Application program testing method and device, 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