CN101702136A - Web application model and test method based on UML use case diagram and sequence diagram - Google Patents

Web application model and test method based on UML use case diagram and sequence diagram Download PDF

Info

Publication number
CN101702136A
CN101702136A CN200910198886A CN200910198886A CN101702136A CN 101702136 A CN101702136 A CN 101702136A CN 200910198886 A CN200910198886 A CN 200910198886A CN 200910198886 A CN200910198886 A CN 200910198886A CN 101702136 A CN101702136 A CN 101702136A
Authority
CN
China
Prior art keywords
condition
rdg
test
web application
use case
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN200910198886A
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.)
Shanghai Polytechnic University
Original Assignee
Shanghai Polytechnic University
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 Shanghai Polytechnic University filed Critical Shanghai Polytechnic University
Priority to CN200910198886A priority Critical patent/CN101702136A/en
Publication of CN101702136A publication Critical patent/CN101702136A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention relates to a Web application model and a test method based on a UML use case diagram and a sequence diagram, which is used for establishing the Web application test model based on use case and automatically generating test scenes therefrom. The test method comprises the following steps: firstly, using a layered UML extension use case diagram is used as a Web application model from the viewpoint of an external user, wherein the model is called a use case transition model (Use Case Transition Model, UCTM); secondly, describing each use case from top to bottom by a formalized sequence diagram, and automatically transforming the sequence diagram to a restricted directed graph (RDG); thirdly, providing a constraint message coverage criterion ( CMC), and generating test cases from the RDG, wherein the test cases can meet the CMC, and the number of the test cases is reduced; and fourthly, merging the RDG from bottom to top, and traversing the RDG. The test scenes on different levels of Web application can be generated, and the provided constraint message coverage criterion (CMC) can be met.

Description

