Referensi UML Diagram
Referensi UML Diagram
Vinay Kumar
Department of Computer Science and
Engineering
AMITY University
Greater Noida, India
vkumar@gn.amity.edu
Abstract— Testing is an integral part of life cycle of software use of these feature gives rise to several testing problems as
development/ It aims to create a highly uncompromising well as design and implementation issues. Some of the issues
framework. The program tests are conducted to verify the in testing object-oriented systems are given below[2][16]:
complex actions of the programme in a small range of test cases
chosen from the execution domain. The unified modelling
language (UML), which attracts considerable attention from the 1. An object-oriented system is activated through
researchers and professionals, has emerged as an important message passing. So it should be ensured that all the
standard for modelling software systems. In this paper, we will inter-object and intra-object message dependencies
look at how to simplify test cases using UML diagrams including
are taken into account during the testing process.
actvity, state, and sequence diagram.
2. Inheritance ensures reusability by which several
repeatable tasks in object- oriented programming can
Keywords— Software Testing, UML, Test Case Optimization, be eliminated. But at the same time deep class
Activity Diagram, State Diagram, Sequence Diagrams hierarchy poses special difficulty during the testing
I. INTRODUCTION process. This increases the cost of the testing process.
The testing method identifies the variance between the 3. Polymorphism is another issue. In polymorphism due
anticipated and existent outcomes. When the programme is not to run time binding, the invocation of a method is
working according to standards and objectives, a software unknown until run time. So it becomes difficult for
error is recorded. An error is an unwanted behaviour that is creation of integration test plan.
observed during the system execution. To diagnose an error, 4. Abstract and generic classes provide important means
testing is carried out. A triplet [I,S,O] is usually referred to as for code reuse. But it is difficult to test abstract classes
a test case, where "I" is the data input, "S" is the system's state, due to unavailability of instance of a class. Many
and "O" is the predicted outcome. The set of test cases is times in inheritance, classes used in the root are
known as a test suit and an appropriate test procedure should declared as abstract. In such cases any fault in the
be used for the optimum test suit, i.e. the highest amount of abstract class can percolate down in the inheritance
defects with minimum of test cases should be uncovered. hierarchy and can result in multiple bugs.
Testing process is no more confined to a single phase of 5. Encapsulation results in another hitch in object-
traditional software development. Testing process is now oriented testing. It doesn’t permit exterior functions
iterative and incremental. In the context of object-oriented like debuggers to access the private attributes of a
software development, due to incremental development, each class.
version of the software has to be retested to make it bug free.
At the same time, post delivery maintenance is also a major III. UML MODELS
concern. Issues like infant mortality, modification to the
UML is a basic visual modelling language designed to define,
existing functionality or adding new functionality requires
envisage, construct and document object-based virtual
retesting of the software to ensure the quality[1][17].
systems devices. UML is a standard visual modelling
language. UML has a number of schemes to display specific
features of software devices[15][18]. Followings are the two
II. CONCERNS WITH OBJECT-ORIENTED SYSTEMS categories that include UML diagrams:
The object-oriented model has several benefits such as • Structure Diagrams: They illustrate the static structure
isolation, encapsulation and maintainability to enhance of the system and its representation for diverse
product consistency and minimise the difficulty of the abstraction and implementation levels and association
software development process. But, improper and excessive to each other.
457
978-1-6654-1450-0/21/$31.00 ©2021 IEEE
Authorized licensed use limited to: Tencent. Downloaded on June 30,2021 at 12:58:26 UTC from IEEE Xplore. Restrictions apply.
2021 2nd International Conference on Intelligent Engineering and Management (ICIEM)
• Behaviour Diagrams: These diagrams represent the • Bhattacharjee Gargi, Pati Priya. [3] used UML
complex action of objects in a system, which can be Activity Diagram for prioritization of test cases. They
visualised as a sequence of system shifts over time. defined the most important pathways when evaluating
the software as they are most likely to be carried out.
The structure diagram is again classified into ten different They used a heuristic Meta technique called Tabu
diagrams and behaviour diagram is classified into seven quest to stumble on the path with uppermost priority
different diagrams as shown in figure 1. so that it can be tested foremost. The research efficacy
is improved by identifying the most important path.
Tabu scan can be used for unravelling problems. In
the Tabu search process, a possible solution is
iteratively passed to an improved neighbourhood
solution before a certain stop condition has been met.
Initially the authors created the activity diagram. They
formulated an activity dependency table(ADT) based
on the activity diagram. They created an ADT-based
control flow map. The DFS algorithm was then
applied to perform potential checks.
• Florestal et al.[4] suggested the EasyTest method in
generating UML Activity Diagram Test Cases for the
purpose of amalgamating programme modelling,
code and test phases and reducing implementation
costs and efforts. Even during the modelling stage,
this technique recommends an early identification of
defects to prevent the implantation of uncovered
defects in the coding phase. Authors created an
EasyTest method in order to authenticate the solution
suggested for the JUnit system.
• The Automatic Test Case Generation Method was
suggested by Yupei Yin et al[5], using SysML activity
diagram. The SysML activity diagram as input is used
and amorphous sections may be limited. Then the
input activity diagram was condensed by using the
transformation algorithm. It is a repeating mechanism
that deals with the loop module, the simultaneous
module and the setback of several beginning nodes.
This amorphous action diagram was turned into
intermediate blackbox model (IBM). IBM consists of
Fig. 1. Classification of UML Diagram a simple module and a black-box map for the initial
acts. The basic module only contains black boxes and
Source: www.UML-diagrams.org uncomplicated actions.
• Chang For applications modelled by UML diagrams,
Test case generation from UML specification is more Sunet et al.[6] suggested a transformation-based
advantageous since it allows the test plan to be carried out in methodology for creating scenario-based test cases.
parallel with the development cycle, which results reduced The suggested methodology first transforms a UML
development cost, time and also helps in maintaining software activity diagram definition into a mid-term
quality and reliability. Different UML models provide diverse representation by means of a range of transformation
views of the system, and different types of faults can be rules, from which it generates test scenarios for the
detected using diverse kinds of UML models. As a result, we specified competition coverage parameters. Finally,
examine approaches to optimal test case generation using the solution draws up a series of test cases for the
state, activity, and sequence diagrams in this article. built-in test scenarios.
• By using the theory of extension The automated
system for the development of UML activity diagrams
IV. OPTIMAL TEST CASE GENERATION was introduced by Liping Lia et al. [7]. Extension
A. Using Activity Diagram theory is a modern field for the simulation of formal
processes and transition discord questions. They
An activity diagram is a variety or special case in a state develop an algorithm to create the Euler circuit, and
machine in which states are operations which reflect automatically produce test sequences via the Euler
operational output and transitions result from operations circuit algorithm, for the discovery of further defects
completed. In theory, it can be used to define the method of in the software framework using reduced test case.
running a company The operation diagram shows flows and The authors converted the activity diagram into the
activities within the usage case. Euler circuit since the Euler path is a path that
traverses each edge just once. The transition coverage
458
Authorized licensed use limited to: Tencent. Downloaded on June 30,2021 at 12:58:26 UTC from IEEE Xplore. Restrictions apply.
2021 2nd International Conference on Intelligent Engineering and Management (ICIEM)
of the Euler circuit can be ensured and test cases sequence of messages “M” and a set of objects “O”. Each
streamlined. message m that belongs to M depicts a sequential control flow
from one object (o1) of the system to another object (o2) of
• Swain et al. [8] proposed a framework for combining the system
and prioritising test cases from UML activity and
communication diagrams in order to define test case • D. P. Mohapatra et al.[12] intended to generate robotic
cluster levels. They made an introduction of UML diagram test cases and to compute the software
representative intermediate tree called the system Hit Ratio percentage. Firstly, ArgoUML was
COMMACT tree made of communication and used to construct the software's sequence diagram.
activity diagrams. Then the traversal of a COMMACT This diagram has been given in order to translate the
tree leads to extract test cases taking into account not software to XML text. They subsequently delivered
just the basic predicates but also the prerequisites. The this XML code to the Tcases tool for the blackbox test
strategy established a priority measure for the methodology test case generation.
sequence of approaches and relevant properties under • Swain et al. [13] developed a technique for building
safeguards. Their strategy resulted in unredundant test test cases using UML use case as well as sequence
scenarios and prioritised test coverage. diagram. Their proposed technique is used for system
B. Using State Diagram and integration testing. They have generated Use case
The state machine diagram contains state, state-to-state dependency graph (UDG) using use-case diagram and
transitions, events (triggers of a transition), and activities (the using sequence diagram. They generated concurrent
response to a transition). Diagrams of the state machine control flow graph (CCFG). By using these two
address the system's complex perspective. It demonstrates the graphs they have generated test cases. Their testing
states an entity may have in its lifespan as well as the events strategy was based upon predicate coverage.
that cause the state to shift along with its responses. The nodes • Bahare Hoseini[14] has used genetic algorithms to
represent states and the edges represent the transitions propose a model that automatically creates all primary
between the states. paths and extracts minimum paths for all primary
• Son et. al.[9] utilised state diagram to automatically paths with as little as possible duration. The
produce a test case. They proposed two conceptions experimental outcomes indicate that the paths
first mapping the state diagram onto the cause-effect produced can easily become the best test paths with
graph and second applying the model transformation the fewest possible test paths.
technique. Their suggested method consists of three
steps of model transformation for test case generation
as follows: 1) transforming the state diagram into the V. ANALYSIS
cause-effect diagram, 2) transforming the cause-effect Firstly, we analysed the methods employed with activity
diagram into the decision table, and 3) transforming diagrams to refine and prioritise the test cases. Most of the
the decision table into the test case in this order. The studies transform activity diagrams in some intermediate state
model transformation is required to design into a graph or tree to produce the test case. Various coverage
metamodels of target models, and define rules for criteria for creating and maximising test cases have been used
model transformation. They described the metamodel in various techniques. Literature research reveals that much of
of a state diagram which is not defined in the previous the existing literature has focused heavily on basic diagrams
research, and identified the rule for transforming the for UML activity and some experiments have addressed
state diagram into the cause-effect graph. dynamic situations including the adaptation of concurrency,
• The proposed approach of Preeti Gulia et al.[10] loops, joins and forks.
generates and refines test cases from UML State Chart In the next step, we studied the methods used for test case
through the use of genetic. The formula for crossover improvement using state diagrams. The majority of
from the genetic algorithm was used to generate the approaches exploit the conception of genetic algorithms. Most
newly-catched test series. Mutation review estimated techniques use DFS to decide related predicates. These
the efficacy of the test sequences. conditional predicates are transformed to produce test cases
• P. R. Srivastava et. al.[12] suggested an algorithm automatically. But the UML state model of a real system is
using Ant Colony Optimization (ACO), which offers often extremely multifarious and consists of a large number of
an automated status-transitional test series. The ant states as well as transitions. Possibly for this reason, system
has the information to collect all possible developers seldom build state models of complete systems.
transformations from its current condition in In the study of the test cases, we find that the use of the
accordance with the algorithm suggested. A tool for sequence diagram as an input object for producing the test path
testing the viability of the existing state is cost and time efficient as the test loop starts before the
transformations is used. The feasibility collection of implementation step. The participation of the tester is often
transformation described this strategy. This method limited to a minimum in the complexity of the source code.
reduces the number of repeated transformations in the The control flow map generates the test paths, which are taken
test series and therefore provides maximum coverage. from the sequence diagrams. Among all the coverage criteria
based on graphs, the main path coverage includes diverse
coverage criteria based on graphs that lead to complete the
C. Using Sequence Diagram path coverage. In comparison, instead of passing all existing
Sequence Diagram is used to show the interaction of a given roads, the primary pathway coverage focuses on both nodes
set of objects. A sequence diagram (SD) comprises of a and edges in the control flow map.
459
Authorized licensed use limited to: Tencent. Downloaded on June 30,2021 at 12:58:26 UTC from IEEE Xplore. Restrictions apply.
2021 2nd International Conference on Intelligent Engineering and Management (ICIEM)
VI. CONCLUSION [16] Chhabra, Rishu, Seema Verma, and C. Rama Krishna, "A survey on
driver behavior detection techniques for intelligent transportation
Automating the process of test case creation will lead to systems," 7th International Conference on Cloud Computing, Data
considerable time and effort reduction while at the same time Science & Engineering-Confluence, IEEE, pp. 36-41, 2017.
contributing to improved software stability through enhanced [17] Gupta, Deepali, "The Aspects of Artificial Intelligence in Software
test coverage. Engineering", Journal of Computational and Theoretical
Nanoscience 17.9-10, pp. 4635-4642, 2020.
We discussed different approaches used to perk up the [18] G. Bhardwaj, S. V. Singh and V. Kumar, "An Empirical Study of
production of test cases in this paper. We addressed the work Artificial Intelligence and its Impact on Human Resource Functions,"
on the development of test cases for object-oriented systems 2020 International Conference on Computation, Automation and
Knowledge Management (ICCAKM), Dubai, United Arab Emirates,
with UML diagrams. The numerous testing outcomes related 2020, pp. 47-51, doi: 10.1109/ICCAKM46823.2020.9051544.
to the generation of test cases in several UML diagrams were
also discussed. We investigated the model-based optimization
of test cases with generic techniques such as taboo search,
genetic algorithm, ACO-algorithm, etc.
REFERENCES
[1] Orso, Alessandro, and Gregg Rothermel. "Software testing: a research
travelogue (2000–2014)", Proceedings of the on Future of Software
Engineering. ACM, 2014.
[2] P. Sapna and H. Mohanty, “Test generation from UML sequence
diagrams”, In Proceedings of 8th International Conference on Quality
of Information, and Communications Technology (QUATIC), 2012.
[3] Gargi Bhattacharjee, Priya Pati, “A Novel Approach for Test Path
Generation and Prioritization of UML Activity Diagrams using Tabu
Search Algorithm”, International Journal of Scientific & Engineering
Research, Volume 5, Issue 2, pp1212-1217, 2014
[4] Fernando Augusto Diniz Teixeira, Glaucia Braga e Silva, “EasyTest:
An approach for automatic test cases generation from UML Activity
Diagrams”, 14th International Conference on Information Technology:
New Generations, 2017.
[5] Yufei Yin, Yiqun Xu, Weikai Miao, Yixiang Chen, “An Automated
Test Case Generation Approach based on Activity Diagrams of
SysML”, International Journal of Performability Engineering, Vol . 13,
No. 6, pp. 922-936, 2017
[6] Sun, Chang-ai and Zhao, Yan and Pan, Lin and He, Xiao and Towey,
Dave, “A transformation-based approach to testing concurrent
programs using UML activity diagrams. Software: Practice and
Experience”, Vol 46, Issue 4, pp. 551-576, 2014.
[7] Liping Lia, Xingsen Li, Tao He, Jie Xiong, “Extenics-based Test Case
Generation for UML Activity Diagram”, Procedia Computer Science
17, pp. 1186 – 1193, 2013.
[8] Swain, Ranjita Kumari, Vikas Panthi, Durga Prasad Mohapatra, and
Prafulla Kumar Behera. "Prioritizing test scenarios from UML
communication and activity diagrams", Innovations in Systems and
Software Engineering 10, no. 3, pp. 165-180, 2014.
[9] Son, Hyun Seung, et al. "An automatic test case generation from state
diagram using cause-effect graph based on model
transformation". Journal of Engineering Technology 6.1, pp. 378-393,
2018.
[10] Gulia, Preeti, and R. S. Chillar. "A new approach to generate and
optimize test cases for UML state diagram using genetic algorithm,
ACM SIGSOFT Software Engineering Notes 37.3 pp. 1-5, 2012.
[11] Srivastava, Praveen Ranjan, and Km Baby. "Automated software
testing using metahurestic technique based on an ant colony
optimization", Electronic System Design (ISED), 2010 International
Symposium on. IEEE, 2010.
[12] Mohapatra, Durga Prasad, Sangharatna Godbley, and Arpita Dutta.
"Measuring Hit ratio of Software Systems using UML Sequence
Diagram", 58th Annual Convention of Institution of Engineers (India),
2017.
[13] Swain, S.K., Mohapatra, D.P. and Mall, R., “Test case generation based
on use case and sequence diagram”, International Journal of Software
Engineering, 3(2), pp.21-52, 2010
[14] Hoseini, Bahare, and Saeed Jalili. "Automatic test path generation from
sequence diagram using genetic algorithm" Telecommunications (IST),
2014 7th International Symposium on. IEEE, 2014.
[15] Datta, Parul, and Bhisham Sharma. "A survey on IoT architectures,
protocols, security and smart city based applications" 8th International
Conference on Computing, Communication and Networking
Technologies (ICCCNT). IEEE, pp. 1-5, 2017.
460
Authorized licensed use limited to: Tencent. Downloaded on June 30,2021 at 12:58:26 UTC from IEEE Xplore. Restrictions apply.