CN109800169A - Test case obtaining method and device, readable storage medium and electronic equipment - Google Patents

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

Info

Publication number
CN109800169A
CN109800169A CN201910069904.2A CN201910069904A CN109800169A CN 109800169 A CN109800169 A CN 109800169A CN 201910069904 A CN201910069904 A CN 201910069904A CN 109800169 A CN109800169 A CN 109800169A
Authority
CN
China
Prior art keywords
label
test case
test
weight
target service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910069904.2A
Other languages
Chinese (zh)
Inventor
梁刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lazas Network Technology Shanghai Co Ltd
Original Assignee
Lazas Network Technology Shanghai 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 Lazas Network Technology Shanghai Co Ltd filed Critical Lazas Network Technology Shanghai Co Ltd
Priority to CN201910069904.2A priority Critical patent/CN109800169A/en
Publication of CN109800169A publication Critical patent/CN109800169A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses a method and a device for acquiring a test case, a readable storage medium and electronic equipment. According to the embodiment of the invention, a target service requirement corresponding to a test is determined, and a label corresponding to the target service requirement and a weight corresponding to the label are obtained, wherein the weight is used for representing the importance of the label to the target service requirement, so that a test case set for the test is determined in a test case set with the label according to the weight corresponding to the label. Therefore, the testing efficiency of the computer software is improved, and meanwhile, the mode of obtaining the test case is more flexible.

Description

Acquisition methods, device, readable storage medium storing program for executing and the electronic equipment of test case
Technical field
The present invention relates to data processing fields, and in particular to a kind of acquisition methods of test case, device, readable storage medium Matter and electronic equipment.
Background technique
With the continuous development of computer technology, the renewal frequency of computer software is growing.Generating new calculating Machine software or after being updated to original computer software, need to test computer software by test case (for example, Regression test), and after test result reaches expected can just online processing be carried out to computer software.Usually according to business need It asks when testing computer software, needs to obtain a large amount of test cases and tested, therefore calculate the testing efficiency of machine software It is usually lower.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of acquisition methods of test case, device, readable storage medium storing program for executing and Electronic equipment, is able to ascend the testing efficiency of computer software, while making the mode for obtaining test case more flexible.
In a first aspect, the embodiment of the invention provides a kind of acquisition methods of test case, which comprises
It determines and tests corresponding target service demand;
The corresponding label of the target service demand and the corresponding weight of the label are obtained, the weight is for characterizing institute Label is stated for the importance of the target service demand;
It is determined in the test case set with the label according to the corresponding weight of the label and is used for the test Test case subclass.
Preferably, described determined in the test case set with the label according to the corresponding weight of the label is used Include: in the test case subclass of the test
Multiple labels are corresponded in response to the target service demand, are distinguished according to the corresponding weight of multiple labels Multiple test case subclass are determined in multiple test case set with the label.
Preferably, described determined in the test case set with the label according to the corresponding weight of the label is used Include: in the test case subclass of the test
Meet first condition in response to the corresponding weight of the label, obtains the test use cases for having the label The upper limit of test case described in conjunction;
The corresponding test case subset is determined according to the upper limit of the corresponding weight of the label and the test case The quantity of test case described in conjunction;
The test is obtained in the test case set with the label according to the quantity of the test case Use-case is as the test case subclass.
Preferably, described determined in the test case set with the label according to the corresponding weight of the label is used Include: in the test case subclass of the test
Meet second condition in response to the corresponding weight of the label, obtains the test use cases for having the label Whole test cases in conjunction are as the test case subclass.
Preferably, the upper limit according to the corresponding weight of the label and the test case determines the corresponding survey The quantity of test case described in example set on probation includes:
Survey described in the test case subclass is determined according to the product of the weight and the upper limit of the test case The quantity of example on probation;Or
The test case subclass is determined according to the product of the upper limit of the weight, pre-determined factor and the test case Described in test case quantity.
Preferably, the first condition is that the corresponding weight of the label is lower than predetermined threshold.
Preferably, the second condition is that the corresponding weight of the label is higher than predetermined threshold.
Second aspect, the embodiment of the invention provides a kind of acquisition device of test case, described device includes:
First determination unit tests corresponding target service demand for determining;
Acquiring unit, it is described for obtaining the corresponding label of the target service demand and the corresponding weight of the label Weight is for characterizing the label for the importance of the target service demand;
Second determination unit, for according to the corresponding weight of the label with the label test case set in Determine the test case subclass for test.
The third aspect, the embodiment of the invention provides a kind of computer readable storage mediums, store computer program thereon Instruction, wherein the computer program instructions realize the method as described in any one of first aspect when being executed by processor.
Fourth aspect, the embodiment of the invention provides a kind of electronic equipment, including memory and processor, wherein described Memory is for storing one or more computer program instructions, wherein one or more computer program instructions are by institute Processor is stated to execute to realize following steps:
It determines and tests corresponding target service demand;
The corresponding label of the target service demand and the corresponding weight of the label are obtained, the weight is for characterizing institute Label is stated for the importance of the target service demand;
The survey for test is determined in the test case set with the label according to the corresponding weight of the label Example set on probation.
The embodiment of the present invention tests corresponding target service demand by determining, and it is corresponding to obtain the target service demand Label and the corresponding weight of the label, the weight is for characterizing the label for the important of the target service demand Property, so that the test for test is determined in the test case set with the label according to the corresponding weight of the label Use example set.The testing efficiency of computer software is improved as a result, while making the mode for obtaining test case cleverer It is living.
Detailed description of the invention
By referring to the drawings to the description of the embodiment of the present invention, the above and other purposes of the present invention, feature and Advantage will be apparent from, in the accompanying drawings:
Fig. 1 is the flow chart of the acquisition methods of the test case of first embodiment of the invention;
Fig. 2 is the test case of first embodiment of the invention and the schematic diagram of corresponding label;
Fig. 3 is the process that test case subclass is determined in an optional implementation of first embodiment of the invention Figure;
Fig. 4 is the application scenario diagram of first embodiment of the invention;
Fig. 5 is the schematic diagram of the acquisition device of the test case of second embodiment of the invention;
Fig. 6 is the schematic diagram of the electronic equipment of third embodiment of the invention.
Specific embodiment
The present invention is disclosed below based on embodiment and is described, but the present invention discloses and is not restricted to these implementations Example.It is detailed to describe some specific detail sections below in datail description disclosed by the invention.To those skilled in the art Of the invention disclose can also be understood completely in the description of part without these details for member.It is disclosed by the invention in order to avoid obscuring Essence, there is no narrations in detail for well known method, process, process, element and circuit.
In addition, it should be understood by one skilled in the art that provided herein attached drawing be provided to explanation purpose, and What attached drawing was not necessarily drawn to scale.
Unless the context clearly requires otherwise, "include", "comprise" otherwise throughout the specification and claims etc. are similar Word should be construed as the meaning for including rather than exclusive or exhaustive meaning;That is, be " including but not limited to " contains Justice.
In description disclosed by the invention, it is to be understood that term " first ", " second " etc. are used for description purposes only, It is not understood to indicate or imply relative importance.In addition, in description disclosed by the invention, it is unless otherwise indicated, " more It is a " it is meant that two or more.
Usual computer software need to carry out before online regression test (after modifying to the code of computer software, Test is re-started to confirm whether modified code generates new mistake, to reduce the cost of follow-up system test) etc. A variety of tests carry out online processing to computer software again after test result reaches expected.And the test of computer software needs Corresponding test case is obtained according to business demand, and computer software is tested by test case.Usually test The quantity of use-case is larger, therefore the testing efficiency of computer software is usually lower;And business demand is usually carried out with test case Binding, if the corresponding business demand of computer software is changed, the acquisition process of test case also will receive influence.
Fig. 1 is the flow chart of the acquisition methods of the test case of first embodiment of the invention.As shown in Figure 1, the present embodiment Method include the following steps:
Step S100 is determined and is tested corresponding target service demand.
Specifically, it tests to try the test of software for computer to be measured.For example, 1 corresponding target service demand of test For end dispatching.
Step S200 obtains the corresponding label of target service demand and the corresponding weight of label.
Wherein, weight is for characterizing label for the importance of target service demand.The corresponding label of each business demand Weight corresponding with label can be configured in advance according to actual needs, can also be related to target service demand by analyzing Historical data obtain, after obtaining label and the corresponding weight of label, need to be bound with corresponding business demand.
It should be understood that target service demand can correspond to multiple labels, and when target service demand corresponds to multiple labels, often The corresponding weight of a label and be 1.For example, target detection demand 1 corresponds to 3 labels, respectively label 1, label 2 and label 3, the corresponding weight w1 of label 1 are 0.7, and the corresponding weight w2 of label 2 is 0.2, and the corresponding weight w3 of label 3 is 0.1, w1+w2+ W3=1.
Step S300 determines the survey for test according to the corresponding weight of label in the test case set with label Example set on probation.
Preferably, before this step, each test case can be bound in advance with label.It is readily appreciated that, often A test case can correspond at least one label.
It, can be corresponding according to multiple labels when target service demand corresponds to multiple labels in the case where a kind of possible Weight multiple test case subclass are determined in multiple test case set with label respectively.Specifically, Ke Yigen The corresponding test case subclass of each label is obtained respectively according to the corresponding weight of multiple labels.Obtain multiple test case subsets After conjunction, if the test case in test case subclass has repetition, duplicate test case can be removed, thus by after duplicate removal Test case in multiple test case subclass is as the corresponding test case of target service demand.
For example, testing corresponding target service demand is business demand 1, the corresponding label of business demand 1 is label 1: back Single (containing end), label 2: maximum back is single and label 3: chase after list, do not consider herein weight for test case influence (that is, The corresponding weight of each label is all the same).Fig. 2 is the test case of first embodiment of the invention and the signal of corresponding label Figure.As shown in Fig. 2, case1-case8 is 8 test cases.It include case1 according to the test case subclass 1 that label 1 obtains And case3, it include case1, case2, case3 and case4 according to the test case subclass 2 that label 2 obtains, according to label 3 The test case subclass 3 of acquisition includes case1, case2 and case7.After removing duplicate test case, business demand 1 is right The test case answered are as follows: case1, case2, case3, case4 and case7.
Fig. 3 is the process that test case subclass is determined in an optional implementation of first embodiment of the invention Figure.As shown in figure 3, step S300 includes the following steps: in an optional implementation of the present embodiment
Step S310 obtains the test case set for having label.
It specifically, can be using whole test cases with the corresponding label of target service demand as the survey for having label Example set on probation.It should be understood that obtaining the corresponding test case of each label respectively when target service demand corresponds to multiple labels Set (that is, obtaining multiple test case set with label).
Step S3A0, judges whether the corresponding weight of label meets first condition.
If meeting first condition, S320 is thened follow the steps;If being unsatisfactory for first condition, S3B0 is thened follow the steps.
It should be understood that judging whether the corresponding weight of each label is full respectively when target service demand corresponds to multiple labels Sufficient first condition.
In an optional implementation of the present embodiment, first condition can be the corresponding weight of label lower than predetermined Threshold value.Optionally, first condition can also be the corresponding weight of label not higher than predetermined threshold etc..
Step S320 obtains the upper limit of test case in the test case set with label.
In the present embodiment, the upper limit of test case is the upper limit of the number of test case.It in this step, can be according to reality Border demand presets the upper limit of test case, can also be according to the sum of test case in the test case set with label Obtain the upper limit of test case.Specifically, it can be used the sum of test case as test in corresponding test case set The upper limit of example.
Step S330 is determined in corresponding test case subclass according to the upper limit of the corresponding weight of label and test case The quantity of test case.
Specifically, in this step, test case subset can be determined according to the product of weight and the upper limit of test case The quantity of test case in conjunction can also determine test case according to the product of the upper limit of weight, pre-determined factor and test case The quantity of test case in subclass.It is used it should be understood that the product of the upper limit of weight, pre-determined factor and test case is no more than test The sum of test case in example set, and the quantity of test case is and the immediate integer value of above-mentioned product.
For example, the weight of label 1 is 0.17, meets first condition, obtain test case in corresponding test case set 1 The upper limit, be 1201, then in the corresponding test case subclass 1 of label 1 test case quantity be 0.17 × 1201 ≈ 204 It is a.
Step S340 obtains test case conduct according to the quantity of test case in the test case set with label Test case subclass.
It is alternatively possible to randomly select the test for meeting the quantity of test case in the test case set with label Use-case can also be ranked up the test case in the test case set with label as test case subclass, and Sequence is obtained in the test case of the number of bits of preceding test case as test case subclass.It specifically, can be according to test The mark (such as numbering) of use-case is ranked up the test case in the test case set with label.
For example, the quantity of test case is 204 in the corresponding test case subclass 1 of label 1, it is corresponding to label 1 Test case in test case set 1 is ranked up, and obtains sequence in preceding 204 test cases as test case Set.
Since the corresponding weight of label is for characterizing label for the importance of target service demand, meet first in weight When condition (for example, being lower than predetermined threshold), indicate that influence of the corresponding test case of label for target service demand is smaller.Cause This can reduce the quantity of the corresponding test case of label in an optional implementation of the present embodiment according to weight, So as to shorten the time of test, testing efficiency is promoted.
Step S3B0, judges whether the corresponding weight of label meets second condition.
If meeting second condition, step S350 is executed.
It should be understood that judging whether the corresponding weight of each label is full respectively when target service demand corresponds to multiple labels Sufficient second condition.
In an optional implementation of the present embodiment, second condition can be higher than predetermined for the corresponding weight of label Threshold value.Optionally, second condition can also be the corresponding weight of label not less than predetermined threshold etc..
It should be understood that second condition is that label is corresponding when first condition is that the corresponding weight of label is lower than predetermined threshold Weight is not less than predetermined threshold;When first condition is that the corresponding weight of label is not higher than predetermined threshold, second condition is label Corresponding weight is higher than predetermined threshold.
Step S350 obtains whole test cases in the test case set with label as test case subset It closes.
When weight meets second condition, indicate influence of the corresponding test case of label for target service demand compared with Greatly, it needs sufficiently to be tested by test case computer software to be tested corresponding to target service demand.Therefore at this In the optional implementation of one of embodiment, whole test cases in the available test case set with label are made For test case subclass.
Preferably, in an optional implementation of the present embodiment, step S300 can also include the following steps:
Step S360 determines that the corresponding test of target service demand is used according to the test case in test case subclass Example.
Specifically, in the corresponding label of target service demand, then in the corresponding test case subclass of the label Test case is the corresponding test case of target service demand.When target service demand corresponds to multiple labels, multiple surveys are obtained After example set on probation, if the test case in test case subclass has repetition, duplicate test case can be removed, thus Obtain the corresponding test case of target service demand.
Fig. 4 is the application scenario diagram of first embodiment of the invention.Target service demand is business demand 1, corresponding label Respectively label 1, label 2 and label 3, wherein the corresponding weight of label 1 is 0.7, and the corresponding weight of label 2 is 0.2, label 3 Corresponding weight is 0.1.As shown in figure 4,41 be the test case set with label 1,42 be the test case with label 2 Set, 43 be the test case set with label 3.First condition is that the weight of label is not less than 0.5, and second condition is label Weight be lower than 0.5.Then 41 be the corresponding test case subclass of label 1, and 421 be the corresponding test case subclass of label 2 (including the test case in the 42 of 20%), 431 be the corresponding test case subclass of label 3 (including the survey in the 43 of 10% Example on probation).It is alternatively possible to which 41,421 and 431 are added in the corresponding test case set 44 of business demand 1, and remove Duplicate test case in 44, to obtain the corresponding test case of business demand 1.
In the present embodiment, test case is determined in the test case set with label according to the corresponding weight of label Subclass, reducing influences the quantity of lesser test case to the corresponding computer software of business demand, to reduce survey The time is tried, testing efficiency is improved.Meanwhile business demand is not bound with test case, but by by business demand and The mode that test case is bound with label respectively, so that when modifying to business demand, it is only necessary to which modifying business needs Corresponding label and the corresponding weight of label are asked, similarly, the corresponding label of test case can also be modified, so that obtaining test The mode of use-case is more flexible, while reducing the influence of the acquisition of the modification of business demand to test case, to reduce The cost of regression test.
The present embodiment tests corresponding target service demand by determining, and obtains the corresponding mark of the target service demand Sign corresponding with label weight, the weight is used to characterize the label for the importance of the target service demand, To determine that the test for test is used in the test case set with the label according to the corresponding weight of the label Example set.The testing efficiency of computer software is improved as a result, while making the mode for obtaining test case more flexible.
Fig. 5 is the schematic diagram of the acquisition device of the test case of second embodiment of the invention.As shown in figure 5, the present embodiment Device include the first determination unit 51, acquiring unit 52 and the second determination unit 53.
Wherein, the first determination unit 51 tests corresponding target service demand for determining.Acquiring unit 52 is for obtaining The corresponding label of target service demand and the corresponding weight of the label, the weight is for characterizing the label for institute State the importance of target service demand.Second determination unit 53 is used to have the label according to the corresponding weight of the label Test case set in determine for test test case subclass.
Further, second determination unit 53 is used to correspond to multiple marks in response to the target service demand Label, according to the corresponding weight of multiple labels, determination is more in multiple test case set with the label respectively A test case subclass.
Further, second determination unit 53 includes that the first acquisition subelement 531, first determines 532 and of subelement Second obtains subelement 533.
Wherein, the first acquisition subelement 531 is used to meet first condition in response to the corresponding weight of the label, obtains institute State the upper limit of test case described in the test case set with the label.First determines that subelement 532 is used for according to institute The upper limit for stating the corresponding weight of label and the test case determines that test described in the corresponding test case subclass is used The quantity of example.Second, which obtains subelement 533, is used for the quantity according to the test case in the test with the label The test case is obtained in use-case set as the test case subclass.
Further, second determination unit includes that third obtains subelement 534.
Wherein, third obtains subelement 534 and is used to meet second condition in response to the corresponding weight of the label, obtains institute Whole test cases in the test case set with the label are stated as the test case subclass.
Further, described first determine that subelement 532 is used for according to the upper limit of the weight and the test case Product determines the quantity of test case described in the test case subclass, or according to the weight, pre-determined factor and institute The product for stating the upper limit of test case determines the quantity of test case described in the test case subclass.
Further, the first condition is that the corresponding weight of the label is lower than predetermined threshold.
Further, the second condition is that the corresponding weight of the label is higher than predetermined threshold.
The present embodiment tests corresponding target service demand by determining, and obtains the corresponding mark of the target service demand Sign corresponding with label weight, the weight is used to characterize the label for the importance of the target service demand, To determine that the test for test is used in the test case set with the label according to the corresponding weight of the label Example set.The testing efficiency of computer software is improved as a result, while making the mode for obtaining test case more flexible.
Fig. 6 is the schematic diagram of the electronic equipment of third embodiment of the invention.In the present embodiment, electronic equipment is service Device.It should be understood that can also be other electronic equipments, such as raspberry pie.As shown in fig. 6, the electronic equipment: including at least a processing Device 601;And the memory 602 with the communication connection of at least one processor 601;And it is logical with scanning means communication connection Believe that component 603, communication component 603 send and receive data under the control of processor 601;Wherein, be stored with can for memory 602 The instruction executed by least one processor 601, instruction are executed by least one processor 601 to realize:
It determines and tests corresponding target service demand;
The corresponding label of the target service demand and the corresponding weight of the label are obtained, the weight is for characterizing institute Label is stated for the importance of the target service demand;
The survey for test is determined in the test case set with the label according to the corresponding weight of the label Example set on probation.
Further, described to be determined in the test case set with the label according to the corresponding weight of the label Test case subclass for test includes:
Multiple labels are corresponded in response to the target service demand, are distinguished according to the corresponding weight of multiple labels Multiple test case subclass are determined in multiple test case set with the label.
Further, described to be determined in the test case set with the label according to the corresponding weight of the label Test case subclass for test includes:
Meet first condition in response to the corresponding weight of the label, obtains the test use cases for having the label The upper limit of test case described in conjunction;
The corresponding test case subset is determined according to the upper limit of the corresponding weight of the label and the test case The quantity of test case described in conjunction;
The test is obtained in the test case set with the label according to the quantity of the test case Use-case is as the test case subclass.
Further, described to be determined in the test case set with the label according to the corresponding weight of the label Test case subclass for test includes:
Meet second condition in response to the corresponding weight of the label, obtains the test use cases for having the label Whole test cases in conjunction are as the test case subclass.
Further, the upper limit according to the corresponding weight of the label and the test case determines corresponding described The quantity of test case described in test case subclass includes:
Survey described in the test case subclass is determined according to the product of the weight and the upper limit of the test case The quantity of example on probation;Or
The test case subclass is determined according to the product of the upper limit of the weight, pre-determined factor and the test case Described in test case quantity.
Further, the first condition is that the corresponding weight of the label is lower than predetermined threshold.
Further, the second condition is that the corresponding weight of the label is higher than predetermined threshold.
Specifically, which includes: one or more processors 601 and memory 602, at one in Fig. 6 For reason device 601.Processor 601, memory 602 can be connected by bus or other modes, to be connected by bus in Fig. 6 It is connected in example.Memory 602 is used as a kind of non-volatile computer readable storage medium storing program for executing, can be used for storing non-volatile software journey Sequence, non-volatile computer executable program and module.Processor 601 by operation storage in the memory 602 it is non-easily The property lost software program, instruction and module realize above-mentioned survey thereby executing the various function application and data processing of equipment The acquisition methods of example on probation.
Memory 602 may include storing program area and storage data area, wherein storing program area can store operation system Application program required for system, at least one function;It storage data area can the Save option list etc..In addition, memory 602 can be with It can also include nonvolatile memory, for example, at least disk memory, a flash memory including high-speed random access memory Device or other non-volatile solid state memory parts.In some embodiments, it includes relative to processor that memory 602 is optional 601 remotely located memories, these remote memories can pass through network connection to external equipment.The example packet of above-mentioned network Include but be not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
One or more module stores in the memory 602, when being executed by one or more processor 601, holds The acquisition methods of test case in the above-mentioned any means embodiment of row.
Method provided by the embodiment of the present application can be performed in the said goods, has the corresponding functional module of execution method and has Beneficial effect, the not technical detail of detailed description in the present embodiment, reference can be made to method provided by the embodiment of the present application.
The present embodiment tests corresponding target service demand by determining, and obtains the corresponding mark of the target service demand Sign corresponding with label weight, the weight is used to characterize the label for the importance of the target service demand, To determine that the test for test is used in the test case set with the label according to the corresponding weight of the label Example set.The testing efficiency of computer software is improved as a result, while making the mode for obtaining test case more flexible.
The fourth embodiment of the present invention is related to a kind of non-volatile memory medium, for storing computer-readable program, institute Computer-readable program is stated for executing above-mentioned all or part of embodiment of the method for computer.
That is, it will be understood by those skilled in the art that implement the method for the above embodiments be can be with Relevant hardware is instructed to complete by program, which is stored in a storage medium, including some instructions are to make It obtains an equipment (can be single-chip microcontroller, chip etc.) or processor (processor) executes each embodiment the method for the application All or part of the steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey The medium of sequence code.
The embodiment of the invention discloses A1, a kind of acquisition methods of test case, which comprises
It determines and tests corresponding target service demand;
The corresponding label of the target service demand and the corresponding weight of the label are obtained, the weight is for characterizing institute Label is stated for the importance of the target service demand;
It is determined in the test case set with the label according to the corresponding weight of the label and is used for the test Test case subclass.
It is described to be used according to the corresponding weight of the label in the test with the label in A2, method as described in a1 Determine that the test case subclass for the test includes: in example set
Multiple labels are corresponded in response to the target service demand, are distinguished according to the corresponding weight of multiple labels Multiple test case subclass are determined in multiple test case set with the label.
In A3, method as described in a1 or a2, it is described according to the corresponding weight of the label have the label survey Determine that the test case subclass for the test includes: in example set on probation
Meet first condition in response to the corresponding weight of the label, obtains the test use cases for having the label The upper limit of test case described in conjunction;
The corresponding test case subset is determined according to the upper limit of the corresponding weight of the label and the test case The quantity of test case described in conjunction;
The test is obtained in the test case set with the label according to the quantity of the test case Use-case is as the test case subclass.
In A4, method as described in a1 or a2, it is described according to the corresponding weight of the label have the label survey Determine that the test case subclass for the test includes: in example set on probation
Meet second condition in response to the corresponding weight of the label, obtains the test use cases for having the label Whole test cases in conjunction are as the test case subclass.
In A5, the method as described in A3, the upper limit according to the corresponding weight of the label and the test case is true The quantity of test case described in the corresponding test case subclass includes: calmly
Survey described in the test case subclass is determined according to the product of the weight and the upper limit of the test case The quantity of example on probation;Or
The test case subclass is determined according to the product of the upper limit of the weight, pre-determined factor and the test case Described in test case quantity.
In A6, the method as described in A3, the first condition is that the corresponding weight of the label is lower than predetermined threshold.
In A7, the method as described in A4, the second condition is that the corresponding weight of the label is higher than predetermined threshold.
The embodiment of the invention also discloses B1, a kind of acquisition device of test case, described device includes:
First determination unit tests corresponding target service demand for determining;
Acquiring unit, it is described for obtaining the corresponding label of the target service demand and the corresponding weight of the label Weight is for characterizing the label for the importance of the target service demand;
Second determination unit, for according to the corresponding weight of the label with the label test case set in Determine the test case subclass for test.
The embodiment of the invention also discloses C1, a kind of computer readable storage medium, store computer program instructions thereon, Wherein, the computer program instructions realize the method as described in any one of A1-A7 when being executed by processor.
The embodiment of the invention also discloses D1, a kind of electronic equipment, including memory and processor, wherein the storage Device is for storing one or more computer program instructions, wherein one or more computer program instructions are by the place Device is managed to execute to realize following steps:
It determines and tests corresponding target service demand;
The corresponding label of the target service demand and the corresponding weight of the label are obtained, the weight is for characterizing institute Label is stated for the importance of the target service demand;
The survey for test is determined in the test case set with the label according to the corresponding weight of the label Example set on probation.
In D2, the electronic equipment as described in D1, it is described according to the corresponding weight of the label have the label survey Determine that the test case subclass for test includes: in example set on probation
Multiple labels are corresponded in response to the target service demand, are distinguished according to the corresponding weight of multiple labels Multiple test case subclass are determined in multiple test case set with the label.
It is described that the label is being had according to the corresponding weight of the label in D3, the electronic equipment as described in D1 or D2 Test case set in determine for test test case subclass include:
Meet first condition in response to the corresponding weight of the label, obtains the test use cases for having the label The upper limit of test case described in conjunction;
The corresponding test case subset is determined according to the upper limit of the corresponding weight of the label and the test case The quantity of test case described in conjunction;
The test is obtained in the test case set with the label according to the quantity of the test case Use-case is as the test case subclass.
It is described that the label is being had according to the corresponding weight of the label in D4, the electronic equipment as described in D1 or D2 Test case set in determine for test test case subclass include:
Meet second condition in response to the corresponding weight of the label, obtains the test use cases for having the label Whole test cases in conjunction are as the test case subclass.
It is described according to the upper of the corresponding weight of the label and the test case in D5, the electronic equipment as described in D3 Limit determines that the quantity of test case described in the corresponding test case subclass includes:
Survey described in the test case subclass is determined according to the product of the weight and the upper limit of the test case The quantity of example on probation;Or
The test case subclass is determined according to the product of the upper limit of the weight, pre-determined factor and the test case Described in test case quantity.
In D6, the electronic equipment as described in D3, the first condition is that the corresponding weight of the label is lower than predetermined threshold.
In D7, the electronic equipment as described in D4, the second condition is that the corresponding weight of the label is higher than predetermined threshold.
It will be understood by those skilled in the art that the various embodiments described above are realization specific embodiments of the present invention, and In practical applications, can to it, various changes can be made in the form and details, without departing from the spirit and scope of the present invention.

