CN102937933A - Class test sequence determining method based on testing level - Google Patents

Class test sequence determining method based on testing level Download PDF

Info

Publication number
CN102937933A
CN102937933A CN2012104563158A CN201210456315A CN102937933A CN 102937933 A CN102937933 A CN 102937933A CN 2012104563158 A CN2012104563158 A CN 2012104563158A CN 201210456315 A CN201210456315 A CN 201210456315A CN 102937933 A CN102937933 A CN 102937933A
Authority
CN
China
Prior art keywords
class
limit
test
loop
eord
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.)
Withdrawn
Application number
CN2012104563158A
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.)
China University of Mining and Technology CUMT
Original Assignee
China University of Mining and Technology CUMT
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 China University of Mining and Technology CUMT filed Critical China University of Mining and Technology CUMT
Priority to CN2012104563158A priority Critical patent/CN102937933A/en
Publication of CN102937933A publication Critical patent/CN102937933A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention relates to a class test sequence determining method based on a testing level. The class test sequence determining method includes: building an expanded object relation diagram (EORD), calculating the number of loops in the EORD, and eliminating the loops in the EORD and sequencing class test levels. The class test sequence determining method based on the testing level provides effective class test sequence distribution strategies, provides deleting rules of middle edges of the loops formed by static depending relationships and dynamic depending relationships, reduces testing cost, saves testing time, increases testing accuracy and brings convenience for working of researchers.

Description

Class Test Order based on test level is determined method
Technical field
the present invention relates to a kind of method of definite Class Test Order, especially can spend the least possible detective pole and find the Class Test Order based on test level of best testing sequence to determine method.
Background technology
in object-oriented program, the definite of Class Test Order is one of sixty-four dollar question in class bunch level test.Different class testing sequences, need different test costs, so reducing as far as possible test cost is the important goal of determining Class Test Order.Do not have loop in static dependencies relation as fruit, the Class Test Order problem can solve by simple reversal topological sequence, and, for the situation that has loop, the tester must therefrom delete some dependence, to break loop wherein.When deleting dependence, need to introduce detective pole.Detective pole refers to and relies on C2 as C1, and in the incremental integration process, when C1 is integrated, but C2 not yet is integrated, and is used for simulating the serviced component of C2.
saving testing cost is an important goal selecting testing sequence, and in the test of object-oriented program, the development and testing stake is the work that cost is very high, this is because known according to the definition of detective pole, detective pole need to be simulated is the serviced component of the class that relies on of object to be tested, and because the object behavior of a class depends on the object current state, and a behavior needs relates to a plurality of objects, therefore the object behavior that will simulate exactly a class need to be understood the object behavior of all associated classes, so save the expense of development and testing stake, be to determine a vital task of Class Test Order.The method that reduces development and testing stake cost mainly contains two classes: a class is the number that minimizes required detective pole, and another kind of is the complexity that minimizes detective pole.The detective pole complexity is the complexity that builds a detective pole for weighing.The complexity of detective pole is wayward, because the complexity standard of detective pole is difficult to formulate, and the complexity of detective pole depends on developer's program capability to a certain extent, because object based programming has great dirigibility, the programmer of different developing background develops the detective pole of same class, fully likely generates the detective pole that complexity differs greatly; At present, existing scientific research personnel is applied to testing sequence in integration testing, and their proof first builds the testing sequence of class, then according to the testing sequence of class, carries out the method for integration testing, can reduce to a certain extent the quantity of detective pole.The researchist is using the class stake as actual detective pole, yet the number that the number of class stake is multiplied by their customer class is an evaluation criterion more accurately, is known as the number of special efficacy stake (specific stubs).Therefore, when a service class is used by a plurality of customer class, if we want to reduce risk, usually need the detective pole that structure is at least identical with the customer class number.
at present, existing Class Test Order research method is only limited to static analysis mostly, and the dynamic dependency relation between class is commonplace, dynamic dependency relation can cause the formation encircled in the class graph of a relation equally, the class testing sequence generation is affected, when deleting dynamic dependency relation, need to introduce the dynamic dependency relation detective pole.Dynamic dependency relation between ignore class will cause the number deficiency of detective pole, make test insufficient.
Summary of the invention
the number deficiency of the detective pole caused in order to solve the dynamic dependency relation between existing method of testing ignore class, the problem that has been difficult to final test, the invention provides a kind of Class Test Order based on test level and determine method, should determine that method not only provided effective Class Test Order allocation strategy by the Class Test Order based on test level, and provide the deletion rule on limit in the loop that static dependencies relation and dynamic dependency relation form preferably, reduced testing cost, saved the test duration, increased the accuracy of test, brought facility to scientific research personnel's work.
the technical solution adopted for the present invention to solve the technical problems is: should determine that method comprised object relationship figure, statistics EORD intermediate ring road number, elimination EORD intermediate ring road and the sequence of class testing level that builds expansion by the Class Test Order based on test level, its step is as follows:
(1) build the object relationship figure EORD of expansion
increase the limit that means dynamic dependency relation in object relationship figure ORD, with the dotted line limit that indicates Dy, mean, the object relationship figure that can be expanded, be designated as EORD={V, E}, wherein, V is each category node in representation program, E={EI ∪ EAg ∪ EAs ∪ EDy}, EI, EAg, EAs inherit respectively limit, assemble limit and incidence edge between representation class.
(2) statistics EORD intermediate ring road number
at first respectively by all limits in the strong connected component SCCi of each height comprised in SCCs, the form with tree organizes together, rule is to number each class of expression from small to large successively as root node by class, the limit comprised in SCCi is built as branch, build a different search tree during the different root node of one of every selection, avoid the node of repetition while building a search tree in a paths, finally using the node identical with root node as leaf node, until that the limit in SCCi can not meet in tree leaf node is identical with root node; Then these search trees are carried out to preorder traversal, remove the path of repetition, finally obtain total loop number and all loops and path that SCCi comprises, the number of the loop that in SCCi, each limit relates to.
(3) eliminate the EORD intermediate ring road
for the EORD that has loop, need cancellation loop and then provide cycle tests between class.Therefore, the key problem of determining inter-class test order is broken loop exactly.Due to C (incidence edge)=C (dynamic dependency limit)<C (gathering limit)<<C (succession limit), therefore claim that inheritance and aggregation are strong contact relation, contact relation a little less than dynamic dependency relation and incidence relation are.In order to reduce test cost, avoid deleting strong contact limit when cancellation loop, follow to delete in breaking the process of loop and relate to incidence edge that loop is maximum or the rule on dynamic dependency limit.At first need to identify the strong connection assembly SCCs formed by class and the dependence between them in EORD, then search all loops in each strong connected component SCCi, every dynamic dependency limit and the related loop number of incidence edge in statistics SCCi, and then have ring figure cancellation loop to become an acyclic figure by one.
the deletion rule on limit:
for the EORD that has loop, at first need cancellation loop, delete which limit cancellation loop and will directly have influence on the quantity that builds detective pole.The problem of ignoring dynamic dependency relation in order to solve existing method, for test provides enough detective poles, need to consider that the dynamic dependency limit is on breaking the impact of loop.Simultaneously minimum in order to meet the detective pole built, should follow and delete the principle that loop is as much as possible broken on minimum limit, the principle of following is: B is the parent of C, is again the service class of A, and C is the customer class of A, and A and B are associated or are the gathering class of B.If A was tested before B and C, no matter B is abstract class is also non-abstract class, no matter other relations between A and C all need for B structure detective pole.
suppose
Figure 62903DEST_PATH_IMAGE001
acyclic ORD, node A, B, C
Figure 75859DEST_PATH_IMAGE002
Figure 958364DEST_PATH_IMAGE001
b is the parent of C, it is again the service class of A, and A → B is incidence edge, dynamic dependency limit A → C makes EORD produce loop A → C → A, and limit A → C and limit C → A do not form new loop with other node, in order to construct the least possible detective pole, when B is non-abstract class, and C → A is non-incidence edge, directly deletes dynamic dependency limit A → C; When B is non-abstract class, and C → A is incidence edge, can delete limit A → C or limit C → A; When B is abstract class, delete incidence edge A → B.
suppose acyclic ORD, node A, B, C
Figure 814248DEST_PATH_IMAGE002
Figure 314500DEST_PATH_IMAGE001
, B is the parent of C, is again the service class of A, and A → B assembles limit, and dynamic dependency limit A → C makes EORD produce loop A → C → A simultaneously, and limit A → C and limit C → A do not form new loop with other node.In order to construct the least possible detective pole, if C → A is incidence edge, can delete limit C → A or A → C, be correspondingly A or C structure detective pole; Otherwise, can only delete limit A → C, be C structure detective pole.
in the loop elimination algorithm:
at first add up the related loop number of dynamic dependency limit and incidence edge, then judgement relates to the type on the limit that the loop number is maximum: if relate to the limit that the loop number is maximum, be the dynamic dependency limit, perhaps dynamic dependency limit and incidence edge relate to identical loop number, comprise by a dynamic dependency limit and an incidence edge and form a situation of simple loop, the type on the limit that judgement causes the dynamic dependency limit to form: if incidence edge is deleted the dynamic dependency limit; If the dynamic dependency limit is also deleted on the gathering limit.If have an incidence edge and a dynamic dependency limit between two classes in the same way, and the loop number that they relate to is identical and maximum simultaneously, delete this two limits simultaneously; If exist one to assemble limit or succession limit and a dynamic dependency limit in the same way between two classes, and the loop number that they relate to is identical and maximum, deletes the incidence edge in loop simultaneously.If relating to the limit that the loop number is maximum is an incidence edge, delete this incidence edge.If the loop number on many incidence edges or dynamic dependency limit is identical and maximum, delete wherein any incidence edge or dynamic dependency limit.The loop elimination algorithm as shown in Figure 2.
(4) class testing level sequence
in the implementation of program, after eliminating the loop in EORD, still have dynamic dependency relation in program, but these dynamic dependency relations do not make EORD form loop, in acyclic EORD, not only comprise the static dependencies relation but also comprise dynamic dependency relation.Due to dynamic dependency relation, just can exist the program run time, simultaneously, traditional reversal topological sequence can only be determined Class Test Order under the program static state, therefore can not be by simple reversal topological sequence for there being two kinds of dependence class bunch definite testing sequences.For the new test problem that the dynamic dependency relation solved in acyclic EORD brings, we provide the testing sequence allocation strategy based on test level.
the definition of test level:
test level refers to that according to static dependencies and dynamic dependency relation be two test grades that tested class is distributed: static test level and dynamic test level.Wherein, the static test level refers to carries out static analysis to program, only by analyzing or checking that the target class to be measured in source program checks its correctness.The result of static test can be used for further debugging, and chooses guidance is provided for test data.The dynamic test level refers to be needed, by the operation tested program, to carry out the correctness of scrutiny program.
a test level T can be expressed as a tlv triple T=(T.need, T.all, T.type).Wherein, the set that T.need is tested class; T.all is the union that the class that relies on of tested class and tested class forms; T.type is the type of test.Wherein, test-types comprises two kinds, and a kind of is static test, with S, means, another kind is dynamic test, with Dy, means.
for the accurate test of program, for each the class X in EORD, for static test level T=of each class definition (X}, and X} ∪ S (X), S); To meet D (X) ≠ class X, define a dynamic test level T=(T.need, T.all, Dy)=(X}, and X} ∪ D (X), Dy).
test level order-assigned strategy:
the test level of each class need to be distributed certain testing sequence for them after determining.Class Test Order is determined by the test dependence of class, tests dependence and means that a class depends on the degree of other classes.In order to determine Class Test Order, at first from the class testing dependence, start with, determine that the foundation of Class Test Order is: suppose three class A, B, C, when A is the subclass of B, B is the service class of C, and C is associated with B or C is the polymeric type of B, in the situation that consider the dynamic binding characteristic, during integration testing, C depends on B, also depends on the subclass A of B, and testing sequence is B, A, C.
in acyclic EORD, as shown in Figure 3, algorithm shown in Fig. 3 has been considered the characteristics that abstract class can not instantiation to the Class Test Order allocation algorithm.Abstract class can not instantiation characteristics make some test level infeasible, at first should obtain the class testing order according to test level order-assigned strategy, and then consider the impact on test level of characteristics that abstract class can not instantiation, it is adjusted, abstract class is passed to the test level to their subclass places separately, along with the backward passing of abstract class place test level, those are depended on to abstract class and the class in infeasible test level and move into the test level that abstract class that they relied on separately moves into.Abstract class can not instantiation characteristics cause it can not be by independent test, a kind of standard method of test abstract class is that the feature of its a concrete subclass of instantiation parent that this subclass is inherited is tested.Therefore, in order to describe the test position of an abstract class in the class testing order, the form that we adopt " abstract class (subclass) " to it is tested together with the relative subclass be instantiated abstract class simultaneously.
the invention has the beneficial effects as follows, should determine that method not only provided effective Class Test Order allocation strategy by the Class Test Order based on test level, and provide the deletion rule on limit in the loop that static dependencies relation and dynamic dependency relation form preferably, reduced testing cost, saved the test duration, increase the accuracy of test, brought facility to scientific research personnel's work.
The accompanying drawing explanation
below in conjunction with accompanying drawing and example, the invention will be further described.
fig. 1 is schematic flow sheet schematic diagram of the present invention.
fig. 2 is the loop elimination algorithm of EORD (V, E).
fig. 3 is Class Test Order allocation algorithm in acyclic EORD.
Embodiment
in the drawings, should determine that method comprised object relationship figure, statistics EORD intermediate ring road number, elimination EORD intermediate ring road and the sequence of class testing level that builds expansion by the Class Test Order based on test level, its step is as follows:
(1) build the object relationship figure (EORD) of expansion
increase the limit that means dynamic dependency relation in object relationship figure ORD, with the dotted line limit that indicates Dy, mean, the object relationship figure that can be expanded, be designated as EORD={V, E}, wherein, V is each category node in representation program, E={EI ∪ EAg ∪ EAs ∪ EDy}, EI, EAg, EAs inherit respectively limit, assemble limit and incidence edge between representation class.
(2) statistics EORD intermediate ring road number
at first respectively by all limits in the strong connected component SCCi of each height comprised in SCCs, the form with tree organizes together, rule is to number each class of expression from small to large successively as root node by class, the limit comprised in SCCi is built as branch, build a different search tree during the different root node of one of every selection, avoid the node of repetition while building a search tree in a paths, finally using the node identical with root node as leaf node, until that the limit in SCCi can not meet in tree leaf node is identical with root node; Then these search trees are carried out to preorder traversal, remove the path of repetition, finally obtain total loop number and all loops and path that SCCi comprises, the number of the loop that in SCCi, each limit relates to.
(3) eliminate the EORD intermediate ring road
for the EORD that has loop, need cancellation loop and then provide cycle tests between class.Therefore, the key problem of determining inter-class test order is broken loop exactly.Due to C (incidence edge)=C (dynamic dependency limit)<C (gathering limit)<<C (succession limit), therefore claim that inheritance and aggregation are strong contact relation, contact relation a little less than dynamic dependency relation and incidence relation are.In order to reduce test cost, avoid deleting strong contact limit when cancellation loop, follow to delete in breaking the process of loop and relate to incidence edge that loop is maximum or the rule on dynamic dependency limit.At first need to identify the strong connection assembly SCCs formed by class and the dependence between them in EORD, then search all loops in each strong connected component SCCi, every dynamic dependency limit and the related loop number of incidence edge in statistics SCCi, and then have ring figure cancellation loop to become an acyclic figure by one.
the deletion rule on limit:
for the EORD that has loop, at first need cancellation loop, delete which limit cancellation loop and will directly have influence on the quantity that builds detective pole.The problem of ignoring dynamic dependency relation in order to solve existing method, for test provides enough detective poles, need to consider that the dynamic dependency limit is on breaking the impact of loop.Simultaneously minimum in order to meet the detective pole built, should follow and delete the principle that loop is as much as possible broken on minimum limit, the principle of following is: B is the parent of C, is again the service class of A, and C is the customer class of A, and A and B are associated or are the gathering class of B.If A was tested before B and C, no matter B is abstract class is also non-abstract class, no matter other relations between A and C all need for B structure detective pole.
suppose
Figure 797434DEST_PATH_IMAGE001
acyclic ORD, node A, B, C
Figure 445770DEST_PATH_IMAGE001
b is the parent of C, it is again the service class of A, and A → B is incidence edge, dynamic dependency limit A → C makes EORD produce loop A → C → A, and limit A → C and limit C → A do not form new loop with other node, in order to construct the least possible detective pole, when B is non-abstract class, and C → A is non-incidence edge, directly deletes dynamic dependency limit A → C; When B is non-abstract class, and C → A is incidence edge, can delete limit A → C or limit C → A; When B is abstract class, delete incidence edge A → B.
suppose
Figure 934782DEST_PATH_IMAGE001
acyclic ORD, node A, B, C
Figure 159090DEST_PATH_IMAGE002
Figure 282904DEST_PATH_IMAGE001
, B is the parent of C, is again the service class of A, and A → B assembles limit, and dynamic dependency limit A → C makes EORD produce loop A → C → A simultaneously, and limit A → C and limit C → A do not form new loop with other node.In order to construct the least possible detective pole, if C → A is incidence edge, can delete limit C → A or A → C, be correspondingly A or C structure detective pole; Otherwise, can only delete limit A → C, be C structure detective pole.
in the loop elimination algorithm:
at first add up the related loop number of dynamic dependency limit and incidence edge, then judgement relates to the type on the limit that the loop number is maximum: if relate to the limit that the loop number is maximum, be the dynamic dependency limit, perhaps dynamic dependency limit and incidence edge relate to identical loop number, comprise by a dynamic dependency limit and an incidence edge and form a situation of simple loop, the type on the limit that judgement causes the dynamic dependency limit to form: if incidence edge is deleted the dynamic dependency limit; If the dynamic dependency limit is also deleted on the gathering limit.If have an incidence edge and a dynamic dependency limit between two classes in the same way, and the loop number that they relate to is identical and maximum simultaneously, delete this two limits simultaneously; If exist one to assemble limit or succession limit and a dynamic dependency limit in the same way between two classes, and the loop number that they relate to is identical and maximum, deletes the incidence edge in loop simultaneously.If relating to the limit that the loop number is maximum is an incidence edge, delete this incidence edge.If the loop number on many incidence edges or dynamic dependency limit is identical and maximum, delete wherein any incidence edge or dynamic dependency limit.The loop elimination algorithm as shown in Figure 2.
(4) class testing level sequence
in the implementation of program, after eliminating the loop in EORD, still have dynamic dependency relation in program, but these dynamic dependency relations do not make EORD form loop, in acyclic EORD, not only comprise the static dependencies relation but also comprise dynamic dependency relation.Due to dynamic dependency relation, just can exist the program run time, simultaneously, traditional reversal topological sequence can only be determined Class Test Order under the program static state, therefore can not be by simple reversal topological sequence for there being two kinds of dependence class bunch definite testing sequences.For the new test problem that the dynamic dependency relation solved in acyclic EORD brings, we provide the testing sequence allocation strategy based on test level.
the definition of test level:
test level refers to that according to static dependencies and dynamic dependency relation be two test grades that tested class is distributed: static test level and dynamic test level.Wherein, the static test level refers to carries out static analysis to program, only by analyzing or checking that the target class to be measured in source program checks its correctness.The result of static test can be used for further debugging, and chooses guidance is provided for test data.The dynamic test level refers to be needed, by the operation tested program, to carry out the correctness of scrutiny program.
a test level T can be expressed as a tlv triple T=(T.need, T.all, T.type).Wherein, the set that T.need is tested class; T.all is the union that the class that relies on of tested class and tested class forms; T.type is the type of test.Wherein, test-types comprises two kinds, and a kind of is static test, with S, means, another kind is dynamic test, with Dy, means.
for the accurate test of program, for each the class X in EORD, for static test level T=of each class definition (X}, and X} ∪ S (X), S); To meet D (X) ≠ class X, define a dynamic test level T=(T.need, T.all, Dy)=(X}, and X} ∪ D (X), Dy).
test level order-assigned strategy:
the test level of each class need to be distributed certain testing sequence for them after determining.Class Test Order is determined by the test dependence of class, tests dependence and means that a class depends on the degree of other classes.In order to determine Class Test Order, at first from the class testing dependence, start with, determine that the foundation of Class Test Order is: suppose three class A, B, C, when A is the subclass of B, B is the service class of C, and C is associated with B or C is the polymeric type of B, in the situation that consider the dynamic binding characteristic, during integration testing, C depends on B, also depends on the subclass A of B, and testing sequence is B, A, C.
in acyclic EORD, as shown in Figure 3, algorithm shown in Fig. 3 has been considered the characteristics that abstract class can not instantiation to the Class Test Order allocation algorithm.Abstract class can not instantiation characteristics make some test level infeasible, at first should obtain the class testing order according to test level order-assigned strategy, and then consider the impact on test level of characteristics that abstract class can not instantiation, it is adjusted, abstract class is passed to the test level to their subclass places separately, along with the backward passing of abstract class place test level, those are depended on to abstract class and the class in infeasible test level and move into the test level that abstract class that they relied on separately moves into.Abstract class can not instantiation characteristics cause it can not be by independent test, a kind of standard method of test abstract class is that the feature of its a concrete subclass of instantiation parent that this subclass is inherited is tested.Therefore, in order to describe the test position of an abstract class in the class testing order, the form that we adopt " abstract class (subclass) " to it is tested together with the relative subclass be instantiated abstract class simultaneously.