Based on Web Application Modeling and the method for testing of UML with condition figure and precedence diagram
Technical field
The present invention relates to internet arena, particularly based on Web Application Modeling and method of testing with condition and corresponding precedence diagram.
Background technology
It is interactive application a kind of very complexity, distributed, sandwich construction that Web uses (WA).The isomerism of WA and dynamic make the behavior of WA and structural modeling very difficult.Contact between the WA page is by link and member realization, and many Web pages comprise a plurality of HTML lists, the daemon software member that each list dynamic link is different, and realize with different programming languages.Many characteristics of WA make traditional method for testing software can't directly apply to the test of WA, and make that the Web test is more complicated than the test of regular software, need the problem of consideration more, thereby have proposed new challenge for the software test field.
The patent documentation relevant with above-mentioned technical characterictic has:
[1] Nebut C, Fleurey F, Traon Y.L., et al.Automatic Test Generation:A Use Case DrivenApproach (test generates automatically: use the condition method of driving for one) .IEEE Transactions on Software Engineeering, Vol 32, No.3,2006, pp.140-155.
[2] L.Briand, Y.Labiche.A UML-Based Approach to System Testing (a method) .Software and Systems Modeling, 2002-Springer, pp.10-42. based on the UML system testing
[3] Anneliese A.Andrews, Jeff Offutt, Roger T.Alexander.Testing Web applications by modelingwith FSMs (Web uses by FSM modeling test) .Software and System Modeling, 2005, pp.326-345.
[4] Ye Wu, Mei-Hwa Chen, and Jeff Offutt.UML-based Integration Testing for Component-basedSoftware (based on the integration testing of UML) .Lecture notes in computer science to component software, 2003, pp.3-12.
[5] Heumann J.Generating Test Cases from Use Cases (from generating test case) .Rational Software with condition, IBM, 2001.
One or several aspect that Web uses is just considered in the research of the automatic generation of the test case of existing Web application respectively, and method also just relates to certain method.For based on still more preliminary with the research of the Web Application Modeling of condition and corresponding precedence diagram and system level testing use-case generation method, the domestic report of also not seeing comparison system research.
Summary of the invention
The objective of the invention is to, use (WA) at Web and proposed a kind of based on system class testing method with condition (use cases) and its corresponding precedence diagram.The present invention mainly pays close attention to the functional test of WA.
In order to achieve the above object, the present invention adopts following technical scheme:
1, from the viewpoint of WA external user, according to logic function the Web application is divided into a series of members, a member is equivalent to a sub-web application.Each member of top layer is represented the performed complete function of this participant.By function each member is refined again and be several mutual members.The corresponding practical Web page of the member that bottom need not divide again or Web member, the own single main function of their representatives.The present invention will connect with condition and member, be WA modeling with the expansion of layering with condition figure based on the notion of member, claim this model for condition migration models (Use Case Transition Model is called for short UCTM).In UCTM, a member is used condition corresponding to one.According to the sequential dependence between the condition, for each participant extracts the possible condition sequence of using.If in condition figure, there is circulation,, when test, set only circulation execution 0 time or 1 time with having produced the unlimited condition sequence of use.
2, the layering UCTM of Ti Chuing has shown with the structural relation between the condition.The present invention uses precedence diagram to express the dynamic behaviour of using condition.To virtual end points condition, do not need to provide their dynamic realization.The logic realization that precedence diagram comes modeling with a kind of visual way, the test target that must reach in the time of being used to naturally define test.
3, in precedence diagram, scene is defined as the message sequence between the co-operating object.For more directly perceived and extract scene easily, the present invention with precedence diagram be automatically converted to a kind of limited digraph (RestrictedDirected Graph, RDG).The message in the scape of home court is represented on the summit among the RDG.Arc between the summit is represented the conversion of message.Especially, limited arc is represented message in the unusual scene between the summit.
4, after each RDG with condition has generated, can they be synthesized the RDGs of a series of systems according to the usefulness condition sequence among the layering UCTM.The present invention uses bottom-up method to synthesize the RDGs that uses condition.
5, generate test scene, a paths is exactly a test scene among the RDG.The corresponding home court of main path scape, the corresponding unusual scene of individual path.
Description of drawings
Further specify the present invention below in conjunction with accompanying drawing and case study on implementation.
The top layer of Fig. 1 WA condition figure;
Fig. 2 top layer with among the condition figure with following one deck condition figure of condition 1;
Fig. 3 precedence diagram of condition 1.2;
Limited digraph (RDG) after Fig. 4 changes with the precedence diagram of condition 1.2;
Fig. 5 is with the limited digraph (RDG) of condition 1.1;
Fig. 6 merges the RDG that forms by the RDG of accompanying drawing 4 and accompanying drawing 5.
Embodiment
Below by a case study on implementation, further specify the present invention.
1, makes up the test model that Web uses
Modeling is as follows with the method for condition migration models UCTM:
I) be several members by participant (Actor) with the Web system divides from user perspective, each member is finished the whole logic function of this Actor, describes with condition figure with top layer.Be equivalent to system divides is several big subsystems.Because Actor is the participant of system outside, we are that function by Actor is some members with system divides when modeling, and member represents this participant's whole logic function, so our taking into account system itself during modeling draws and Actor omitted; It is considered herein that a Web system is a black box, only pay close attention to the mutual of function between the member.Expanded Stereotype for " communicate ", i.e. the interactive relation of " communication ", represent function between the member alternately, comprise various annexations between the Web page among the WA and the software component, we claim that it is navigation between the member.Accompanying drawing 1 is the top layer condition figure that certain Web uses.In order to simplify the generation of test case, based on the semanteme of controlling stream with condition figure, if we each have and have only an origin endpoint to stop the end points condition with condition figure with condition and one, the end points condition be system is brought into operation and stop moving use condition.If there is not such one to use condition in the function of system, can introduce a virtual end points condition so, with condition and virtual end points with between the condition related we dot.As the usefulness condition 4 in the accompanying drawing 1.
II) each member with top layer is divided into several mutual members by subfunction, and with describing with condition figure of low one deck, each member is finished some logic functions, corresponding to using condition among the condition figure accordingly.Accompanying drawing 2 is the following one deck condition figure with condition 1.
III) step circulation II), up to the member of the bottom corresponding to the physical feature of finishing some function or the Web page.
2, set up the dynamic behaviour of test model
The present invention uses precedence diagram to express the dynamic behaviour of using condition.To virtual end points condition, do not need to provide their dynamic realization.Precedence diagram comes the logic realization of modeling with a kind of visual way.Precedence diagram can be caught the important information of object interaction, the test target that must reach in the time of being used to naturally define test.Accompanying drawing 3 is the precedence diagrams with condition 1.2.In order to generate test case automatically, this paper is as follows with the precedence diagram formalization:
Define 1. 1 precedence diagrams and be four-tuple a: FSD=(Ob, M, Ord, φ), wherein
● Ob is a series of limited object sets in the precedence diagram.
● M is that a series of limited forms are g * msgName * parameters message set, and wherein g is the condition of guarding of message.In precedence diagram, the representation of message is: [g] msgName ([parameters]), " [] " representative is optional.
● Ord is the sequence number of message.We use 1,2 ..., n} represents that the condition of the guarding g of message is that true time or message are ordinary message sequence number when guarding condition (promptly not guarding condition).{ 1.A, 2.A...n.A} represent that the condition of the guarding g when message is the message sequence number of fictitious time.
● φ is the conversion of message, corresponding to the sequential relationship on the vertical time axle in the precedence diagram.
3, precedence diagram is automatically converted to RDG.
In precedence diagram, scene is defined as the message sequence between the co-operating object.For more directly perceived and extract scene easily, the present invention with precedence diagram be automatically converted to a kind of limited digraph (RestrictedDirected Graph, RDG).The message in the scape of home court is represented on the summit among the RDG.Arc between the summit is represented the conversion of message.Especially, limited arc is represented message in the unusual scene between the summit.Precedence diagram is automatically converted to the method for RDG and sees definition 2.
Definition 2 (RDG). a RDG is five-tuple (V, a v 0, v n, T, λ), wherein
● V is a vertex set, represents a series of limited start-to-end message in the scape of home court, is the message M of true time corresponding to g among the precedence diagram FSD, and V describes with Ord among the FSD;
● v 0ε V representative beginning message; v nε V represents end;
● T represents constraint or abandoned conversion between a series of message, corresponding to the φ among the FSD or when g be M among the fictitious time FSD.
● λ ζ M ξ T ξ M is the message conversion function.
Each RDG must have a v 0With a v n, promptly each RDG must have message to begin and end scene.Utilize definition 2, precedence diagram can be automatically converted to RDG.Accompanying drawing 4 is that the precedence diagram by accompanying drawing 3 converts, and promptly uses the RDG of condition 1.2.Accompanying drawing 5 is the RDG with condition 1.1.2 can draw such conclusion according to definition: the RDG after two or more different order figure conversions is that Ord among identical and if only if its FSD and φ are when identical.
4, synthetic RDG
After each RDG with condition has generated, can they be synthesized the RDGs of a series of systems according to the usefulness condition sequence among the layering UCTM.The present invention uses bottom-up method to synthesize the RDGs that uses condition.Synthetic method is as follows:
1) generate RDG for all among the UCTM of the bottom with condition, except that virtual end points with the condition.
2) each UCTM is synthesized some RDGs according to the sequential dependence with condition with its RDG.When synthetic, follow-up with condition sequence number be its originally sequence number and the forerunner with the total sum (not comprising start and end summit) in condition summit.Correspondingly, the sequence number of the arc of belt restraining " .A " calculates too between the summit.
3) generate RDGs by useful condition among the lower level UCTM.Some may be certain RDG with condition of lower level by the bottom with the synthetic RDG of the RDGs of condition.
4) repeating the 3rd) step is up to the UCTM that arrives top layer.He Cheng RDGs is the RDGs of system at last.
As the RDG of accompanying drawing 6 is that RDG by accompanying drawing 4 and accompanying drawing 5 merges and forms.
5, generate test scene
In fact, a paths is exactly a test scene among the RDG.The corresponding home court of main path scape, the corresponding unusual scene of individual path.For the problem of state of a control space blast, the present invention proposes affined message coverage criterion (Constraint Message Coverage Criterion, CMC).
Definition 3 (CMC). a series of precedence diagrams of a given test set T and system, T must guarantee that each message must cover once at least in the precedence diagram, just, every arc must cover once at least among the limited digraph RDG, and the arc of belt restraining " .A " only need cover once.
Travel through final RDG, can obtain the test scene of WA, satisfy the affined message coverage criterion CMC that proposes.
The above; be a kind of of the embodiment of the invention; but be not to be used for limiting practical range of the present invention, promptly every according to patent of the present invention---the equalization that the described feature of claims, structure, spirit are done changes and modification, all belongs to protection scope of the present invention.

Claims (5)

1. one kind based on Web Application Modeling and the method for testing of UML with condition figure and precedence diagram, it is characterized in that, may further comprise the steps:
1) sets up the test model of using based on Web with condition; From the viewpoint of Web application external user, according to logic function the Web application is divided into a series of members, a member is equivalent to a sub-web application; Characteristics according to condition and member connect both, are Web Application Modeling with the expansion of layering with condition figure based on the notion of member, and a member is used condition corresponding to one; On behalf of Web, each member of top layer use the performed complete function of each participant; Each member of top layer is divided into several mutual members by subfunction, with describing of low one deck with condition figure; Each member with last layer is divided into several mutual members by subfunction again, up to the member of the bottom corresponding to the physical feature of finishing some function or the Web page;
2) dynamic behaviour of structure test model uses precedence diagram to express the dynamic behaviour of using condition;
3) generation of test case is automatically converted to a kind of limited digraph (RDG) with precedence diagram;
4) synthetic RDG: after each RDG with condition has generated, can they be synthesized the RDGs of a series of systems according to the usefulness condition sequence among the layering UCTM; Use bottom-up method to synthesize the RDGs that uses condition;
5) generate test scene: a paths is exactly a test scene among the RDG, the corresponding home court of main path scape, the corresponding unusual scene of individual path.
2. Application Modeling according to claim 1 and method of testing is characterized in that: described step 1) has been introduced origin endpoint and has been used condition and stop the notion of end points with condition, makes each with condition figure an origin endpoint condition and a termination end points condition only be arranged; The end points condition be system is brought into operation and stop moving use condition; If do not have this to use condition in the function of system, can introduce a virtual end points condition so.
3. Application Modeling according to claim 1 and method of testing is characterized in that: described step 2) the precedence diagram logic realization of coming modeling with a kind of visual way, the test target that must reach in the time of being used to naturally define test.
4. Application Modeling according to claim 1 and method of testing is characterized in that: the message in the scape of home court is represented on the summit among the described step 3) RDG; Arc between the summit is represented the conversion of message; Limited arc is represented the message in the unusual scene between the summit.
5. Application Modeling according to claim 1 and method of testing is characterized in that: usefulness condition sequence possible among the described step 4) layering UCTM can be according to obtaining with the sequential dependence between the condition.
CN200910198886A 2009-11-17 2009-11-17 Web application model and test method based on UML use case diagram and sequence diagram Pending CN101702136A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910198886A CN101702136A (en) 2009-11-17 2009-11-17 Web application model and test method based on UML use case diagram and sequence diagram

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910198886A CN101702136A (en) 2009-11-17 2009-11-17 Web application model and test method based on UML use case diagram and sequence diagram

Publications (1)

Publication Number Publication Date
CN101702136A true CN101702136A (en) 2010-05-05

Family

ID=42157052

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910198886A Pending CN101702136A (en) 2009-11-17 2009-11-17 Web application model and test method based on UML use case diagram and sequence diagram

Country Status (1)

Country Link
CN (1) CN101702136A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103092751A (en) * 2012-12-13 2013-05-08 华中科技大学 Web application performance test system based on customer behavior model in cloud environment
CN105808805A (en) * 2014-12-31 2016-07-27 北京航天测控技术有限公司 Testability modeling method based on hybrid diagnostic model
CN106502892A (en) * 2016-10-20 2017-03-15 杭州电子科技大学 A kind of test case prioritization method based on uml model
CN107229486A (en) * 2016-03-24 2017-10-03 阿里巴巴集团控股有限公司 Application scenarios determine method and device
CN107273297A (en) * 2017-06-28 2017-10-20 百度在线网络技术(北京)有限公司 Method and apparatus for generating test case
CN108038060A (en) * 2017-12-28 2018-05-15 上海璞恒新能源科技有限公司 A kind of test method, device, terminal and computer-readable medium
CN109117363A (en) * 2018-06-28 2019-01-01 腾讯科技(深圳)有限公司 A kind of method for generating test case, device and server
CN110781557A (en) * 2019-10-14 2020-02-11 中国航空工业集团公司沈阳飞机设计研究所 Aircraft system model simulation test flow optimization method
CN114911715A (en) * 2022-07-13 2022-08-16 南昌航空大学 Formalized test model modeling method, system, computer and storage medium

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103092751B (en) * 2012-12-13 2015-07-22 华中科技大学 Web application performance test system based on customer behavior model in cloud environment
CN103092751A (en) * 2012-12-13 2013-05-08 华中科技大学 Web application performance test system based on customer behavior model in cloud environment
CN105808805A (en) * 2014-12-31 2016-07-27 北京航天测控技术有限公司 Testability modeling method based on hybrid diagnostic model
CN107229486A (en) * 2016-03-24 2017-10-03 阿里巴巴集团控股有限公司 Application scenarios determine method and device
CN106502892A (en) * 2016-10-20 2017-03-15 杭州电子科技大学 A kind of test case prioritization method based on uml model
CN106502892B (en) * 2016-10-20 2018-11-13 杭州电子科技大学 A kind of test case prioritization method based on uml model
CN107273297B (en) * 2017-06-28 2023-10-13 百度在线网络技术(北京)有限公司 Method and device for generating test cases
CN107273297A (en) * 2017-06-28 2017-10-20 百度在线网络技术(北京)有限公司 Method and apparatus for generating test case
CN108038060A (en) * 2017-12-28 2018-05-15 上海璞恒新能源科技有限公司 A kind of test method, device, terminal and computer-readable medium
CN109117363B (en) * 2018-06-28 2020-09-25 腾讯科技(深圳)有限公司 Test case generation method and device and server
CN109117363A (en) * 2018-06-28 2019-01-01 腾讯科技(深圳)有限公司 A kind of method for generating test case, device and server
CN110781557A (en) * 2019-10-14 2020-02-11 中国航空工业集团公司沈阳飞机设计研究所 Aircraft system model simulation test flow optimization method
CN114911715A (en) * 2022-07-13 2022-08-16 南昌航空大学 Formalized test model modeling method, system, computer and storage medium

