IDEAS home Printed from https://ideas.repec.org/a/gam/jmathe/v12y2024i2p186-d1314216.html
   My bibliography  Save this article

A Bioinspired Test Generation Method Using Discretized and Modified Bat Optimization Algorithm

Author

Listed:
  • Bahman Arasteh

    (Department of Software Engineering, Faculty of Engineering and Natural Science, Istinye University, Istanbul 34460, Turkey)

  • Keyvan Arasteh

    (Department of Software Engineering, Faculty of Engineering and Natural Science, Istinye University, Istanbul 34460, Turkey)

  • Farzad Kiani

    (Computer Engineering Department, Faculty of Engineering, Fatih Sultan Mehmet Vakif University, Istanbul 34445, Turkey
    Data Science Application and Research Center (VEBIM), Fatih Sultan Mehmet Vakif University, Istanbul 34445, Turkey)

  • Seyed Salar Sefati

    (Faculty of Electronics, Telecommunications and Information Technology, University Politehnica of Bucharest, 060042 Bucuresti, Romania)

  • Octavian Fratu

    (Faculty of Electronics, Telecommunications and Information Technology, University Politehnica of Bucharest, 060042 Bucuresti, Romania)

  • Simona Halunga

    (Faculty of Electronics, Telecommunications and Information Technology, University Politehnica of Bucharest, 060042 Bucuresti, Romania)

  • Erfan Babaee Tirkolaee

    (Department of Industrial Engineering, Istinye University, Istanbul 34396, Turkey
    Department of Industrial Engineering and Management, Yuan Ze University, Taoyuan 320315, Taiwan
    Department of Industrial and Mechanical Engineering, Lebanese American University, Byblos 36, Lebanon)

Abstract

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.

Suggested Citation

  • Bahman Arasteh & Keyvan Arasteh & Farzad Kiani & Seyed Salar Sefati & Octavian Fratu & Simona Halunga & Erfan Babaee Tirkolaee, 2024. "A Bioinspired Test Generation Method Using Discretized and Modified Bat Optimization Algorithm," Mathematics, MDPI, vol. 12(2), pages 1-18, January.
  • Handle: RePEc:gam:jmathe:v:12:y:2024:i:2:p:186-:d:1314216
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/2227-7390/12/2/186/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/2227-7390/12/2/186/
    Download Restriction: no
    ---><---

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jmathe:v:12:y:2024:i:2:p:186-:d:1314216. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.