Claims (5)

1. the Class Test Order based on test level is determined method, the method comprises the object relationship figure that builds expansion, statistics EORD intermediate ring road number, eliminate EORD intermediate ring road and the sequence of class testing level, it is characterized in that, build the object relationship figure of expansion, increase the limit that means dynamic dependency relation in object relationship figure ORD, with the dotted line limit that indicates Dy, mean, the object relationship figure that can be expanded, be designated as EORD={V, E}, wherein, V is each category node in representation program, E={EI ∪ EAg ∪ EAs ∪ EDy}, EI, EAg, EAs inherits respectively limit between representation class, assemble limit and incidence edge, statistics EORD intermediate ring road number, at first respectively by all limits in the strong connected component SCCi of each height comprised in SCCs, the form with tree organizes together, rule is to number each class of expression from small to large successively as root node by class, the limit comprised in SCCi is built as branch, build a different search tree during the different root node of one of every selection, avoid the node of repetition while building a search tree in a paths, finally using the node identical with root node as leaf node, until that the limit in SCCi can not meet in tree leaf node is identical with root node, then these search trees are carried out to preorder traversal, remove the path of repetition, finally obtain total loop number and all loops and path that SCCi comprises, the number of the loop that in SCCi, each limit relates to, eliminate the EORD intermediate ring road, for the EORD that has loop, need cancellation loop and then provide cycle tests between class, therefore, determine that the key problem of inter-class test order breaks loop exactly, due to C (incidence edge)=C (dynamic dependency limit)<C (gathering limit)<<C (succession limit), therefore claim that inheritance and aggregation are strong contact relation, a little less than being, dynamic dependency relation and incidence relation contact relation, in order to reduce test cost, avoid deleting strong contact limit when cancellation loop, follow to delete in breaking the process of loop and relate to incidence edge that loop is maximum or the rule on dynamic dependency limit, at first need to identify the strong connection assembly SCCs formed by class and the dependence between them in EORD, then search all loops in each strong connected component SCCi, every dynamic dependency limit and the related loop number of incidence edge in statistics SCCi, and then there is ring figure cancellation loop to become an acyclic figure by one, the sequence of class testing level, in the implementation of program, after eliminating the loop in EORD, still there is dynamic dependency relation in program, but these dynamic dependency relations do not make EORD form loop, in acyclic EORD, not only comprise the static dependencies relation but also comprise dynamic dependency relation, due to dynamic dependency relation, just can exist the program run time, simultaneously, traditional reversal topological sequence can only be determined Class Test Order under the program static state, therefore can not be by simple reversal topological sequence for there being two kinds of dependence class bunch definite testing sequences.
2. elimination EORD intermediate ring road according to claim 1, it is characterized in that, the deletion rule on the limit in described elimination EORD intermediate ring road, for the EORD that has loop, at first need cancellation loop, delete which limit cancellation loop and will directly have influence on the quantity that builds detective pole; The problem of ignoring dynamic dependency relation in order to solve existing method, for test provides enough detective poles, need to consider that the dynamic dependency limit is on breaking the impact of loop, simultaneously minimum in order to meet the detective pole built, should follow and delete the principle that loop is as much as possible broken on minimum limit.
3. elimination EORD intermediate ring road according to claim 1, it is characterized in that, loop elimination algorithm in described EORD, at first add up the related loop number of dynamic dependency limit and incidence edge, then judgement relates to the type on the limit that the loop number is maximum: if relate to the limit that the loop number is maximum, be the dynamic dependency limit, perhaps dynamic dependency limit and incidence edge relate to identical loop number, comprise by a dynamic dependency limit and an incidence edge and form a situation of simple loop, the type on the limit that judgement causes the dynamic dependency limit to form: if incidence edge, delete the dynamic dependency limit, if the dynamic dependency limit is also deleted on the gathering limit, if have an incidence edge and a dynamic dependency limit between two classes in the same way, and the loop number that they relate to is identical and maximum simultaneously, delete this two limits simultaneously, if exist one to assemble limit or succession limit and a dynamic dependency limit in the same way between two classes, and the loop number that they relate to is identical and maximum, deletes the incidence edge in loop simultaneously, if relating to the limit that the loop number is maximum is an incidence edge, delete this incidence edge, if the loop number on many incidence edges or dynamic dependency limit is identical and maximum, delete wherein any incidence edge or dynamic dependency limit.
4. class testing level sequence according to claim 1, is characterized in that, the test level in the sequence of class testing level refers to that according to static dependencies and dynamic dependency relation be two test grades that tested class is distributed: static test level and dynamic test level; Wherein, the static test level refers to carries out static analysis to program, only by analyzing or checking that the target class to be measured in source program checks its correctness; The result of static test can be used for further debugging, and chooses guidance is provided for test data; The dynamic test level refers to be needed, by the operation tested program, to carry out the correctness of scrutiny program; A test level T can be expressed as a tlv triple T=(T.need, T.all, T.type), wherein, and the set that T.need is tested class; T.all is the union that the class that relies on of tested class and tested class forms; T.type is the type of test; Wherein, test-types comprises two kinds, and a kind of is static test, with S, means, another kind is dynamic test, with Dy, means; For the accurate test of program, for each the class X in EORD, for static test level T=of each class definition (X}, and X} ∪ S (X), S); To meet D (X) ≠ class X, define a dynamic test level T=(T.need, T.all, Dy)=(X}, and X} ∪ D (X), Dy).
5. class testing level sequence according to claim 1, is characterized in that, test level order-assigned strategy is that the test level of each class need to be distributed certain testing sequence for them after determining; Class Test Order is determined by the test dependence of class, tests dependence and means that a class depends on the degree of other classes; In order to determine Class Test Order, at first from the class testing dependence, start with, determine that the foundation of Class Test Order is: suppose three class A, B, C, when A is the subclass of B, B is the service class of C, and C is associated with B or C is the polymeric type of B, in the situation that consider the dynamic binding characteristic, during integration testing, C depends on B, also depends on the subclass A of B, and testing sequence is B, A, C.
CN2012104563158A 2012-11-14 2012-11-14 Class test sequence determining method based on testing level Withdrawn CN102937933A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012104563158A CN102937933A (en) 2012-11-14 2012-11-14 Class test sequence determining method based on testing level

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012104563158A CN102937933A (en) 2012-11-14 2012-11-14 Class test sequence determining method based on testing level

Publications (1)

Publication Number Publication Date
CN102937933A true CN102937933A (en) 2013-02-20

Family

ID=47696832

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012104563158A Withdrawn CN102937933A (en) 2012-11-14 2012-11-14 Class test sequence determining method based on testing level

Country Status (1)

Country Link
CN (1) CN102937933A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105468508A (en) * 2014-09-04 2016-04-06 阿里巴巴集团控股有限公司 Code testing method and apparatus
CN106095661A (en) * 2015-09-29 2016-11-09 中国矿业大学 Loop restructuring bankrupt in class integration testing
CN108228409A (en) * 2017-12-29 2018-06-29 南京国电南自维美德自动化有限公司 A kind of algorithm performs based on signal stream are sequentially generated method
CN108268429A (en) * 2017-06-15 2018-07-10 广东神马搜索科技有限公司 The determining method and apparatus of online literature chapters and sections
CN108287695A (en) * 2017-01-09 2018-07-17 罗伯特·博世有限公司 Method for detecting signal
CN109271308A (en) * 2017-07-17 2019-01-25 中国矿业大学 Class based on search integrates the generation method of initial population in cycle tests problem
CN112463578A (en) * 2019-09-09 2021-03-09 南华大学 System test case generation method based on step-by-step solution of component contract
CN116932603A (en) * 2023-08-03 2023-10-24 上海沄熹科技有限公司 High-performance transaction concurrency copying method based on directed graph

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
张艳梅: "基于依赖性分析的面向对象程序测试技术研究", 《中国博士学位论文全文数据库•信息科技辑》 *
张艳梅: "基于依赖性分析的面向对象程序测试技术研究", 《中国博士学位论文全文数据库•信息科技辑》, vol. 2012, no. 10, 15 October 2012 (2012-10-15), pages 6 - 7 *
张艳梅等: "一种基于动态依赖关系的类集成测试方法", 《计算机学报》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105468508A (en) * 2014-09-04 2016-04-06 阿里巴巴集团控股有限公司 Code testing method and apparatus
CN105468508B (en) * 2014-09-04 2018-07-03 阿里巴巴集团控股有限公司 code detection method and device
CN106095661A (en) * 2015-09-29 2016-11-09 中国矿业大学 Loop restructuring bankrupt in class integration testing
CN106095661B (en) * 2015-09-29 2018-12-28 中国矿业大学 Loop restructuring bankrupt in class integration testing
CN108287695A (en) * 2017-01-09 2018-07-17 罗伯特·博世有限公司 Method for detecting signal
CN108268429A (en) * 2017-06-15 2018-07-10 广东神马搜索科技有限公司 The determining method and apparatus of online literature chapters and sections
CN108268429B (en) * 2017-06-15 2021-08-06 阿里巴巴(中国)有限公司 Method and device for determining network literature chapters
CN109271308A (en) * 2017-07-17 2019-01-25 中国矿业大学 Class based on search integrates the generation method of initial population in cycle tests problem
CN108228409A (en) * 2017-12-29 2018-06-29 南京国电南自维美德自动化有限公司 A kind of algorithm performs based on signal stream are sequentially generated method
CN112463578A (en) * 2019-09-09 2021-03-09 南华大学 System test case generation method based on step-by-step solution of component contract
CN112463578B (en) * 2019-09-09 2022-04-22 南华大学 System test case generation method based on step-by-step solution of component contract
CN116932603A (en) * 2023-08-03 2023-10-24 上海沄熹科技有限公司 High-performance transaction concurrency copying method based on directed graph