Similar Documents

Publication Publication Date Title
CN101702136A (en) Web application model and test method based on UML use case diagram and sequence diagram
Wu et al. Digitalization and decentralization driving transactive energy Internet: Key technologies and infrastructures
Schütte et al. Mosaik: A framework for modular simulation of active components in smart grids
CN104573182B (en) A kind of design method for aircraft Multimode Control System
Magnusson et al. Environmental innovation in auto development-managing technological uncertainty within strict time limits
CN103927779B (en) Method for generating two-dimensional animation on basis of configuration
CN107633125B (en) Simulation system parallelism identification method based on weighted directed graph
CN101980217A (en) Template-based integrated design platform construction method
CN101146281A (en) A GUI creation model for mobile terminal
CN101980218B (en) Template-based integrated design platform
CN115793657A (en) Distribution robot path planning method based on temporal logic control strategy
Draxler et al. A domain specific systems engineering framework for modelling electric vehicle architectures
CN102289205A (en) Modelling method for reconfigurable assembly system on basis of Agent timed colored Petri net
CN103853559B (en) Semantic Web service composite automatic validation method and system
Hende et al. The regulation of microgrids in liberalized electricity markets in the EU and East Asia
CN101216769A (en) Hiberarchy system description language SmartC to C code automatic conversion method
Monti et al. A co-simulation approach for analysing the impact of the communication infrastructure in power system control
Brankovic et al. Towards a System-of-Systems Architecture Definition enabling Cross-Domain Embedded Vehicle Engineering
CN101859249B (en) Method, device and system for realizing automatic flow with manual tasks
CN108919672A (en) A kind of implementation method of complex industrial control system
CN101833506B (en) Authentication method of service interface with long transaction characteristics
CN102929639A (en) Method for converting edged graph grammar (EGG) to reserved graph grammar (RGG)
CN102841933B (en) Method and device for writing raster data and method for reading raster data
CN101739259A (en) Production method and device of service software
Yongqing et al. Visual Construction and Source Code Transformation Model Technology Based on Interface Dynamic Arrangement Technology

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Open date: 20100505