Article Preview
Top1. 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.