Forest Optimization-Based Test Case Generation for Multiple Paths With Metamorphic Relations

Forest Optimization-Based Test Case Generation for Multiple Paths With Metamorphic Relations

Rashmi Rekha Sahoo, Mitrabinda Ray
Copyright: © 2022 |Pages: 18
DOI: 10.4018/IJAMC.292503
Article PDF Download
Open access articles are freely available for download

Abstract

In general multiple paths are covered by multiple runs which is a time consuming task. Now a days, metaheuristic techniques are widely used for path coverage. In order to reduce the time, an efficient method is proposed based on Forest Optimization Algorithm (FOA) with Metamorphic Relations (MRs) that cover multiple paths at a time in one run unlike the traditional search based testing. In the proposed approach, initial test case is generated using FOA, the successive test cases are generated using MRs without undergoing several runs. The motive of using FOA is that the searching mechanism of this algorithm having resemblance with the branch / path coverage techniques of testing. To the best of our knowledge, FOA has not been implemented in software testing. The experimental results are compared with three existing work. The efficiency of simply FOA is also shown how it able to cover multiple paths. The results show that FOA with MRs is more efficient in terms of time consumption and number of paths covered.
Article Preview
Top

1. 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:

Complete Article List

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