Model-Based Test Sequence Generation and Prioritization Using Ant Colony Optimization

Model-Based Test Sequence Generation and Prioritization Using Ant Colony Optimization

Gayatri Nayak, Mitrabinda Ray
Copyright: © 2022 |Pages: 17
DOI: 10.4018/JITR.299946
Article PDF Download
Open access articles are freely available for download

Abstract

The paper presents an approach to generate and optimize test sequences from the input UML activity diagram. For this, an algorithm is proposed called Unified Modelling Language for Test Sequence Generation (UMLTSG) that uses a search-based algorithm, named Test Sequence Prioritization using Ant Colony Optimization (TSP ACO) to generate and optimize test sequences. The algorithms overcome the existing limitations of handling complex decision-making activity such as conditional activity, fork activity, and join the activity. The optimization process helps to reduce the number of processing nodes that leads to minimizing the time and cost. The proposed approach experiments on a well-known application Railway Ticket Reservation System (RTRS). APFD metric measures the effectiveness of our approach and found that the prioritized order of test sequences achieved 20% higher APFD score. Apart from this, the authors have also experimented on six real life case studies and obtained an average of 52.16% reduction in redundant test paths.
Article Preview
Top

1. Introduction

In conventional software projects, sixty percent of the exertion is used upon software testing to generate trustworthy software (Farooq et al., 2008). Thus, researchers should give more attention to adequate testing. Producing test cases are clumsy depending on the source code. Therefore, the generation of test sequences based on design models is one of the current research areas in software testing (Chen et al., 2007, Jena et al., 2014). The dynamic behaviour of software is represented by various UML interaction diagrams at design level. UML includes activity diagrams, use-case diagram, state chart diagrams, sequence diagrams, and collaboration diagrams, etc. The activity diagram is a sequence of activities performed in the software (Chandler et al., 2005). Literature study says that researcher have proposed various methods to generate test sequences from UML diagram such as activity diagram, sequence diagram (Bhattacharjee et al., 2018). The test sequence represents a precise order of test cases (Srivastava et al., 2010). A test sequence is also alternatively abbreviated as test path in this paper. It comprises different kinds of nodes and edges such as fork node, conditional node, join node, etc. This work generates test sequences from the input activity diagram. The generation of test sequences for the activity diagram is a crucial task. So, the input diagram is converted to XMI code and then to a control flow graph (CFG) as an intermediate representation. It requires traversing all the nodes and edges of CFG to test all types of nodes and edges such that the maximum number of faults should get detected. We use Depth First Search (DFS), on a graph to generate test sequence. During the test process, each node performs some action, transition, which generates a test sequence. This is done at the design phase and implemented using the proposed algorithm named UML Test Sequence Generation (UMLTSG). This algorithm finds linearly independent paths (i.e. Test Sequences) to cover all nodes and edges of the obtained CFG. Test sequence prioritization is used for reordering of test sequences, to enhance test efficiency (Elbaum et al., 2004). Among various approaches, test sequences prioritization is one, which is used to order the test sequences according to the highest priority, based on some principles like execution time, coverage criteria, fault detection rate, etc. (Elbaum et al., 2004, Rothermel et al., 2001, Wong et al.,1997). Optimization of those generated test sequences is required for the effective testing of software (Sabharwal et al., 2010). Different optimization techniques such as GA (Kaur et al., 2011), ACO (Marijan et al., PSO (Lv et al.,2018) are used to optimize test sequences. We use ACO to find an optimal test path because of the following reasons:

  • It is capable for finding better solutions.

  • It avoids premature convergence.

  • It requires less number of parameters to tune as compared to GA and PSO.

Complete Article List

Search this Journal:
Reset
Volume 16: 1 Issue (2024): Forthcoming, Available for Pre-Order
Volume 15: 6 Issues (2022): 1 Released, 5 Forthcoming
Volume 14: 4 Issues (2021)
Volume 13: 4 Issues (2020)
Volume 12: 4 Issues (2019)
Volume 11: 4 Issues (2018)
Volume 10: 4 Issues (2017)
Volume 9: 4 Issues (2016)
Volume 8: 4 Issues (2015)
Volume 7: 4 Issues (2014)
Volume 6: 4 Issues (2013)
Volume 5: 4 Issues (2012)
Volume 4: 4 Issues (2011)
Volume 3: 4 Issues (2010)
Volume 2: 4 Issues (2009)
Volume 1: 4 Issues (2008)
View Complete Journal Contents Listing