Proposal of Iterative Genetic Algorithm for Test Suite Generation

Proposal of Iterative Genetic Algorithm for Test Suite Generation

Ankita Bansal, Abha Jain, Abhijeet Anand, Swatantra Annk
Copyright: © 2021 |Pages: 20
DOI: 10.4018/IJISMD.2021010106
OnDemand:
(Individual Articles)
Available
$37.50
No Current Special Offers
TOTAL SAVINGS: $37.50

Abstract

Huge and reputed software industries are expected to deliver quality products. However, industry suffers from a loss of approximately $500 billion due to shoddy software quality. The quality of the product in terms of its accuracy, efficiency, and reliability can be revamped through testing by focusing attention on testing the product through effective test case generation and prioritization. The authors have proposed a test-case generation technique based on iterative listener genetic algorithm that generates test cases automatically. The proposed technique uses its adaptive nature and solves the issues like redundant test cases, inefficient test coverage percentage, high execution time, and increased computation complexity by maintaining the diversity of the population which will decrease the redundancy in test cases. The performance of the technique is compared with four existing test-case generation algorithms in terms of computational complexity, execution time, coverage, and it is observed that the proposed technique outperformed.
Article Preview
Top

Introduction

The evolution of software industry has been immense worldwide in the recent years with the size of tech giants such as Amazon, Google, Facebook, Microsoft being as high as $407.3 billion. Such huge and reputed software industries are expected to deliver quality products (Diwaker et al. 2019). However, the software industry suffers from a massive loss of $500 billion due to shoddy software quality (Jones and Bonsignour, 2011). The quality of the product in terms of its accuracy, efficiency, and reliability can be revamped through testing by focusing attention on testing the product thoroughly through effective test case generation, prioritization and optimizing the test cases (Kumar and Phogat, 2017). It has been observed that even after days of testing, the testers are not sure whether they have covered all the requirements essential for the launch of successful product/module in the market (Hooda and Chhillar, 2018). An incomplete coverage of requirements result in the wastage of precious resources like time, money and manpower (Keshavarz and Javidan, 2011). So, to avoid this situation, it is beneficial to prepare a set of test cases in advance. The test cases should be prepared in such a way so that they cover all the known scenarios (at least the positive scenarios) required to check the product. Before creating the test cases, one must be clear about the functionality expected from a product. An accurate test-case generation helps testers to have a clear picture of the expectations from the product they are going to test.

Various techniques like genetic algorithm, fuzzy logic, neural networks etc. have been explored to generate test cases (Kukkar et al., 2019). Testing of a product can be regarded as an optimization problem where one needs to minimize the redundant test cases while also increasing the efficiency and decreasing the time, efforts and cost (Srivastava and Kim, 2009). Genetic Algorithms (GA) are well suited to solve optimization problems; hence they can be used to perform specific testing techniques (Mishra et al., 2017). GA lies in the category of the evolutionary algorithm and has been applied in the field of testing lately due to its flexibility and adaptive nature. It is a nature-based technique and is best used when the information given is not precise and complete since it is a generalized algorithm rather than a specialized algorithm. Therefore, it thrives in any kind of search space (Girgis et al., 2014). This algorithm follows a two-step approach wherein the initial stage enhances the diversity of the population. Towards the end, it increases the rate of convergence to arrive at an optimal solution (Last et al, 2005).

The authors in this paper have proposed a test-case generation technique based on iterative listener GA that uses a novel approach to achieve the best solution after each iteration. It uses a listener that prints the best solution after each iteration. The algorithm is based on five significant phases viz. (1) population initialization which is the process of initializing the given set of inputs, (2) fitness calculation that calculates the fitness of an individual based on a mathematical formula, (3) selection of parents, (4) crossover which is essentially the reproduction part and finally (5) mutation which aims to increase the diversity of the population,. The proposed algorithm is based on GA that uses its adaptive nature and solves the issues like redundant test cases, inefficient test coverage percentage, high execution time, increased computation complexity by maintaining the diversity of the population which will decrease the redundancy in test cases (Saini and Tyagi, 2014).

The algorithm generates test cases automatically using open- source software called “Evosuite” which uses an evolutionary algorithm. The performance of the proposed algorithm has been compared with four main algorithms viz. Memetic Algorithm, High-Level Hyper-Heuristic (HHH) strategy, Search-based Test Suite Generation using Derived Genetic Algorithm (STSG-DGA) and Parallel Genetic Algorithm Based on Spark (PGAS) based on three factors viz. computational complexity (time taken to collect the number of test cases for forming the test suites), execution time (time taken for the software test suite generation process) and coverage (that indicates what percentage of the program's logic was covered by the test cases) (Sangeetha and Ramasundaram, 2017).

Broadly, the objectives of the paper are three-fold as stated below:

Complete Article List

Search this Journal:
Reset
Volume 15: 1 Issue (2024)
Volume 14: 1 Issue (2023)
Volume 13: 8 Issues (2022): 7 Released, 1 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