Claims (10)

1. a kind of acquisition methods of test case, which is characterized in that the described method includes:
It determines and tests corresponding target service demand;
The corresponding label of the target service demand and the corresponding weight of the label are obtained, the weight is for characterizing the mark Sign the importance for the target service demand;
The survey for being used for the test is determined in the test case set with the label according to the corresponding weight of the label Example set on probation.
2. the method according to claim 1, wherein it is described according to the corresponding weight of the label with described Determine that the test case subclass for the test includes: in the test case set of label
Multiple labels are corresponded in response to the target service demand, according to the corresponding weight of multiple labels respectively in band Have and determines multiple test case subclass in multiple test case set of the label.
3. method according to claim 1 or 2, which is characterized in that described to be had according to the corresponding weight of the label Determine that the test case subclass for the test includes: in the test case set of the label
Meet first condition in response to the corresponding weight of the label, obtains in the test case set with the label The upper limit of the test case;
It is determined in the corresponding test case subclass according to the upper limit of the corresponding weight of the label and the test case The quantity of the test case;
The test case is obtained in the test case set with the label according to the quantity of the test case As the test case subclass.
4. method according to claim 1 or 2, which is characterized in that described to be had according to the corresponding weight of the label Determine that the test case subclass for the test includes: in the test case set of the label
Meet second condition in response to the corresponding weight of the label, obtains in the test case set with the label Whole test cases as the test case subclass.
5. according to the method described in claim 3, it is characterized in that, described according to the corresponding weight of the label and the test The upper limit of use-case determines that the quantity of test case described in the corresponding test case subclass includes:
It is determined to test described in the test case subclass according to the product of the weight and the upper limit of the test case and be used The quantity of example;Or
Institute in the test case subclass is determined according to the product of the upper limit of the weight, pre-determined factor and the test case State the quantity of test case.
6. according to the method described in claim 3, it is characterized in that, the first condition is that the corresponding weight of the label is lower than Predetermined threshold.
7. according to the method described in claim 4, it is characterized in that, the second condition is that the corresponding weight of the label is higher than Predetermined threshold.
8. a kind of acquisition device of test case, which is characterized in that described device includes:
First determination unit tests corresponding target service demand for determining;
Acquiring unit, for obtaining the corresponding label of the target service demand and the corresponding weight of the label, the weight For characterizing the label for the importance of the target service demand;
Second determination unit, for being determined in the test case set with the label according to the corresponding weight of the label Test case subclass for test.
9. a kind of computer readable storage medium, stores computer program instructions thereon, which is characterized in that the computer program Such as method of any of claims 1-7 is realized in instruction when being executed by processor.
10. a kind of electronic equipment, including memory and processor, which is characterized in that the memory is for storing one or more Computer program instructions, wherein one or more computer program instructions are executed as follows to realize by the processor Step:
It determines and tests corresponding target service demand;
The corresponding label of the target service demand and the corresponding weight of the label are obtained, the weight is for characterizing the mark Sign the importance for the target service demand;
Determine that the test for test is used in the test case set with the label according to the corresponding weight of the label Example set.
CN201910069904.2A 2019-01-24 2019-01-24 Test case obtaining method and device, readable storage medium and electronic equipment Pending CN109800169A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910069904.2A CN109800169A (en) 2019-01-24 2019-01-24 Test case obtaining method and device, readable storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910069904.2A CN109800169A (en) 2019-01-24 2019-01-24 Test case obtaining method and device, readable storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN109800169A true CN109800169A (en) 2019-05-24

