CN106547696A - A kind of method for generating test case and device of Workflow-oriented system - Google Patents

A kind of method for generating test case and device of Workflow-oriented system Download PDF

Info

Publication number
CN106547696A
CN106547696A CN201610957561.XA CN201610957561A CN106547696A CN 106547696 A CN106547696 A CN 106547696A CN 201610957561 A CN201610957561 A CN 201610957561A CN 106547696 A CN106547696 A CN 106547696A
Authority
CN
China
Prior art keywords
node
son
type
workflow
branch
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
CN201610957561.XA
Other languages
Chinese (zh)
Other versions
CN106547696B (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.)
PLA University of Science and Technology
Original Assignee
PLA University of Science and Technology
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 PLA University of Science and Technology filed Critical PLA University of Science and Technology
Priority to CN201610957561.XA priority Critical patent/CN106547696B/en
Publication of CN106547696A publication Critical patent/CN106547696A/en
Application granted granted Critical
Publication of CN106547696B publication Critical patent/CN106547696B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The present invention provides a kind of method for generating test case and device of Workflow-oriented system, wherein, methods described includes:Based on the Workflow system constrained with input and output, Petri net model is set up;According to branching polymerization pair, the Petri net model is divided into into multiple fragments;If there is branching polymerization pair in the fragment for dividing, continuation is divided to the fragment, to obtain the corresponding model decomposition tree of the Petri net model;The model decomposition tree is traveled through, the cycle testss set corresponding with the model decomposition tree is generated;According to the input/output information that every cycle testss in the cycle testss set are included, test case is generated.A kind of method for generating test case and device of Workflow-oriented system that the present invention is provided, can solve the problem that in prior art the measuring technology specific aim low problem of strong, Workflow system testing adequacy, to improve the testing efficiency of system.

Description