Similar Documents

Publication Publication Date Title
CN102937933A (en) Class test sequence determining method based on testing level
Honglei et al. The research on software metrics and software complexity metrics
CN103631720B (en) The generation method and apparatus of test case
CN110389896A (en) Code automated analysis and test method, device and computer readable storage medium
CN104461846B (en) The method and apparatus for detecting application program power consumption
CN103605606B (en) A kind of embedded software test use-case batch execution method that can automatically change
CN105187608B (en) The method and apparatus of application program power consumption on a kind of acquisition mobile terminal
CN110297760A (en) Building method, device, equipment and the computer readable storage medium of test data
CN107729227A (en) Application testing range determining method, system, server and storage medium
CN107080945B (en) Method and device for testing artificial intelligence behaviors in game and electronic equipment
CN105426309A (en) Test case automatic generation method and apparatus
CN105653946A (en) Android malicious behavior detection system based on combined event behavior triggering and detection method of Android malicious behavior detection system
CN110096430A (en) Third party&#39;s SDK entry test method, apparatus, terminal and storage medium
CN103049374B (en) Automatic testing method and device
CN104898039B (en) Fault mode method for optimizing based on probability of failure propagation model
Vanciu et al. Hidden dependencies in software systems
CN106021113A (en) Precise test implementation method
Frank et al. Extracting operating modes from building electrical load data
CN105550110B (en) Software Graphics user&#39;s man-machine interface test data auto generation method
CN110659199B (en) Class integration test sequence generation method based on transfer dependence
CN107430590A (en) Data compare
CN103150626A (en) Program dependence graph-based BPEL (Business Process Execution Language) process consistency measurement method
CN110516446A (en) A kind of Malware family ownership determination method, system and storage medium
CN105891637A (en) Intelligent substation secondary device testing method and intelligent substation secondary device testing system
CN109597744A (en) Data unusual fluctuation analysis method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C04 Withdrawal of patent application after publication (patent law 2001)
WW01 Invention patent application withdrawn after publication

Application publication date: 20130701