Family

ID=66560404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910069904.2A Pending CN109800169A (en) 2019-01-24 2019-01-24 Test case obtaining method and device, readable storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN109800169A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112015655A (en) * 2020-09-01 2020-12-01 中国银行股份有限公司 Test case distribution method, device, equipment and readable storage medium
CN112052162A (en) * 2020-08-14 2020-12-08 国电南瑞科技股份有限公司 Regression test case selection method and device
CN112416800A (en) * 2020-12-03 2021-02-26 网易(杭州)网络有限公司 Intelligent contract testing method, device, equipment and storage medium
CN113434436A (en) * 2021-07-30 2021-09-24 拉扎斯网络科技(上海)有限公司 Test case generation method and device, electronic equipment and storage medium
CN114595137A (en) * 2020-12-03 2022-06-07 中国联合网络通信集团有限公司 Test case obtaining method and device
WO2022267364A1 (en) * 2021-06-22 2022-12-29 深圳前海微众银行股份有限公司 Information recommendation method and device, and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130117611A1 (en) * 2011-11-09 2013-05-09 Tata Consultancy Services Limited Automated test execution plan derivation system and method
CN103365765A (en) * 2012-03-28 2013-10-23 腾讯科技(深圳)有限公司 Test case screening method and test case screening system for testing
CN103810104A (en) * 2014-03-04 2014-05-21 中国人民解放军63863部队 Method and system for optimizing software test case
CN104572449A (en) * 2014-12-23 2015-04-29 中国移动通信集团广东有限公司 Automatic test method based on case library
CN107957957A (en) * 2017-12-28 2018-04-24 网易(杭州)网络有限公司 The acquisition methods and device of test case
CN108073506A (en) * 2016-11-17 2018-05-25 百度在线网络技术(北京)有限公司 Test method and device
CN108845927A (en) * 2018-05-04 2018-11-20 联动优势电子商务有限公司 A kind of screening technique and device of test case
CN109062802A (en) * 2018-08-13 2018-12-21 深圳壹账通智能科技有限公司 A kind of method for testing software, computer readable storage medium and terminal device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130117611A1 (en) * 2011-11-09 2013-05-09 Tata Consultancy Services Limited Automated test execution plan derivation system and method
CN103365765A (en) * 2012-03-28 2013-10-23 腾讯科技(深圳)有限公司 Test case screening method and test case screening system for testing
CN103810104A (en) * 2014-03-04 2014-05-21 中国人民解放军63863部队 Method and system for optimizing software test case
CN104572449A (en) * 2014-12-23 2015-04-29 中国移动通信集团广东有限公司 Automatic test method based on case library
CN108073506A (en) * 2016-11-17 2018-05-25 百度在线网络技术(北京)有限公司 Test method and device
CN107957957A (en) * 2017-12-28 2018-04-24 网易(杭州)网络有限公司 The acquisition methods and device of test case
CN108845927A (en) * 2018-05-04 2018-11-20 联动优势电子商务有限公司 A kind of screening technique and device of test case
CN109062802A (en) * 2018-08-13 2018-12-21 深圳壹账通智能科技有限公司 A kind of method for testing software, computer readable storage medium and terminal device

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112052162A (en) * 2020-08-14 2020-12-08 国电南瑞科技股份有限公司 Regression test case selection method and device
CN112052162B (en) * 2020-08-14 2022-09-23 国电南瑞科技股份有限公司 Regression test case selection method and device
CN112015655A (en) * 2020-09-01 2020-12-01 中国银行股份有限公司 Test case distribution method, device, equipment and readable storage medium
CN112015655B (en) * 2020-09-01 2023-08-08 中国银行股份有限公司 Method, device, equipment and readable storage medium for distributing test cases
CN112416800A (en) * 2020-12-03 2021-02-26 网易(杭州)网络有限公司 Intelligent contract testing method, device, equipment and storage medium
CN114595137A (en) * 2020-12-03 2022-06-07 中国联合网络通信集团有限公司 Test case obtaining method and device
CN112416800B (en) * 2020-12-03 2023-09-15 网易(杭州)网络有限公司 Intelligent contract testing method, device, equipment and storage medium
CN114595137B (en) * 2020-12-03 2024-05-10 中国联合网络通信集团有限公司 Test case acquisition method and device
WO2022267364A1 (en) * 2021-06-22 2022-12-29 深圳前海微众银行股份有限公司 Information recommendation method and device, and storage medium
CN113434436A (en) * 2021-07-30 2021-09-24 拉扎斯网络科技(上海)有限公司 Test case generation method and device, electronic equipment and storage medium
CN113434436B (en) * 2021-07-30 2022-12-16 拉扎斯网络科技(上海)有限公司 Test case generation method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109800169A (en) Test case obtaining method and device, readable storage medium and electronic equipment
US9465724B2 (en) Method, program, and system for generating test cases
CN108959059B (en) Test method and test platform
CN110764993A (en) Automatic testing method and terminal equipment
WO2019214109A1 (en) Monitoring device and method for testing process, and computer readable storage medium
CN107704282B (en) Loading method and device applied to embedded system
CN108876545A (en) Order recognition methods, device and readable storage medium storing program for executing
CN111475402B (en) Program function testing method and related device
CN110046088A (en) A kind of interface test method, device and equipment
CN108399125B (en) Automatic testing method and device, computer equipment and storage medium
CN116048967A (en) Cheng Xuou problem positioning method, cheng Xuou problem positioning device, electronic device and storage medium
CN109684213A (en) A kind of test method, device and storage medium
CN110888809B (en) Risk prediction method and device for test task
CN109189673B (en) Software test scheme, and method and device for determining test cases
CN108828427B (en) Criterion searching method, device, equipment and storage medium for signal integrity test
CN115098362B (en) Page test method, page test device, electronic equipment and storage medium
CN114218104A (en) Mobile terminal testing method and device based on AT instruction and storage medium
CN115543769A (en) Unit testing method and device, electronic equipment and storage medium
CN111079390B (en) Method and device for determining selection state of check box list
CN114077545A (en) Method, device and equipment for acquiring verification data and readable storage medium
CN106775629B (en) Search file generation method and device
CN117294673B (en) Data resource processing method, data resource processing device and storage medium
CN113590407B (en) Interface testing method and device
CN114448848B (en) Switch testing method and device, electronic equipment and storage medium
CN110795297B (en) Electronic equipment testing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190524