Article Preview
Top1. Introduction
Testing is a very labour intensive task and consumes 40-70% of time and resources of software development process (Khana et al 2019). Test case generation is best fitted to a multi objective problem. Because, the desired outcome of test case generation activity is maximum coverage in minimum time. Various searching techniques (Yao & Gong, 2014; Khana et al., 2018) are designed to deal with multi objective problem. Application of searching techniques in software testing is called Search Based Software Testing (SBST) (Harman et al., 2015). Though, many meta heuristic algorithms like Genetic Algorithm (GA), Particle Swarm Optimization (PSO), Cuckoo Search (CS), Ant Colony Optimization (ACO) etc. (Sahoo & Ray, 2018) are applied till now in automatic test case generation, still there is a need for reduction in execution time. Most of them are used to generate test case for one path at a time which is time consuming (Manikumar et al., 2016).
Main objective of this paper is to cover multiple target paths within the available test resources at the time of automatic test case generation. Improvement in the search based testing is done by adding metamorphic relations (Chen, 1998) between test cases, in order to reduce the number of runs of meta heuristic algorithm, in path coverage. In this paper, metamorphic relations among a set of test cases are used to generate next set of test cases. Metamorphic testing tests whether the selected inputs to a programme under test and their outputs satisfy certain relations. The relationship between inputs and outputs is termed as Metamorphic Relation (MR). After multiple programme executions, if any of the MRs are not satisfying in any execution, then at least one error exists in the programme and the next test cases cannot be generated (Chen et al,. 1998; Kanewala et al., 2013). In this paper, FOA (Ghaemi & Feizi-Derakhshi, 2014) is used to generate a set of test cases. The first set of test cases (successful) are generated through FOA, the test cases for rest of the paths are generated using metamorphic relations in the same run without undergoing several runs. It takes less time and less iterations. As far best of our knowledge, this is the first work in FOA for test case generation. FOA is inspired by few trees in the forest which can survive for several decades. In FOA, seeding procedure of the trees is simulated. FOA is being chosen because candidate solutions are generated exponentially yielding a faster search. It provides a promising result in different areas (Sahargahi & Derakhshi, 2017; Chaghari et al, 2018; Mohanty et al., 2018). It is a suitable algorithm for test case generation based upon branch coverage and path coverage in software testing. In this paper, Branch distanced based fitness function combined with approximation level (Baresel et al., 2002; Chen et al, 2009) and Improved Combined Fitness (ICF) (Sahoo & Ray, 2020) are applied. The objective function is designed based upon the path coverage criteria. Through experiments, the performance of FOA in test case generation for multiple target paths is evaluated.
Research gaps identified in the existing literatures are as follows: