CN103885876A - Testing method and testing equipment - Google Patents

Testing method and testing equipment Download PDF

Info

Publication number
CN103885876A
CN103885876A CN201210564597.3A CN201210564597A CN103885876A CN 103885876 A CN103885876 A CN 103885876A CN 201210564597 A CN201210564597 A CN 201210564597A CN 103885876 A CN103885876 A CN 103885876A
Authority
CN
China
Prior art keywords
test case
test
available
program
measuring program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201210564597.3A
Other languages
Chinese (zh)
Other versions
CN103885876B (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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201210564597.3A priority Critical patent/CN103885876B/en
Publication of CN103885876A publication Critical patent/CN103885876A/en
Application granted granted Critical
Publication of CN103885876B publication Critical patent/CN103885876B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

An embodiment of the invention provides a testing method and testing equipment. The testing method includes according to a preset disintegration relation, generating a testing use case of disintegration corresponding to an available use case, utilizing the available use case to run a to-be-tested program to generate a first testing result, and utilizing the testing use case of disintegration to run the to-be-tested program to generate a second testing result. By the testing method, the to-be-tested program can be verified according to the first testing result, the second testing result and the disintegration relation so as to determine whether the to-be-tested program is correct or not, and participation of operating personnel is not needed in the process of testing; the testing method is simple in operation and high in correct rate, so that efficiency and reliability of testing operation are improved.

Description

Method of testing and equipment
[technical field]
The present invention relates to measuring technology, relate in particular to a kind of method of testing and equipment.
[background technology]
In software test procedure, many intermediate link all needs operating personnel manually to control.For example, in the design phase of test case, operating personnel can be according to concrete testing requirement, design test case; Or more for example, in the expection stage of test result, operating personnel can utilize the test case of design, measuring program is treated in operation, calculates the test result of expection.
But, the complicated operation of existing test operation, and easily makeing mistakes, thus the reduction of efficiency and the reliability of test operation caused.
[summary of the invention]
Many aspects of the present invention provide a kind of method of testing and equipment, in order to improve efficiency and the reliability of test operation.
An aspect of of the present present invention, provides a kind of method of testing, comprising:
Utilize self-adapting random testing algorithm, generate at least two test cases;
Utilize greedy algorithm, described at least two test cases are searched for, with available test case at least two test cases described in selecting;
According to the transformation relation setting in advance, generate the test case of the transformation corresponding with described available test case, described transformation relation is used to indicate the variation of test case and utilizes the test case of described variation before and after described variation to treat measuring program the corresponding relation of testing the variation of generated test result;
Utilize described in the operation of described available test case and treat measuring program, to generate the first test result;
Utilize described in the test case operation of described transformation and treat measuring program, to generate the second test result;
According to described the first test result, described the second test result and described transformation relation, treat that to described measuring program verifies.
Aspect as above and arbitrary possible implementation, further provide a kind of implementation, and the described self-adapting random testing algorithm that utilizes, generates at least two test cases, comprising:
Utilize self-adapting random testing algorithm, and according to the covering threshold value setting in advance, generate at least two test cases, described at least two test cases are more than or equal to described covering threshold value to the described coverage condition for the treatment of measuring program.
Aspect as above and arbitrary possible implementation, further provide a kind of implementation, and the described greedy algorithm that utilizes is searched for described at least two test cases, comprising:
Successively from described at least two test cases except the available test case of the N-1 that selects before in other test case, select N available test case, until the coverage condition of described N available test case is more than or equal to the covering threshold value setting in advance, described N is more than or equal to 1 integer; Wherein,
The first program that described routine package to be measured has covered containing the N-1 selecting a before available test case and N-1 the available test case of selecting before do not have chlamydate the second program;
The coverage condition of other test case except N-1 the available test case of selecting before to the second program at least two test cases described in described N available test case is greater than the coverage condition of the second program.
Another aspect of the present invention, provides a kind of testing apparatus, comprising:
Generation unit, for utilizing self-adapting random testing algorithm, generates at least two test cases;
Search unit, for utilizing greedy algorithm, searches for described at least two test cases, with available test case at least two test cases described in selecting;
Described generation unit, the transformation relation also setting in advance for basis, generate the test case of the transformation corresponding with described available test case, described transformation relation is used to indicate the variation of test case and utilizes the test case of described variation before and after described variation to treat measuring program the corresponding relation of testing the variation of generated test result;
Test cell, treats measuring program for utilizing described in the operation of described available test case, to generate the first test result; And utilize described in the test case operation of described transformation and treat measuring program, to generate the second test result;
Authentication unit, for according to described the first test result, described the second test result and described transformation relation, treats that to described measuring program verifies.
Aspect as above and arbitrary possible implementation, further provide a kind of implementation, described generation unit, specifically for
Utilize self-adapting random testing algorithm, and according to the covering threshold value setting in advance, generate at least two test cases, described at least two test cases are more than or equal to described covering threshold value to the described coverage condition for the treatment of measuring program.
Aspect as above and arbitrary possible implementation, further provide a kind of implementation, described search unit, specifically for
Successively from described at least two test cases except the available test case of the N-1 that selects before in other test case, select N available test case, until the coverage condition of described N available test case is more than or equal to the covering threshold value setting in advance, described N is more than or equal to 1 integer; Wherein,
The first program that described routine package to be measured has covered containing the N-1 selecting a before available test case and N-1 the available test case of selecting before do not have chlamydate the second program;
The coverage condition of other test case except N-1 the available test case of selecting before to the second program at least two test cases described in described N available test case is greater than the coverage condition of the second program.
As shown from the above technical solution, the transformation relation that the embodiment of the present invention sets in advance by basis, generate the test case of the transformation corresponding with available test case, and then utilize described in the operation of described available test case and treat measuring program, to generate the first test result, and utilize described in the test case operation of described transformation and treat measuring program, to generate the second test result, make it possible to according to described the first test result, described the second test result and described transformation relation, treat that to described measuring program verifies, described in determining, treat that whether measuring program is correct, participate in test process without operating personnel, simple to operate, and accuracy is high, thereby efficiency and the reliability of test operation are improved.
[brief description of the drawings]
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The schematic flow sheet of the method for testing that Fig. 1 provides for one embodiment of the invention;
The structural representation of the testing apparatus that Fig. 2 provides for another embodiment of the present invention.
[embodiment]
For making object, technical scheme and the advantage of the embodiment of the present invention clearer, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
In addition, term "and/or" herein, is only a kind of incidence relation of describing affiliated partner, and expression can exist three kinds of relations, and for example, A and/or B, can represent: individualism A exists A and B, these three kinds of situations of individualism B simultaneously.In addition, character "/" herein, generally represents that forward-backward correlation is to liking a kind of relation of "or".
The schematic flow sheet of the method for testing that Fig. 1 provides for one embodiment of the invention, as shown in Figure 1.
101, utilize self-adapting random test (Adaptive Random Testing, ART) algorithm, generate at least two test cases.
102, utilize greedy (Greedy) algorithm, described at least two test cases are searched for, with available test case at least two test cases described in selecting.
103, according to the transformation relation setting in advance, generate the test case of the transformation corresponding with described available test case, described transformation relation is used to indicate the variation of test case and utilizes the test case of described variation before and after described variation to treat measuring program the corresponding relation of testing the variation of generated test result.
104, utilize described in the operation of described available test case and treat measuring program, to generate the first test result.
105, utilize described in the test case operation of described transformation and treat measuring program, to generate the second test result.
106,, according to described the first test result, described the second test result and described transformation relation, treat that to described measuring program verifies.
Wherein, 104 and 105 execution can not have fixing order, and the present embodiment does not limit this.
Like this, the transformation relation setting in advance by basis, generate the test case of the transformation corresponding with available test case, and then utilize described in the operation of described available test case and treat measuring program, to generate the first test result, and utilize described in the test case operation of described transformation and treat measuring program, to generate the second test result, make it possible to according to described the first test result, described the second test result and described transformation relation, treat that to described measuring program verifies, described in determining, treat that whether measuring program is correct, participate in test process without operating personnel, simple to operate, and accuracy is high, thereby efficiency and the reliability of test operation are improved.
Alternatively, in one of the present embodiment possible implementation, by carrying out 101, generation that can robotization has the test case of different.
Particularly, first, according to the input data layout pre-entering and data create-rule, generate at random the 1st test case T1, and record T1 and treat the coverage condition of measuring program.
Then, generating at random n(n is to be more than or equal to 2 integer again) individual alternative test case, and, and record them and treat the coverage condition of measuring program, and, calculate the distance between n each alternative test case and T1, the alternative test case of chosen distance maximum is as the 2nd test case T2.Wherein, described distance can be understood as the quantitative criteria of the otherness between alternative test case and test case.
The method of calculating this distance can have a variety of.For example, alternative test case is treated to measuring program coverage condition and test case and treat the difference of the coverage condition of measuring program and take absolute value, and then be added.Suppose that described routine package to be measured is containing 3 row, the coverage condition that test case T1 treats measuring program is 101, and the coverage condition that alternative test case t1 treats measuring program is 001, the coverage condition that alternative test case t2 treats measuring program is 011, wherein, 1 represents to cover, and 0 represents not cover.So, the distance between t1 and T1 is | 0-1|+|0-0|+|1-1|=1, and the distance between t2 and T1 is | 0-1|+|1-0|+|1-1|=2.
Or more for example, alternative test case is treated to the coverage condition of measuring program and test case and is treated the union of the coverage condition of measuring program and treat the coverage condition of measuring program and test case and treat divided by alternative test case the common factor of the coverage condition of measuring program.Suppose that described routine package to be measured is containing 3 row, the coverage condition that test case T1 treats measuring program is 101 to cover 2 row, the coverage condition that alternative test case t1 treats measuring program is 001 to cover 1 row, the coverage condition that alternative test case t2 treats measuring program is 011 to cover 2 row, wherein, 1 represents to cover, and 0 represents not cover.So, the distance between t1 and T1 is 2/1=2, and the distance between t2 and T1 is 3/1=3.
Etc., also have a lot of additive methods can be for calculating described distance, the present embodiment does not limit this.
Then, generating at random n(n is to be more than or equal to 2 integer again) individual alternative test case, and, and record them and treat the coverage condition of measuring program, and, calculate the distance between the each alternative test case of n and T1, T2, select the alternative test case of Maximizing Minimum Distance as the 3rd test case T3.Wherein, minor increment is the distance between alternative test case and T1, with, minor increment be less distance in the distance between alternative test case and T2.
By that analogy, aforesaid operations is carried out in circulation, to generate M(M as being more than or equal to 2 integer) individual test case, until this M test case is more than or equal to the described coverage condition for the treatment of measuring program the covering threshold value setting in advance, or M reaches the number threshold value setting in advance, till.
Alternatively, in one of the present embodiment possible implementation, in 102, the selection strategy of the described greedy algorithm using is to select successively to the current not test case of the capped coverage condition maximum for the treatment of measuring program, as feasible test case.Particularly, specifically can be successively from described at least two test cases except N-1 the available test case of selecting before in other test case, select N available test case, until the coverage condition of described N available test case is more than or equal to the covering threshold value setting in advance, described N is more than or equal to 1 integer; Wherein,
The first program that described routine package to be measured has covered containing the N-1 selecting a before available test case and N-1 the available test case of selecting before do not have chlamydate the second program;
The coverage condition of other test case except N-1 the available test case of selecting before to the second program at least two test cases described in described N available test case is greater than the coverage condition of the second program.
Particularly, can, according to preset strategy, repeatedly carry out, for example, specify herein until the coverage condition of described N available test case is more than or equal to the covering threshold value setting in advance, for example, 1 time or 2 times.
For example, suppose to treat that measuring program is that software under testing system (System Under Test, SUT) comprises following 11 row,
01:if?a>b:
02:if?a>b+1:
03:do?something
04:else:
05:do?something
06:elif?a=b:
07:do?something
08:else?a<b:
09:do?something
10:if?a==b+2:
11:do?something
By carrying out 101, generate following test case:
T1:a=3,b=1;
T2:a=3,b=2;
T3:a=3,b=3;
T4:a=4,b=4;
T5:a=3,b=4。
Can see from described test case, T1 has covered 1,2,3,10 and 11 row, and T2 has covered 1,4 and 5 row, and T3 has covered 6 and 7 row, and T4 has covered 6 and 7 row, and T5 has covered 8 and 9 row.
First, select the highest T1 of coverage rate, so also remaining 4,5,6,7,8 and 9 row are not capped.Then, then the coverage rate of these row of search covering is the highest, and discovery T2, T3, T4 and T5 are 2.Can adopt certain strategy, for example, T2 of select progressively, also remaining 6,7,8 and 9 row are not capped.In like manner select T3, remaining 8 and 9 is not capped, selects T5, and all row are all capped afterwards, and remaining T4 is eliminated or is placed in lower whorl selected again.
In the present embodiment, the transformation relation setting in advance by basis, generate the test case of the transformation corresponding with available test case, and then utilize described in the operation of described available test case and treat measuring program, to generate the first test result, and utilize described in the test case operation of described transformation and treat measuring program, to generate the second test result, make it possible to according to described the first test result, described the second test result and described transformation relation, treat that to described measuring program verifies, described in determining, treat that whether measuring program is correct, participate in test process without operating personnel, simple to operate, and accuracy is high, thereby efficiency and the reliability of test operation are improved.
In addition, the technical scheme that adopts the present embodiment to provide, owing to participating in test process without operating personnel, can also further reduce cost of labor, greatly improves measuring stability, reduces test risk.
In addition, the technical scheme that adopts the present embodiment to provide, owing to having adopted transformation relation, treat that to described measuring program verifies, make to treat without concern the inside realization flow of measuring program, only need to pay close attention to the variation of test case and the variation of each self-corresponding test result of available test case and transformation, whether meet described transformation relation, thereby save checking cost, especially particularly evident for the program effect to be measured of complexity.
It should be noted that, for aforesaid each embodiment of the method, for simple description, therefore it is all expressed as to a series of combination of actions, but those skilled in the art should know, the present invention is not subject to the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in instructions all belongs to preferred embodiment, and related action and module might not be that the present invention is necessary.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, in certain embodiment, there is no the part of detailed description, can be referring to the associated description of other embodiment.
The structural representation of the testing apparatus that Fig. 2 provides for another embodiment of the present invention, as shown in Figure 2.The testing apparatus of the present embodiment can comprise generation unit 21, search unit 22, test cell 23 and authentication unit 24.Wherein, generation unit 21, for utilizing self-adapting random testing algorithm, generates at least two test cases; Search unit 22, for utilizing greedy algorithm, searches for described at least two test cases, with available test case at least two test cases described in selecting; Described generation unit 21, the transformation relation also setting in advance for basis, generate the test case of the transformation corresponding with described available test case, described transformation relation is used to indicate the variation of test case and utilizes the test case of described variation before and after described variation to treat measuring program the corresponding relation of testing the variation of generated test result; Test cell 23, treats measuring program for utilizing described in the operation of described available test case, to generate the first test result; And utilize described in the test case operation of described transformation and treat measuring program, to generate the second test result; Authentication unit 24, for according to described the first test result, described the second test result and described transformation relation, treats that to described measuring program verifies.
Like this, the transformation relation setting in advance by generation unit basis, generate the test case of the transformation corresponding with available test case, and then utilize described in the operation of described available test case and treat measuring program by test cell, to generate the first test result, and utilize described in the test case operation of described transformation and treat measuring program, to generate the second test result, make the authentication unit can be according to described the first test result, described the second test result and described transformation relation, treat that to described measuring program verifies, described in determining, treat that whether measuring program is correct, participate in test process without operating personnel, simple to operate, and accuracy is high, thereby efficiency and the reliability of test operation are improved.
Alternatively, in one of the present embodiment possible implementation, generation unit 21 is by carrying out corresponding operation, and generation that can robotization has the test case of different.
Particularly, first, described generation unit 21, according to the input data layout and the data create-rule that pre-enter, generates the 1st test case T1 at random, and records T1 and treat the coverage condition of measuring program.
Then, described generation unit 21 generates at random n(n again and is more than or equal to 2 integer) individual alternative test case, and, and record them and treat the coverage condition of measuring program, and, calculate the distance between n each alternative test case and T1, the alternative test case of chosen distance maximum is as the 2nd test case T2.Wherein, described distance can be understood as the quantitative criteria of the otherness between alternative test case and test case.
The method that described generation unit 21 calculates this distance can have a variety of.
For example, described generation unit 21 is treated measuring program coverage condition and test case by alternative test case and is treated the difference of the coverage condition of measuring program and take absolute value, and then is added.Suppose that described routine package to be measured is containing 3 row, the coverage condition that test case T1 treats measuring program is 101, and the coverage condition that alternative test case t1 treats measuring program is 001, the coverage condition that alternative test case t2 treats measuring program is 011, wherein, 1 represents to cover, and 0 represents not cover.So, the distance between t1 and T1 is | 0-1|+|0-0|+|1-1|=1, and the distance between t2 and T1 is | 0-1|+|1-0|+|1-1|=2.
Or more for example, described generation unit 21 is treated alternative test case the coverage condition of measuring program and test case and treats the union of the coverage condition of measuring program and treat the coverage condition of measuring program and test case and treat divided by alternative test case the common factor of the coverage condition of measuring program.Suppose that described routine package to be measured is containing 3 row, the coverage condition that test case T1 treats measuring program is 101 to cover 2 row, the coverage condition that alternative test case t1 treats measuring program is 001 to cover 1 row, the coverage condition that alternative test case t2 treats measuring program is 011 to cover 2 row, wherein, 1 represents to cover, and 0 represents not cover.So, the distance between t1 and T1 is 2/1=2, and the distance between t2 and T1 is 3/1=3.
Etc., described generation unit 21 also has a lot of additive methods can be for calculating described distance, and the present embodiment does not limit this.
Then, described generation unit 21 generates at random n(n again and is more than or equal to 2 integer) individual alternative test case, and, and record them and treat the coverage condition of measuring program, and, calculate the distance between the each alternative test case of n and T1, T2, select the alternative test case of Maximizing Minimum Distance as the 3rd test case T3.Wherein, minor increment is the distance between alternative test case and T1, with, minor increment be less distance in the distance between alternative test case and T2.
By that analogy, aforesaid operations is carried out in described generation unit 21 circulations, to generate M(M as being more than or equal to 2 integer) individual test case, until this M test case is more than or equal to the described coverage condition for the treatment of measuring program the covering threshold value setting in advance, or M reaches the number threshold value setting in advance, till.
That is to say, described generation unit 21, specifically can utilize self-adapting random testing algorithm, and according to the covering threshold value setting in advance, generate at least two test cases, described at least two test cases are more than or equal to described covering threshold value to the described coverage condition for the treatment of measuring program.
Alternatively, in one of the present embodiment possible implementation, the selection strategy of the described greedy algorithm that described search unit 22 uses is to select successively to the current not test case of the capped coverage condition maximum for the treatment of measuring program, as feasible test case.Particularly, described search unit 22, specifically can for successively from described at least two test cases except the available test case of the N-1 that selects before in other test case, select N available test case, until the coverage condition of described N available test case is more than or equal to the covering threshold value setting in advance, described N is more than or equal to 1 integer; Wherein,
The first program that described routine package to be measured has covered containing the N-1 selecting a before available test case and N-1 the available test case of selecting before do not have chlamydate the second program;
The coverage condition of other test case except N-1 the available test case of selecting before to the second program at least two test cases described in described N available test case is greater than the coverage condition of the second program.
Particularly, described search unit 22 can, according to preset strategy, be carried out repeatedly, for example, until being more than or equal to the covering threshold value setting in advance, the coverage condition of described N available test case specifies herein, for example, 1 time or 2 times.
For example, suppose to treat that measuring program is that software under testing system (System Under Test, SUT) comprises following 11 row,
01:if?a>b:
02:if?a>b+1:
03:do?something
04:else:
05:do?something
06:elifa=b:
07:do?something
08:else?a<b:
09:do?something
10:if?a==b+2:
11:do?something
By carrying out 101, generate following test case:
T1:a=3,b=1;
T2:a=3,b=2;
T3:a=3,b=3;
T4:a=4,b=4;
T5:a=3,b=4。
Can see from described test case, T1 has covered 1,2,3,10 and 11 row, and T2 has covered 1,4 and 5 row, and T3 has covered 6 and 7 row, and T4 has covered 6 and 7 row, and T5 has covered 8 and 9 row.
First, described search unit 22 is selected the T1 that coverage rate is the highest, and so also remaining 4,5,6,7,8 and 9 row are not capped.Then, the coverage rate that described search unit 22 is searched for these row of covering is again the highest, finds that T2, T3, T4 and T5 are 2.Described search unit 22 can adopt certain strategy, for example, T2 of select progressively, also remaining 6,7,8 and 9 row are not capped.In like manner described search unit 22 is selected T3, and remaining 8 and 9 is not capped, and described search unit 22 is selected T5, and all row are all capped afterwards, and remaining T4 is eliminated or is placed in lower whorl selected again.
In the present embodiment, the transformation relation setting in advance by generation unit basis, generate the test case of the transformation corresponding with available test case, and then utilize described in the operation of described available test case and treat measuring program by test cell, to generate the first test result, and utilize described in the test case operation of described transformation and treat measuring program, to generate the second test result, make the authentication unit can be according to described the first test result, described the second test result and described transformation relation, treat that to described measuring program verifies, described in determining, treat that whether measuring program is correct, participate in test process without operating personnel, simple to operate, and accuracy is high, thereby efficiency and the reliability of test operation are improved.
In addition, the technical scheme that adopts the present embodiment to provide, owing to participating in test process without operating personnel, can also further reduce cost of labor, greatly improves measuring stability, reduces test risk.
In addition, the technical scheme that adopts the present embodiment to provide, because authentication unit has adopted transformation relation, treat that to described measuring program verifies, make to treat without concern the inside realization flow of measuring program, only need to pay close attention to the variation of test case and the variation of each self-corresponding test result of available test case and transformation, whether meet described transformation relation, thereby save checking cost, especially particularly evident for the program effect to be measured of complexity.
Those skilled in the art can be well understood to, for convenience and simplicity of description, the system of foregoing description, the specific works process of device and unit, can, with reference to the corresponding process in preceding method embodiment, not repeat them here.
In several embodiment provided by the present invention, should be understood that, disclosed system, apparatus and method, can realize by another way.For example, device embodiment described above is only schematic, for example, the division of described unit, be only that a kind of logic function is divided, when actual realization, can have other dividing mode, for example multiple unit or assembly can in conjunction with or can be integrated into another system, or some features can ignore, or do not carry out.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, indirect coupling or the communication connection of device or unit can be electrically, machinery or other form.
The described unit as separating component explanation can or can not be also physically to separate, and the parts that show as unit can be or can not be also physical locations, can be positioned at a place, or also can be distributed in multiple network element.Can select according to the actual needs some or all of unit wherein to realize the object of the present embodiment scheme.
In addition, the each functional unit in each embodiment of the present invention can be integrated in a processing unit, can be also that the independent physics of unit exists, and also can be integrated in a unit two or more unit.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form that also can adopt hardware to add SFU software functional unit realizes.
The integrated unit that the above-mentioned form with SFU software functional unit realizes, can be stored in a computer read/write memory medium.Above-mentioned SFU software functional unit is stored in a storage medium, comprise that some instructions (can be personal computers in order to make a computer equipment, server, or the network equipment etc.) or processor (processor) carry out the part steps of method described in each embodiment of the present invention.And aforesaid storage medium comprises: various media that can be program code stored such as USB flash disk, portable hard drive, ROM (read-only memory) (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disc or CDs.
Finally it should be noted that: above embodiment only, in order to technical scheme of the present invention to be described, is not intended to limit; Although the present invention is had been described in detail with reference to previous embodiment, those of ordinary skill in the art is to be understood that: its technical scheme that still can record aforementioned each embodiment is modified, or part technical characterictic is wherein equal to replacement; And these amendments or replacement do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (6)

1. a method of testing, is characterized in that, comprising:
Utilize self-adapting random testing algorithm, generate at least two test cases;
Utilize greedy algorithm, described at least two test cases are searched for, with available test case at least two test cases described in selecting;
According to the transformation relation setting in advance, generate the test case of the transformation corresponding with described available test case, described transformation relation is used to indicate the variation of test case and utilizes the test case of described variation before and after described variation to treat measuring program the corresponding relation of testing the variation of generated test result;
Utilize described in the operation of described available test case and treat measuring program, to generate the first test result;
Utilize described in the test case operation of described transformation and treat measuring program, to generate the second test result;
According to described the first test result, described the second test result and described transformation relation, treat that to described measuring program verifies.
2. method according to claim 1, is characterized in that, the described self-adapting random testing algorithm that utilizes, generates at least two test cases, comprising:
Utilize self-adapting random testing algorithm, and according to the covering threshold value setting in advance, generate at least two test cases, described at least two test cases are more than or equal to described covering threshold value to the described coverage condition for the treatment of measuring program.
3. method according to claim 1 and 2, is characterized in that, the described greedy algorithm that utilizes is searched for described at least two test cases, comprising:
Successively from described at least two test cases except the available test case of the N-1 that selects before in other test case, select N available test case, until the coverage condition of described N available test case is more than or equal to the covering threshold value setting in advance, described N is more than or equal to 1 integer; Wherein,
The first program that described routine package to be measured has covered containing the N-1 selecting a before available test case and N-1 the available test case of selecting before do not have chlamydate the second program;
The coverage condition of other test case except N-1 the available test case of selecting before to the second program at least two test cases described in described N available test case is greater than the coverage condition of the second program.
4. a testing apparatus, is characterized in that, comprising:
Generation unit, for utilizing self-adapting random testing algorithm, generates at least two test cases;
Search unit, for utilizing greedy algorithm, searches for described at least two test cases, with available test case at least two test cases described in selecting;
Described generation unit, the transformation relation also setting in advance for basis, generate the test case of the transformation corresponding with described available test case, described transformation relation is used to indicate the variation of test case and utilizes the test case of described variation before and after described variation to treat measuring program the corresponding relation of testing the variation of generated test result;
Test cell, treats measuring program for utilizing described in the operation of described available test case, to generate the first test result; And utilize described in the test case operation of described transformation and treat measuring program, to generate the second test result;
Authentication unit, for according to described the first test result, described the second test result and described transformation relation, treats that to described measuring program verifies.
5. equipment according to claim 4, is characterized in that, described generation unit, specifically for
Utilize self-adapting random testing algorithm, and according to the covering threshold value setting in advance, generate at least two test cases, described at least two test cases are more than or equal to described covering threshold value to the described coverage condition for the treatment of measuring program.
6. according to the equipment described in claim 4 or 5, it is characterized in that, described search unit, specifically for
Successively from described at least two test cases except the available test case of the N-1 that selects before in other test case, select N available test case, until the coverage condition of described N available test case is more than or equal to the covering threshold value setting in advance, described N is more than or equal to 1 integer; Wherein,
The first program that described routine package to be measured has covered containing the N-1 selecting a before available test case and N-1 the available test case of selecting before do not have chlamydate the second program;
The coverage condition of other test case except N-1 the available test case of selecting before to the second program at least two test cases described in described N available test case is greater than the coverage condition of the second program.
CN201210564597.3A 2012-12-21 2012-12-21 Method of testing and equipment Active CN103885876B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210564597.3A CN103885876B (en) 2012-12-21 2012-12-21 Method of testing and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210564597.3A CN103885876B (en) 2012-12-21 2012-12-21 Method of testing and equipment

Publications (2)

Publication Number Publication Date
CN103885876A true CN103885876A (en) 2014-06-25
CN103885876B CN103885876B (en) 2018-01-05

Family

ID=50954784

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210564597.3A Active CN103885876B (en) 2012-12-21 2012-12-21 Method of testing and equipment

Country Status (1)

Country Link
CN (1) CN103885876B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572462A (en) * 2014-12-31 2015-04-29 中国人民解放军理工大学 Method for generating metamorphic test case based on adaptive random strategy
CN106547695A (en) * 2016-10-26 2017-03-29 中广核工程有限公司 A kind of test system and method for scale software
CN106897217A (en) * 2017-02-13 2017-06-27 北京趣拿软件科技有限公司 Method of testing and test device
WO2019061783A1 (en) * 2017-09-29 2019-04-04 武汉斗鱼网络科技有限公司 Data test method and apparatus, electronic device and computer-readable storage medium
CN109783753A (en) * 2018-12-14 2019-05-21 平安普惠企业管理有限公司 The tree-shaped drawing generating method of web site url, device, equipment and storage medium
CN110823226A (en) * 2019-10-30 2020-02-21 北京航空航天大学 Unmanned aerial vehicle intelligent route planning test method based on metamorphic test technology
CN112988566A (en) * 2021-01-25 2021-06-18 杭州衣科云科技有限公司 Method and device for improving test coverage, computer equipment and storage medium
CN116126698A (en) * 2022-12-29 2023-05-16 中国人民解放军国防科技大学 Run-time configuration updating defect detection method based on metamorphic test
CN117056203A (en) * 2023-07-11 2023-11-14 南华大学 Numerical expression type metamorphic relation selection method based on complexity

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030033091A1 (en) * 2001-04-20 2003-02-13 Sequenom, Inc. Systems and methods for testing a biological sample
CN101916225A (en) * 2010-09-02 2010-12-15 于秀山 Graphical user interface software function coverage testing method
CN102170378A (en) * 2011-04-22 2011-08-31 北京科技大学 Web service test method with no need of anticipation
CN102253889A (en) * 2011-08-07 2011-11-23 南京大学 Method for dividing priorities of test cases in regression test based on distribution

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030033091A1 (en) * 2001-04-20 2003-02-13 Sequenom, Inc. Systems and methods for testing a biological sample
CN101916225A (en) * 2010-09-02 2010-12-15 于秀山 Graphical user interface software function coverage testing method
CN102170378A (en) * 2011-04-22 2011-08-31 北京科技大学 Web service test method with no need of anticipation
CN102253889A (en) * 2011-08-07 2011-11-23 南京大学 Method for dividing priorities of test cases in regression test based on distribution

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
聂鹏等: "软件测试用例自动生成算法综述", 《计算机应用研究》 *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572462A (en) * 2014-12-31 2015-04-29 中国人民解放军理工大学 Method for generating metamorphic test case based on adaptive random strategy
CN104572462B (en) * 2014-12-31 2017-10-03 中国人民解放军理工大学 A kind of metamorphic testing case generation method based on self-adapting random strategy
CN106547695A (en) * 2016-10-26 2017-03-29 中广核工程有限公司 A kind of test system and method for scale software
CN106547695B (en) * 2016-10-26 2019-03-05 中广核工程有限公司 A kind of test macro and method of scale software
CN106897217A (en) * 2017-02-13 2017-06-27 北京趣拿软件科技有限公司 Method of testing and test device
WO2019061783A1 (en) * 2017-09-29 2019-04-04 武汉斗鱼网络科技有限公司 Data test method and apparatus, electronic device and computer-readable storage medium
CN109783753A (en) * 2018-12-14 2019-05-21 平安普惠企业管理有限公司 The tree-shaped drawing generating method of web site url, device, equipment and storage medium
CN110823226A (en) * 2019-10-30 2020-02-21 北京航空航天大学 Unmanned aerial vehicle intelligent route planning test method based on metamorphic test technology
CN110823226B (en) * 2019-10-30 2021-04-30 北京航空航天大学 Unmanned aerial vehicle intelligent route planning test method based on metamorphic test technology
CN112988566A (en) * 2021-01-25 2021-06-18 杭州衣科云科技有限公司 Method and device for improving test coverage, computer equipment and storage medium
CN112988566B (en) * 2021-01-25 2024-01-02 杭州衣科信息技术股份有限公司 Test coverage rate improving method and device, computer equipment and storage medium
CN116126698A (en) * 2022-12-29 2023-05-16 中国人民解放军国防科技大学 Run-time configuration updating defect detection method based on metamorphic test
CN116126698B (en) * 2022-12-29 2023-08-01 中国人民解放军国防科技大学 Run-time configuration updating defect detection method based on metamorphic test
CN117056203A (en) * 2023-07-11 2023-11-14 南华大学 Numerical expression type metamorphic relation selection method based on complexity
CN117056203B (en) * 2023-07-11 2024-04-09 南华大学 Numerical expression type metamorphic relation selection method based on complexity

Also Published As

Publication number Publication date
CN103885876B (en) 2018-01-05

Similar Documents

Publication Publication Date Title
CN103885876A (en) Testing method and testing equipment
CN104123184B (en) A kind of method and system for being used to distribute resource for the task in building process
CN108681565B (en) Block chain data parallel processing method, device, equipment and storage medium
US10161749B1 (en) Optimizing water quality sensor placement for water distribution systems
US20140379104A1 (en) Electronic device and method for controlling baseboard management controllers
CN106201481A (en) Assembly management method and apparatus in application development system
CN102592000B (en) Circuit board wiring detection system
CN103678115B (en) The apparatus and method of the position of source code mistake are detected in mixed mode program
CN109542410A (en) Rule engine system, method, equipment and storage medium
CN103853654A (en) Method and device for selecting webpage testing paths
US9891988B2 (en) Device and method for storing data in a plurality of multi-level cell memory chips
US20100030992A1 (en) Initializing of a memory area
CN110688111A (en) Configuration method, device, server and storage medium of business process
CN109165209A (en) The data verification method, device of object type, equipment and medium in database
CN103631714A (en) Method for generating minimum combination testing cases based on matrix multiplicity
CN104580109A (en) Method and device for generating click verification code
US8739091B1 (en) Techniques for segmenting of hardware trace and verification of individual trace segments
CN105630680B (en) A kind of random test program generation method
CN107515724A (en) For the method and apparatus for the input and output for reproducing storage system
CN105760373A (en) Abnormal data processing method and abnormal data processing device
US7865348B1 (en) Performance of circuit simulation with multiple combinations of input stimuli
CN104731671B (en) A kind of verification device and method of wrong plug device and method, error-correcting code circuit
CN104750714A (en) File generation system and method
CN103729259A (en) Verification method and device for AHB read-write burst mutual interruption
CN111506299B (en) Front-end data verification method and device and computer equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant