A Bioinspired Test Generation Method Using Discretized and Modified Bat Optimization Algorithm
The process of software development is incomplete without software testing. Software testing expenses account for almost half of all development expenses. The automation of the testing process is seen to be a technique for reducing the cost of software testing. An NP-complete optimization challenge...
Main Authors: | , , , , , , |
---|---|
Format: | Article |
Language: | English |
Published: |
MDPI AG
2024-01-01
|
Series: | Mathematics |
Subjects: | |
Online Access: | https://www.mdpi.com/2227-7390/12/2/186 |
_version_ | 1827371543524540416 |
---|---|
author | Bahman Arasteh Keyvan Arasteh Farzad Kiani Seyed Salar Sefati Octavian Fratu Simona Halunga Erfan Babaee Tirkolaee |
author_facet | Bahman Arasteh Keyvan Arasteh Farzad Kiani Seyed Salar Sefati Octavian Fratu Simona Halunga Erfan Babaee Tirkolaee |
author_sort | Bahman Arasteh |
collection | DOAJ |
description | The process of software development is incomplete without software testing. Software testing expenses account for almost half of all development expenses. The automation of the testing process is seen to be a technique for reducing the cost of software testing. An NP-complete optimization challenge is to generate the test data with the highest branch coverage in the shortest time. The primary goal of this research is to provide test data that covers all branches of a software unit. Increasing the convergence speed, the success rate, and the stability of the outcomes are other goals of this study. An efficient bioinspired technique is suggested in this study to automatically generate test data utilizing the discretized Bat Optimization Algorithm (BOA). Modifying and discretizing the BOA and adapting it to the test generation problem are the main contributions of this study. In the first stage of the proposed method, the source code of the input program is statistically analyzed to identify the branches and their predicates. Then, the developed discretized BOA iteratively generates effective test data. The fitness function was developed based on the program’s branch coverage. The proposed method was implemented along with the previous one. The experiments’ results indicated that the suggested method could generate test data with about 99.95% branch coverage with a limited amount of time (16 times lower than the time of similar algorithms); its success rate was 99.85% and the average number of required iterations to cover all branches is 4.70. Higher coverage, higher speed, and higher stability make the proposed method suitable as an efficient test generation method for real-world large software. |
first_indexed | 2024-03-08T10:41:57Z |
format | Article |
id | doaj.art-0e9a1281c6af4564b9b1c08688858abb |
institution | Directory Open Access Journal |
issn | 2227-7390 |
language | English |
last_indexed | 2024-03-08T10:41:57Z |
publishDate | 2024-01-01 |
publisher | MDPI AG |
record_format | Article |
series | Mathematics |
spelling | doaj.art-0e9a1281c6af4564b9b1c08688858abb2024-01-26T17:30:59ZengMDPI AGMathematics2227-73902024-01-0112218610.3390/math12020186A Bioinspired Test Generation Method Using Discretized and Modified Bat Optimization AlgorithmBahman Arasteh0Keyvan Arasteh1Farzad Kiani2Seyed Salar Sefati3Octavian Fratu4Simona Halunga5Erfan Babaee Tirkolaee6Department of Software Engineering, Faculty of Engineering and Natural Science, Istinye University, Istanbul 34460, TurkeyDepartment of Software Engineering, Faculty of Engineering and Natural Science, Istinye University, Istanbul 34460, TurkeyComputer Engineering Department, Faculty of Engineering, Fatih Sultan Mehmet Vakif University, Istanbul 34445, TurkeyFaculty of Electronics, Telecommunications and Information Technology, University Politehnica of Bucharest, 060042 Bucuresti, RomaniaFaculty of Electronics, Telecommunications and Information Technology, University Politehnica of Bucharest, 060042 Bucuresti, RomaniaFaculty of Electronics, Telecommunications and Information Technology, University Politehnica of Bucharest, 060042 Bucuresti, RomaniaDepartment of Industrial Engineering, Istinye University, Istanbul 34396, TurkeyThe process of software development is incomplete without software testing. Software testing expenses account for almost half of all development expenses. The automation of the testing process is seen to be a technique for reducing the cost of software testing. An NP-complete optimization challenge is to generate the test data with the highest branch coverage in the shortest time. The primary goal of this research is to provide test data that covers all branches of a software unit. Increasing the convergence speed, the success rate, and the stability of the outcomes are other goals of this study. An efficient bioinspired technique is suggested in this study to automatically generate test data utilizing the discretized Bat Optimization Algorithm (BOA). Modifying and discretizing the BOA and adapting it to the test generation problem are the main contributions of this study. In the first stage of the proposed method, the source code of the input program is statistically analyzed to identify the branches and their predicates. Then, the developed discretized BOA iteratively generates effective test data. The fitness function was developed based on the program’s branch coverage. The proposed method was implemented along with the previous one. The experiments’ results indicated that the suggested method could generate test data with about 99.95% branch coverage with a limited amount of time (16 times lower than the time of similar algorithms); its success rate was 99.85% and the average number of required iterations to cover all branches is 4.70. Higher coverage, higher speed, and higher stability make the proposed method suitable as an efficient test generation method for real-world large software.https://www.mdpi.com/2227-7390/12/2/186bioinspired testing methoddiscretized bat optimization algorithmbranch coveragestabilitysuccess rate |
spellingShingle | Bahman Arasteh Keyvan Arasteh Farzad Kiani Seyed Salar Sefati Octavian Fratu Simona Halunga Erfan Babaee Tirkolaee A Bioinspired Test Generation Method Using Discretized and Modified Bat Optimization Algorithm Mathematics bioinspired testing method discretized bat optimization algorithm branch coverage stability success rate |
title | A Bioinspired Test Generation Method Using Discretized and Modified Bat Optimization Algorithm |
title_full | A Bioinspired Test Generation Method Using Discretized and Modified Bat Optimization Algorithm |
title_fullStr | A Bioinspired Test Generation Method Using Discretized and Modified Bat Optimization Algorithm |
title_full_unstemmed | A Bioinspired Test Generation Method Using Discretized and Modified Bat Optimization Algorithm |
title_short | A Bioinspired Test Generation Method Using Discretized and Modified Bat Optimization Algorithm |
title_sort | bioinspired test generation method using discretized and modified bat optimization algorithm |
topic | bioinspired testing method discretized bat optimization algorithm branch coverage stability success rate |
url | https://www.mdpi.com/2227-7390/12/2/186 |
work_keys_str_mv | AT bahmanarasteh abioinspiredtestgenerationmethodusingdiscretizedandmodifiedbatoptimizationalgorithm AT keyvanarasteh abioinspiredtestgenerationmethodusingdiscretizedandmodifiedbatoptimizationalgorithm AT farzadkiani abioinspiredtestgenerationmethodusingdiscretizedandmodifiedbatoptimizationalgorithm AT seyedsalarsefati abioinspiredtestgenerationmethodusingdiscretizedandmodifiedbatoptimizationalgorithm AT octavianfratu abioinspiredtestgenerationmethodusingdiscretizedandmodifiedbatoptimizationalgorithm AT simonahalunga abioinspiredtestgenerationmethodusingdiscretizedandmodifiedbatoptimizationalgorithm AT erfanbabaeetirkolaee abioinspiredtestgenerationmethodusingdiscretizedandmodifiedbatoptimizationalgorithm AT bahmanarasteh bioinspiredtestgenerationmethodusingdiscretizedandmodifiedbatoptimizationalgorithm AT keyvanarasteh bioinspiredtestgenerationmethodusingdiscretizedandmodifiedbatoptimizationalgorithm AT farzadkiani bioinspiredtestgenerationmethodusingdiscretizedandmodifiedbatoptimizationalgorithm AT seyedsalarsefati bioinspiredtestgenerationmethodusingdiscretizedandmodifiedbatoptimizationalgorithm AT octavianfratu bioinspiredtestgenerationmethodusingdiscretizedandmodifiedbatoptimizationalgorithm AT simonahalunga bioinspiredtestgenerationmethodusingdiscretizedandmodifiedbatoptimizationalgorithm AT erfanbabaeetirkolaee bioinspiredtestgenerationmethodusingdiscretizedandmodifiedbatoptimizationalgorithm |