Professional Documents
Culture Documents
M.Dhineshkumar, PG Scholar,Professor.Mr.Galeebathullah
dhineshmsc2011@gmail.com, kalifathullah@gmail.com
Abstract
Testing is an important area of software engineering. There are II.RELATED WORK
various types of testing methodologies followed in various stages of There are many of researchers proposed many
Software Development Life Cycle (SDLC). We are proposed a novel methodologies for scenario level test case generation. Most
approach for generating test cases from UML sequence diagram. Our probably they used black box approaches and they do not
approach consists of transforming sequence diagram in to sequence
diagram graph and generating test cases from SDG. The sequence
considered architectural behavioural designs. In the software
diagram is prepared based on the Use Case diagram in which development life cycle from requirement specification to
describes the overall view of the system. The traceability between the actual product, the verification and validation takes place.
models is provided by using Relational Definition Language. Probably the products were verified and validated based upon
Keywords: Model Based Testing, Sequence diagram, SDG, test case their requirement specifications. More recently model based
Generation,OCL. testing become as popular. Marketing proposes various
methodologies in model based testing. Model paradigm
I. INTRODUCTION contains state based notations, transition based notations,
Testing performs an important role in software history based notations, functional notations, operational
engineering, which only ensures the quality of software being notations and criteria for test selection, in which includes data
produced. Most of the testing methodologies involves in the coverage, requirement based coverage, fault based criteria and
Black box approach, while compared to design level testing. about the different types of tools used in model based
Before testing, the development life cycle reduces the testing[1].
difficulties on implementation level. Combination of State machine diagrams and Class diagrams
In model based testing, the test cases are generated [2] used to generate automatic test cases using OCL
from the abstract representation of the model. The Abstract expressions. This algorithm is used with ParTeG. Static
test suites are not executed against system under test because analysis tools such as OCLE [Chiorean] and USE [Richter’s]
it is needed to be described from the corresponding abstract [3] can be used to analyze structural properties of Class
test suite. The effect of model based testing is it offers Models. This approach removes manually simulating the
automation of testing. If a model is readable one then it should behaviour of Class Models. Instead of that it provides a light
have a well defined behavioural interpretation. During testing weight approach to check scenarios.
the model and its behavioural specification is given to model AGEDIS [4] includes an integrated environment for
checker. After the verification the paths were used for modelling test generation, test execution and other related
generating test cases. Here a little knowledge of the coding is activities for industries. This is widely accepted tool by
needed for the tester instead of brief knowledge about coding industries, but it has some drawbacks. Briand and Labiche [5]
in testing. They must to understand the UML models which is describe the TOTEM (Testing Object Oriented Systems with
used for System under Test. the Unified Modelling language) system testing methodology.
Model based testing provides the conformance with System test requirements are derived from early UML
the UML diagrams. In the case of design level there are analysis artefacts such as, use case diagrams and sequence
various diagrammatic representations used to represent the diagrams associated with each use case and class diagram.
operations with operational requirements. Here we are using For testing different aspects of object interaction,
the Use case diagrams to get the requirements involved in the several researchers have proposed different technique based
system and tracing the important scenarios to sequence on UML interaction diagrams [6,7,8,9,10] , Bertolino and
diagram and converting in to sequence diagram graph. By Basanieri proposed a method to generate test faces using the
using the sequence diagram graph test cases are generated. UML use case and Interaction diagrams(specifically, the
346
TABLE I
TEST CASE GENERATION FROM SDG
347
1) ALGORITHM USED FOR TEST CASE GENERATION Where E- is the number of edges.
The order of visiting nodes without repetition is calculated as
1. Procedure idvisit (G, S, Goal) Where b- branching factor and d-depth.
2. Inputs o(| b d |)
3. G: Graph with nodes N and paths A Traversing the entire graph without repetition (visiting the
4. S: Set of start nodes longest length paths) calculated as
5. Goal:Boolean functions on states
6. Output o(| v |)
7. Paths from S to a node for which is true Where v-number of vertices
Test case condition This formula includes without eliminating the visiting of
8. Local duplicate nodes.
9. Natural failure Boolean
10. Bound: integer D. TEST CASE GENERATION FROM SDG
11. Procedure dbsearch (n0 ...nk, b) The sequence diagram depicts the behaviour of
12. Inputs various sequences of the System under Test (SUT). Among all
13. n0,.....,nk,..Paths: other UML diagrams the sequence diagram only depicts the
14. b: integer, b>=0 behaviour among the sequences in a timely manner. The
15. Output immediate request and responses of system are modelled by
16. Path to goal of length k+6 sequences for test case generation. From the sequence
17. if (b>0) then diagram graph when an object invokes another object the
18. For each path nk, n A do system predicts whether the right sequence of messaging is
19. dbsearch(n0,...,nk, n b-1) followed to accomplish an operation. The SDG eventually
20. elseif (goal(nk)) then covers all the paths from the starting node to final nodes well
21. return no,......nk as message sequence paths. We are going to use the iterative
22. else if (nk has any neighbours) deepening depth first search algorithm in the sequence
23. natural failureÅ false then diagram graph to generate test cases. The complete path
24. boundÅ 0 coverage, Branch coverage can be predicted through this
25. repeat algorithm. The interaction which takes long time between the
26. natural_failureÅ true paths is found by this algorithm.
27. dbsearch ({S:s S } bound)
28. boundÅbound +1 IV. CONCLUSION
29. until natural_ failure
30. return We are proposed a novel approach to generate test
cases from sequence diagram by generating sequence diagram
The test case generation is starts from the initial node s which graph. The input of pre-condition and post-condition retrieved
is a subset of S. the nodes in the graph are starts from n0 ends from Usecase diagram and OCL expressions. These things
with nk,which is called as last node. During visiting of paths were stored in SDG. The iterative deepening depth first search
the nodes has more paths to visit the bound is increased as algorithm can handle the sequence of interactions among the
boundÅbound+1. When the condition is not satisfied, then sequences, in which takes long time.
the node will be terminated from traversing. This algorithm is
called as iterative deepening depth first search algorithm, in REFERENCES
which combines the features of basic depth first search and [1] Mark Utting, Alexander Pretschner and Bruno Legeard,
breadth first search algorithms to make effective test case “Taxonomy of Model Based Testing Approaches”.Software
generation. This algorithm takes less time to visit the nodes Testing, Verification and Reliability, John Wiley&sons, Ltd.,
when compared to other algorithms. A largest tree comprised 2010.
[2] Stephan WeiBleder Bernd-HolgerSchlingloff, “Deriving Input
of several nodes and paths, it can be handled by iterative Partitions from UML Models for Automatic Test Generation”,
deepening depth first search algorithm effectively.The 2008.
existing basic depth first search algorithm requires medium [3] Lijun Yu, Robert B.france, Indrakshi Ray, “Scenario-based static
sized graphs to traverse. This algorithm will not handle large analysis of UML class models”, LNCS 5301, PP.234-248, 2008,
Springer-VerlagBerlin Heidelberg, 2008.
sized graphs and it takes more time to traverse on the space. [4] A.hartman and K.Nagin, “The AGEDIS Tools for Model Based
Testing”, IBM Haifa Research Laboratory, ISSTA’04, July 11-14,
2) CALCULATIONS IN GENERATING TEST CASE FROM ACM 1-58113-820-2/04/0007, 2004.
SEQUENCE DEPENDENCY GRAPH (SDG) [5] L.C Briand and Y.Labiche, “A UML – Based Approach to System
Testing”. In Proceeding of the 4th International Concepts, and
Tools, Springer-Verlag, London, pp 194-208, October 01-05,
After generating test cases from the SDG, the 2002.
traversing of nodes and paths calculated by the following [6] A.Abdurazik, and J.Offutt, “Using UML Collaboration diagrams
formulas. for static checking and test generation”, Proceedings of the Third
International Conferences on the UML, Lecture Notes in
The worst case performance for explicit graphs traversed Computer Science, Springer-Verlag GmbH, York, UK,
without repetition is calculated as vol.939,2008,pp.383-395.
o(| E |)
348
[7] M.LettrariM.andJ.Klose and A Ruder, “Scenario-Based Computer Science Volume 1723,Springer-Verlag Berlin
Monitoring and Testing of Real Time UML Models”, In the Heidelberg. 1999.
Proceedings of UML-2001, Springer-Verlag, pp.312-328. [14] A.Bertolino and E.marchetti, H.Muccini,” Introducing a
[8] F.Basanieri, A.Bertolino, and E.Marchetti, “The Cow Suite Reasonably Complete and Coherent Approach for model-based
approach to planning and deriving test suites in UML projects”, In Testing”, Electronic notes in Theoretical computer science,
Proceedings of the 5th international Conference on the UML, ELSEVIER, 2005.
LNCS,2460,2002,pp.383-397. [15] MiikaSikarla, JariPeltonen and Petri Selonen,”Combining OCL
[9] P.Tonella, and Potrich, “A Reverse Engineering of the Interaction and Programming Languages for Model Processing”, Electronic
Diagrams from C++ code”, In the Proceedings of IEEE Notes in Theoretical Computer Science 102 (2004)175-
International conference on Software Maintenance (2003) 159- 194.ELSEVIER.
168. [16] VikasPanthi , Durga Prasad Mohapatra ,”Automatic Test Case
[10] F.Fraikin, and T.Leonhardt, “SIDITEC-testing based on sequence Generation Using Sequence Diagram”, International Journal of
diagrams, in Proceedings 17th IEEE International conference on Applied Information Systems(IJAIS)-ISSN:2249-0868,Foundation
ASE”, 2002, pp.261-266. of Computer Science FCS,New York,USA,Volume2-
[11] Santhosh Kumar Swain, Durga Prasad Mohapatra and Rajib Mall, No.4,May2012.
“Test Case Generation Based on Use Case and Sequence [17] Mathew George, Klaus-Peter Fischer-Hellmann,
Diagram”, International journal of Software Engineering, IJSE, MartinKnahl,UdoBleimann and Shirely Atkinson ,” Traceability in
July2010. Model Based Testing”, Future Internet-2012,4,1026-
[12] Clementine Nebut, Franck Fleurey, Yves Le Traon, member IEEE 1036;doi:10.3390/fi4041026.
and Jean-marc Jezequel Member, IEEE, “Automatic Test
Generation: A use Case Driven Approach”, IEEE Transactions on
Software Engineering, Vol.32, 17th march 2006.
[13] Jeff Offutt and AynurAbdurazik, George Mason University, USA,
“Generating Tests from UML Specifications”, Lecturer Notes in
349