A kind of method for generating test case and device of Workflow-oriented system
Technical field
The present invention relates to field of computer technology, more particularly to a kind of method for generating test case of Workflow-oriented system And device.
Background technology
Workflow technology is in recent years in the wide variety of computer technology in national economy field.Although through nearly 30 The development in year, workflow technology have developed into the research neck of a system, complicated and architectonical via initial bud Domain, and achieve quite plentiful and substantial achievement in research, but from the point of view of the summary of experience tested from practical application and to which, its Maturity away from Also greatly differ from each other from people's the set goal, especially in terms of the research to its method of testing, theoretical still unsound, application is still not Extensively.All in all, the problem of the following aspects is primarily present in current workflow Study on Test Method:
(1) system modeling method specific aim is not strong, and model applicability is low.It is current main to the research of workflow modeling technology For aspects such as task scheduling, performance evaluation, model checkings, the Modeling Technique Research towards test is very insufficient, most researchs Only give one test general framework, to towards test workflow modeling technology do not carry out specifically, in-depth study. All kinds of key elements that preferably Work flow model should clearly, exactly in expression system.Towards the Workflow system modeling of test Model description should be considered whether correct complete, set up model can be relied on to generate test case, or even automatization holds The work such as row test.Although having some at present is based on the intuitively modeling method such as flow chart, state diagram, due to its semantic mistake In simple, it is impossible to complicated logical process in expression system.
(2) Test Sample Design lacks theoretical direction, and testing adequacy is low.Automatic test is the reason of all testers Think target, the support of instrument can increase substantially testing efficiency.Although some instruments can enter to Work flow model at present Row verification of correctness or performance evaluation, but test remains quality assurance maximally effective means carried out to which.At present to workflow Mainly based on manual test, the function of only some instruments is also more single, testing example design master for the test of system The experience relied on by tester, this causes, and Test coverage face is not wide, and adequacy is not high, tests not abundant enough.
The content of the invention
It is an object of the invention to provide the method for generating test case and device of a kind of Workflow-oriented system, can solve The problem that certainly measuring technology specific aim is strong in prior art, Workflow system testing adequacy is low, to improve the test of system Efficiency.
For achieving the above object, the present invention provides a kind of method for generating test case of Workflow-oriented system, the side Method includes:Based on the Workflow system constrained with input and output, Petri net model is set up;Wherein, wrap in the Workflow system The active set of workflow, the set of input element, the set of output element, the set of relationship in workflow, activity are included to defeated Enter the mapping of the mapping and activity of element to output element;The Petri net model includes being input into class place and output class Active set, mapping set and initial pessimistic concurrency control in the set of place, workflow;It is right according to branch-polymerization, will be described Petri net model is divided into multiple fragments;If it is right to there is branch-polymerization in the fragment for dividing, continuation is divided to the fragment, To obtain the corresponding model decomposition tree of the Petri net model;The model decomposition tree is traveled through, is generated and the model decomposition tree Corresponding cycle testss set;It is according to the input/output information that every cycle testss in the cycle testss set are included, raw Into test case.
Further, the corresponding model decomposition tree of the Petri net model builds in the following manner:Step S11:By institute Petri net model is stated as a node, and according to branch-polymerization to being multiple fragments by the node allocation, wherein, each piece One child node of the Duan Zuowei nodes;Step S12:By type in each child node be branch-polymerization to child node carry out Process, using by type as branch-polymerization to child node in each bar flow process as the child node child node;Step S13:To divide - polymerization to each child node as Petri network submodel, and each Petri network submodel is passed according to step S11 Return process.
Further, the model decomposition tree is traveled through, generates the cycle testss set corresponding with the model decomposition tree Specifically include:Step S21:Present node node is expressed as into the type of attachment of its all child node node.son;Step S22: If the type of node.son is or, and node.son also has n child node node.son.son, then include all The cycle testss of node.son are replicated n time, and the node.son in each sequence after replicating is replaced with node.son.son; Step S23:If the type of node.son is and, all cycle testss comprising node.son are substituted for all The parallel fo of node.son.son;Step S24:Recursive traversal is carried out to node.son.son, with to node.son.son's Child node is processed according to step S21 to S23.
Further, in the model decomposition tree, the type of branch node is consistent with the type of aggregation.
Further, specifically include in the step of generating test case:When the node in the model decomposition tree has son During node, the type of the node is judged;When the type of the node is sequence, the node is replaced with into all of the node The form of child node connection;When the type of the node is or, the node is replaced with the arbitrary son in the child node of the node Node;When the type of the node is and, the node is replaced with the parallel fo of all child nodes of the node.
For achieving the above object, on the other hand the application also provides a kind of Test cases technology dress of Workflow-oriented system Put, described device includes:Pessimistic concurrency control sets up unit, for based on the Workflow system constrained with input and output, setting up Petri network Model;Wherein, the Workflow system include the active set of workflow, the set of input element, output element set, Mapping of the set of relationship, the mapping of activity to input element and activity in workflow to output element;The Petri network mould Type includes being input into the set of class place and output class place, the active set in workflow, mapping set and original net mould Type;The Petri net model, for right according to branch-polymerization, is divided into multiple fragments by model decomposition tree construction unit;If There is branch-polymerization in the fragment of division right, continuation is divided to the fragment, corresponding to obtain the Petri net model Model decomposition tree;Cycle testss set signal generating unit, for traveling through the model decomposition tree, generates and the model decomposition tree phase Corresponding cycle testss set;Test cases technology unit, for according to every cycle testss bag in the cycle testss set The input/output information for containing, generates test case.
Further, the pessimistic concurrency control is set up unit and is specifically included:Fragment splits module, for by the Petri network mould Type as a node, and according to branch-polymerization to by the node allocation be multiple fragments, wherein, each fragment is used as the section One child node of point;Node processing module, for by type in each child node be branch-polymerization to child node at Reason, using by type as branch-polymerization to child node in each bar flow process as the child node child node;Recursion process module, For using branch-polymerization to each child node as Petri network submodel, and to each Petri network submodel according to described The execution step of fragment segmentation module carries out Recursion process.
Further, the cycle testss set signal generating unit is specifically included:Type of attachment representation module, for by currently Node node is expressed as the type of attachment of its all child node node.son;First kind judge module, if for The type of node.son is or, and node.son also has n child node node.son.son, then by all comprising node.son Cycle testss replicate n time, and the node.son in each sequence after replicating is replaced with into node.son.son;Second Type Judge module, if the type for node.son is and, all cycle testss comprising node.son is substituted for all The parallel fo of node.son.son;Recursive traversal module, for carrying out recursive traversal to node.son.son, with right The child node of node.son.son is judged according to the type of attachment representation module, first kind judge module and Second Type The execution step of module is processed.
Further, the Test cases technology unit is specifically included:Type judging module, for when the model decomposition When node in tree has child node, the type of the node is judged;First processing module, for the type when the node be The node, during sequence, is replaced with the form of all child node connections of the node;Second processing module, for when the section When the type of point is or, the node is replaced with the arbitrary child node in the child node of the node;3rd processing module, for working as When the type of the node is and, the node is replaced with the parallel fo of all child nodes of the node.
Therefore, problem of the application for the method for testing deficiency of Workflow system, by the work in Workflow system The input and output of each activity are modeled as the place of Petri network, to Workflow system by the dynamic migration being modeled as in Petri network Several basic structures are analyzed, and proposition is a kind of will to turn to the algorithm and model of Petri net model with input and output flow of work Method for simplifying, so as to solve in prior art, measuring technology specific aim is strong, Workflow system testing adequacy is low asks Topic, and improve the testing efficiency of system.
Description of the drawings
Fig. 1 is the schematic diagram of model fragment in the application;
Fig. 2 is the schematic diagram of tree in the application;
Fig. 3 is the method for generating test case flow chart of Workflow-oriented system in the application;
Fig. 4 is the functional block diagram of the Test cases technology device of Workflow-oriented system in the application.
Specific embodiment
In order that those skilled in the art more fully understand the technical scheme in the application, below in conjunction with the application reality The accompanying drawing in mode is applied, the technical scheme in the application embodiment is clearly and completely described, it is clear that described Embodiment is only a part of embodiment of the application, rather than the embodiment of whole.Based on the embodiment party in the application Formula, all other embodiment that those of ordinary skill in the art are obtained under the premise of creative work is not made, all answers When the scope for belonging to the application protection.
Fig. 3 is referred to, the application provides a kind of method for generating test case of Workflow-oriented system, methods described bag Include:
S1:Based on the Workflow system constrained with input and output, Petri net model is set up;Wherein, the Workflow system Include the active set of workflow, the set of input element, the set of output element, the set of relationship in workflow, activity Mapping and activity to input element is to the mapping for exporting element;The Petri net model includes being input into class place and defeated Go out the set of class place, the active set in workflow, mapping set and initial pessimistic concurrency control;
S2:It is right according to branch-polymerization, the Petri net model is divided into into multiple fragments;If existing in the fragment for dividing Branch-polymerization is right, and continuation is divided to the fragment, to obtain the corresponding model decomposition tree of the Petri net model;
S3:The model decomposition tree is traveled through, the cycle testss set corresponding with the model decomposition tree is generated;
S4:According to the input/output information that every cycle testss in the cycle testss set are included, test case is generated.
Specifically, in the present embodiment, hexa-atomic group of < Activity, Input, Output, Relation, fAI,fAO> The workflow with input and output constraint can be represented, wherein:
Activity={ activity1,activity2,L activityk(k >=1) represent workflow active set;
Input={ input1,input2,L inputm(m >=1) represent input element set;
Output={ output1,output2,L outputn(n >=1) represent output element set;
Relation={ (f, Type) | f ∈ (Activity × Activity) } represents the set of relationship in workflow, its Middle Type ∈ { sequence, and-join, or-join, and-split, or-split } represent former and later two work in workflow Dynamic relationship type;
fAI:Activity → ρ (Input) represents a certain movable mapping to input element in workflow, wherein ρ (Input) represent the power set of input element;
fAO:The mapping for exporting element, wherein ρ are arrived in a certain activity during Activity → ρ (Output) represents workflow (Output) represent the power set of output element;
Additionally, ∑=(P, T, F, M0) it is Petri net model I/O_WF_Net that workflow is constrained with input and output, And if only if meets following condition:
(P,T,F,M0) it is a Workflow net;
T represents the active set in workflow;
P=Pin∪Pout, wherein PinRepresent input class place, PoutRepresent output class place;
pin∈Pin, the execution of movable t needs to be input into pinAnd if only if
pout∈Pout, the execution generation output p of movable toutAnd if only if
On the basis of defined above, following false code gives and for the Workflow net constrained with input and output to be converted into I/ The concrete grammar and process of O_WF_Net models.
INPUT:Workflow=<Activity,Input,Output,Relation,fAI,fAO>
OUTPUT:∑=(P, T, F, M0)
begin
T←Activity
For i=1 to | T | do//first step, single-unit activity modeling
end for
tj∈T(1≤i,j≤|T|)if ti,tj∈ Relation then//second step, workflow relationship modeling
Swich Relation.Type
Case sequence:// relationship type is sequence
T←T∪ti;j
Case and-join:// relationship type is and-join
T←T∪ti;j
Else
End if
Case or-join:// relationship type is or-join
T←T∪tij
Case and-split:// relationship type is and-split
T←T∪ti;j
Else
End if
Case or-split//relationship type is or-split
T←T∪ti;j
End Swich
//start node modelings
P←P∪ps, T ← T ∪ ts, F ← F ∪ { (ps,ts)}
for each ti∈Ts do
//end node modelings
P←P∪pe,T←T∪te,F←F∪{(te,pe)}
for each ti∈Te do// initial markers
M0(ps)←1
Output ∑s=(P, T, F, M0)
end
In the present embodiment, for the node P (or T) in I/O_WF_Net model Ms, if its subsequent node more than Individual, then the node is referred to as branch node.
For the node P (or T) in I/O_WF_Net model Ms, if its preposition node more than one, the node is referred to as Aggregation.
For branch node p1With aggregation p2If, by branch node p1The all flow chart branches for producing are in polymerization section Point p2Regroup as a flow process, then node p1、p2Referred to as branch-polymerization is right, and the part between them is referred to as by branch-poly- Point is to p1、p2The workflow fragment for splitting, the every paths in workflow fragment are referred to as flow process fragment.Branch in model- Polymerization is to there is following several situations should be noted:
A the branch node of () branch-aggregation centering is identical with the node type of aggregation:If branch node with The type of aggregation is different, may have two kinds of situations:One is that branch node is migration type, and aggregation is library type, The each flow process fragment for now producing can concurrent working, if wherein arbitrary procedure is run at aggregation, due to aggregation For library type, i.e. or-join types, then migration thereafter can be immediately performed, and this is likely to result in whole workflow and has performed To end nodes, and certain flow process therein is not carried out situation about completing, and the design of model is unreasonable;Two is that branch node is storehouse Institute's type (or types branch-polymerization to), aggregation are migration type, the relation between Ze Ge branches to select to perform, i.e., May only have one or several branch to go at aggregation, as aggregation is to migrate type, i.e. and-join types, Then its enable condition may never be satisfied, and workflow is stuck at aggregation and cannot continue executing with, the design of model It is unreasonable.To sum up analyze, the type of the branch node and aggregation of branch-aggregation centering must be identical.For Branch-the polymerization caused by migration node is right to being referred to as and types branch-polymerization, and the referred to as or types branch caused by place node- Polymerization is right.
B () branch-polymerization is to nesting:Consider model fragment as shown in Figure 1, its interior joint p2、p4It is branch node, But aggregation only one of which p corresponding to them10.Therefore, for certain node, same point might not be pertaining only to It is right to prop up-be polymerized.Situation shown in Fig. 1 is referred to as branch-polymerization to nesting, wherein p4、p10Branch-the polymerization of composition is to dividing for internal layer - be polymerized right, p2、p10It is right for outer layer branch-polymerization.
The process of (c) to circulating:Work unqualified generation in view of the circulation being likely to occur in workflow or certain in stage Do over again phenomenon, loop structure during modeling, will be formed.When processing to such case, can be regarded as one group of branches-aggregation Right, wherein branch node and aggregation are same node, and loop body is a branch, and other branch into sky.If clear and definite Cycle-index n, then to section circulation body circulation n time when generating use-case;If no clear and definite cycle-index is according to condition Redirect, then when use-case is generated, to this section of loop body circulation primary.
You Liao branches-polymerization to concept, can be many to I/O_WF_Net models are integrally divided into according to branch-polymerization Individual fragment, if there is branch-polymerization right in branch's flow process, recursively processes to which according to same method, so will Form a tree (referred to as I/O_WF_Net model decompositions tree) as shown in Figure 2.
In tree in addition to leaf node, each node is respectively provided with corresponding type:Sequence represents that the node includes multiple moulds Matrix section, and wherein certain fragment is that branch-polymerization is right, is needed to these branch-polymerizations to being further processed;or/and Represent that the node is that a branch-polymerization is right, and type is or/and, each of which child node can be considered a new mould Type.When generating test case, only the spanning tree need to be traveled through, if certain node has child node, according to node type point Manage in other places:
A () node type is sequence:Illustrate below the node, still have branch-polymerization right, the node can be replaced The form of its all child node connection;
B () node type is or:Illustrate the branch-polymerization to type be or, it is any that the node can replace with which respectively Child node;
C () node type is and;Illustrate the branch-polymerization to type be and, the node can be replaced its all son The parallel fo of node.
In the present embodiment, the construction process of I/O_WF_Net model decompositions tree is as follows:
Step S11:Using the Petri net model as a node, and according to branch-polymerization to by the node allocation being Multiple fragments, wherein, a child node of each fragment as the node;
Step S12:By type in each child node be branch-polymerization to child node process, with by type as divide - polymerization to child node in each bar flow process as the child node child node;
Step S13:Using branch-polymerization to each child node as Petri network submodel, and to each Petri network Model carries out Recursion process according to step S11.
In the present embodiment, the construction process of model decomposition tree can pass through following Implementation of pseudocode:
In the present embodiment, the model decomposition tree is traveled through, generates the test sequence corresponding with the model decomposition tree Row set is specifically included:
Step S21:Present node node is expressed as into the type of attachment of its all child node node.son;
Step S22:If the type of node.son is or, and node.son also has n child node node.son.son, Then all cycle testss comprising node.son are replicated n time, and the node.son in each sequence after replicating is replaced with node.son.son;
Step S23:If the type of node.son is and, all cycle testss comprising node.son are substituted for The parallel fo of all node.son.son;
Step S24:Recursive traversal is carried out to node.son.son, with the child node to node.son.son according to step S21 to S23 is processed.
The false code of corresponding cycle testss generating algorithm can be as follows:
After generating cycle testss, you can produce final test according to the input/output information included in every cycle testss Use-case, the false code of its generating algorithm can be with as follows:
The application also provides a kind of Test cases technology device of Workflow-oriented system, refers to Fig. 4, described device bag Include:
Pessimistic concurrency control sets up unit 100, for based on the Workflow system constrained with input and output, setting up Petri net model; Wherein, the Workflow system includes the active set of workflow, the set of input element, the set of output element, work Mapping of the set of relationship, the mapping of activity to input element and activity in stream to output element;In the Petri net model The active set in set, workflow, mapping set and initial pessimistic concurrency control including input class place and output class place;
Model decomposition tree construction unit 200, for right according to branch-polymerization, the Petri net model is divided into multiple Fragment;If it is right to there is branch-polymerization in the fragment for dividing, continuation is divided to the fragment, to obtain the Petri net model Corresponding model decomposition tree;
Cycle testss set signal generating unit 300, for traveling through the model decomposition tree, generates and the model decomposition tree phase Corresponding cycle testss set;
Test cases technology unit 400, for the input included according to every cycle testss in the cycle testss set Output information, generates test case.
In one embodiment of the application, the pessimistic concurrency control is set up unit 100 and is specifically included:
Fragment splits module, for using the Petri net model as a node, and according to branch-polymerization to should Node allocation is multiple fragments, wherein, a child node of each fragment as the node;
Node processing module, for by type in each child node be branch-polymerization to child node process, general Type be branch-polymerization to child node in each bar flow process as the child node child node;
Recursion process module, for using branch-polymerization to each child node as Petri network submodel, and to each Petri network submodel carries out Recursion process according to the execution step that the fragment splits module.
In one embodiment of the application, the cycle testss set signal generating unit 300 is specifically included:
Type of attachment representation module, for present node node to be expressed as the connection shape of its all child node node.son Formula;
First kind judge module, if the type for node.son is or, and node.son also has n child node Node.son.son, then replicate all cycle testss comprising node.son n time, and by each sequence after replicating Node.son replaces with node.son.son;
Second Type judge module, if the type for node.son is and, by all surveys comprising node.son Examination sequence is substituted for the parallel fo of all node.son.son;
Recursive traversal module, for carrying out recursive traversal to node.son.son, with the child node to node.son.son At execution step according to the type of attachment representation module, first kind judge module and Second Type judge module Reason.
In one embodiment of the application, the Test cases technology unit 400 is specifically included:
Type judging module, for when the node in the model decomposition tree has child node, judging the class of the node Type;
First processing module, for when the type of the node is sequence, the node being replaced with the institute of the node The form for having child node to connect;
Second processing module, for when the type of the node is or, the node being replaced with the child node of the node Arbitrary child node;
3rd processing module, for when the type of the node is and, the node being replaced with all sub- section of the node The parallel fo of point.
It should be noted that the specific implementation of above-mentioned each functional module is consistent with the description in step S1 to S4, Here just repeat no more.
Therefore, problem of the application for the method for testing deficiency of Workflow system, by the work in Workflow system The input and output of each activity are modeled as the place of Petri network, to Workflow system by the dynamic migration being modeled as in Petri network Several basic structures are analyzed, and proposition is a kind of will to turn to the algorithm and model of Petri net model with input and output flow of work Method for simplifying, so as to solve in prior art, measuring technology specific aim is strong, Workflow system testing adequacy is low asks Topic, and improve the testing efficiency of system.
Description to the various embodiments of the application above is supplied to those skilled in the art with the purpose for describing.Which is not Be intended to exhaustion or be not intended to limit the invention to single disclosed embodiment.As described above, the application's is various Substitute and change is will be apparent for above-mentioned technology one of ordinary skill in the art.Therefore, although specifically beg for The embodiment of some alternatives is discussed, but other embodiment will be apparent, or those skilled in the art are relative Easily draw.The application is intended to be included in all replacements, modification and the change of this present invention for having discussed, and falls Other embodiment in the spirit and scope of above-mentioned application.
Each embodiment in this specification is described by the way of progressive, identical similar between each embodiment Part mutually referring to what each embodiment was stressed is the difference with other embodiment.
Although depicting the application by embodiment, it will be appreciated by the skilled addressee that the application has many deformations With change without deviating from spirit herein, it is desirable to which appended claim includes these deformations and changes without deviating from the application Spirit.

Claims (9)

1. a kind of method for generating test case of Workflow-oriented system, it is characterised in that methods described includes:
Based on the Workflow system constrained with input and output, Petri net model is set up;Wherein, the Workflow system includes The active set of workflow, the set of input element, the output set of element, the set of relationship in workflow, activity are to input Mapping of the mapping and activity of element to output element;The Petri net model includes being input into class place and output class libraries Set, the active set in workflow, mapping set and initial pessimistic concurrency control;
It is right according to branch-polymerization, the Petri net model is divided into into multiple fragments;If there is branch-poly- in the fragment for dividing It is right to close, and continuation is divided to the fragment, to obtain the corresponding model decomposition tree of the Petri net model;
The model decomposition tree is traveled through, the cycle testss set corresponding with the model decomposition tree is generated;
According to the input/output information that every cycle testss in the cycle testss set are included, test case is generated.
2. method according to claim 1, it is characterised in that the corresponding model decomposition tree of the Petri net model according to Following manner builds:
Step S11:Using the Petri net model as a node, and according to branch-polymerization to being multiple by the node allocation Fragment, wherein, a child node of each fragment as the node;
Step S12:By type in each child node be branch-polymerization to child node process, with by type as branch-gather Close to child node in each bar flow process as the child node child node;
Step S13:Using branch-polymerization to each child node as Petri network submodel, and to each Petri network submodel Recursion process is carried out according to step S11.
3. method according to claim 1, it is characterised in that the traversal model decomposition tree, generates and the model divides Xie Shu corresponding cycle testss set is specifically included:
Step S21:Present node node is expressed as into the type of attachment of its all child node node.son;
Step S22:If the type of node.son is or, and node.son also has n child node node.son.son, then will All cycle testss comprising node.son are replicated n time, and the node.son in each sequence after replicating is replaced with node.son.son;
Step S23:If the type of node.son is and, all cycle testss comprising node.son are substituted for all The parallel fo of node.son.son;
Step S24:Recursive traversal is carried out to node.son.son, with the child node to node.son.son according to step S21 extremely S23 process.
4. method according to claim 1, it is characterised in that in the model decomposition tree, the type of branch node with it is poly- The type for closing node is consistent.
5. method according to claim 1, it is characterised in that specifically include in the step of generating test case:
When the node in the model decomposition tree has child node, the type of the node is judged;
The node, when the type of the node is sequence, is replaced with the form of all child node connections of the node;
When the type of the node is or, the node is replaced with the arbitrary child node in the child node of the node;
When the type of the node is and, the node is replaced with the parallel fo of all child nodes of the node.
6. a kind of Test cases technology device of Workflow-oriented system, it is characterised in that described device includes:
Pessimistic concurrency control sets up unit, for based on the Workflow system constrained with input and output, setting up Petri net model;Wherein, institute Stating Workflow system includes the active set of workflow, the set of input element, the output set of element, the pass in workflow Assembly is closed, the mapping of movable mapping and activity to input element to output element;The Petri net model includes input Active set, mapping set and initial pessimistic concurrency control in the set of class place and output class place, workflow;
The Petri net model, for right according to branch-polymerization, is divided into multiple fragments by model decomposition tree construction unit;If There is branch-polymerization in the fragment of division right, continuation is divided to the fragment, corresponding to obtain the Petri net model Model decomposition tree;
Cycle testss set signal generating unit, for traveling through the model decomposition tree, generates corresponding with the model decomposition tree Cycle testss set;
Test cases technology unit, for the input and output letter included according to every cycle testss in the cycle testss set Breath, generates test case.
7. device according to claim 6, it is characterised in that the pessimistic concurrency control is set up unit and specifically included:
Fragment splits module, for using the Petri net model as a node, and according to branch-polymerization to by the node Multiple fragments are divided into, wherein, a child node of each fragment as the node;
Node processing module, for by type in each child node be branch-polymerization to child node process, by type For branch-polymerization to child node in each bar flow process as the child node child node;
Recursion process module, for using branch-polymerization to each child node as Petri network submodel, and to each Petri Net model carries out Recursion process according to the execution step that the fragment splits module.
8. device according to claim 6, it is characterised in that the cycle testss set signal generating unit is specifically included:
Type of attachment representation module, for present node node to be expressed as the type of attachment of its all child node node.son;
First kind judge module, if the type for node.son is or, and node.son also has n child node Node.son.son, then replicate all cycle testss comprising node.son n time, and by each sequence after replicating Node.son replaces with node.son.son;
Second Type judge module, if the type for node.son is and, by all test sequences comprising node.son Row are substituted for the parallel fo of all node.son.son;
Recursive traversal module, for carrying out recursive traversal to node.son.son, with the child node to node.son.son according to The execution step of the type of attachment representation module, first kind judge module and Second Type judge module is processed.
9. device according to claim 6, it is characterised in that the Test cases technology unit is specifically included:
Type judging module, for when the node in the model decomposition tree has child node, judging the type of the node;
First processing module, for when the type of the node is sequence, the node being replaced with all sons of the node The form of node connection;
Second processing module, for when the type of the node is or, the node being replaced with appointing in the child node of the node One child node;
3rd processing module, for when the type of the node is and, the node to be replaced with all child nodes of the node Parallel fo.
CN201610957561.XA 2016-10-28 2016-10-28 A kind of method for generating test case and device of Workflow-oriented system Active CN106547696B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610957561.XA CN106547696B (en) 2016-10-28 2016-10-28 A kind of method for generating test case and device of Workflow-oriented system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610957561.XA CN106547696B (en) 2016-10-28 2016-10-28 A kind of method for generating test case and device of Workflow-oriented system

Publications (2)

Publication Number Publication Date
CN106547696A true CN106547696A (en) 2017-03-29
CN106547696B CN106547696B (en) 2019-05-28

Family

ID=58393394

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610957561.XA Active CN106547696B (en) 2016-10-28 2016-10-28 A kind of method for generating test case and device of Workflow-oriented system

Country Status (1)

Country Link
CN (1) CN106547696B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109032931A (en) * 2018-07-06 2018-12-18 中国人民解放军陆军工程大学 With time, resource, the Workflow system modeling method of input and output constraint

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050256818A1 (en) * 2004-04-30 2005-11-17 Xerox Corporation Workflow auto generation from user constraints and hierarchical dependence graphs for workflows
CN101833499A (en) * 2010-04-07 2010-09-15 南京航空航天大学 Software testing validating method based on reachability tree
CN101853201A (en) * 2010-05-24 2010-10-06 南京航空航天大学 Software parallel test method and tool based on coloring petri net
CN102176200A (en) * 2009-09-25 2011-09-07 南京航空航天大学 Software test case automatic generating method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050256818A1 (en) * 2004-04-30 2005-11-17 Xerox Corporation Workflow auto generation from user constraints and hierarchical dependence graphs for workflows
CN102176200A (en) * 2009-09-25 2011-09-07 南京航空航天大学 Software test case automatic generating method
CN101833499A (en) * 2010-04-07 2010-09-15 南京航空航天大学 Software testing validating method based on reachability tree
CN101853201A (en) * 2010-05-24 2010-10-06 南京航空航天大学 Software parallel test method and tool based on coloring petri net

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
丁森科: ""基于Petri Net软件测试系统的研究"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
郑长友 等: ""基于Petri网的面向测试的工作流系统建模方法"", 《电子科技大学学报》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109032931A (en) * 2018-07-06 2018-12-18 中国人民解放军陆军工程大学 With time, resource, the Workflow system modeling method of input and output constraint

Also Published As

Publication number Publication date
CN106547696B (en) 2019-05-28

Similar Documents

Publication Publication Date Title
JP3858000B2 (en) Verification method of combinational circuit using filtering type approach
US10606570B2 (en) Representing software with an abstract code graph
CN106649103B (en) A kind of method and system of Android application program Automated Black Box Testing
CN107783758B (en) A kind of intelligence contract engineering method
CN104050087B (en) A kind of software architecture correctness verification method based on uml model
WO2021115186A1 (en) Ann-based program test method and test system, and application
CN109146081A (en) It is a kind of for quickly creating the method and device of model item in machine learning platform
CN101853201A (en) Software parallel test method and tool based on coloring petri net
Hänsel et al. An evolutionary algorithm for the generation of timed test traces for embedded real-time systems
CN104360947B (en) Multi-process deadlock detection method based on petri network
CN108363660B (en) Test program generation method and device
CN109189941A (en) For updating the method, apparatus, equipment and medium of model parameter
CN113868120A (en) Industrial software debugging method and device, computer equipment and storage medium
Sanchez et al. Bigraphical modelling of architectural patterns
CN109710240A (en) Flow chart decomposition method and system
CN103744776B (en) A kind of Static Analysis Method based on symbolization function summary and system
Bertolino et al. An approach to integration testing based on architectural descriptions
CN110377492B (en) Unit test case generation method based on method similarity
CN110244688A (en) Meter bus panel automatic generation method and its system based on LabVIEW
CN106547696A (en) A kind of method for generating test case and device of Workflow-oriented system
CN111176995B (en) Test method and test system based on big data test case
US8849626B1 (en) Semantic translation of stateflow diagrams into input/output extended finite automata and automated test generation for simulink/stateflow diagrams
CN1319150C (en) Observable register transmission stage covering analyzing and excitation producing method
CN102591779B (en) Establishing method for workflow-based universal software testing process model
CN110286882A (en) A kind of foreground system design and verification method based on model inspection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant