Affiliation:
1. Kristiania University College, Oslo, Norway
2. Kristiania University College and Oslo Metropolitan University, Oslo, Norway
Abstract
REST web services are widely popular in industry, and search techniques have been successfully used to automatically generate system-level test cases for those systems. In this article, we propose a novel mutation operator which is designed specifically for test generation at system-level, with a particular focus on REST APIs. In REST API testing, and often in system testing in general, an individual can have a long and complex chromosome. Furthermore, there are two specific issues: (1) fitness evaluation in system testing is highly costly compared with the number of objectives (e.g., testing targets) to optimize for; and (2) a large part of the genotype might have no impact on the phenotype of the individuals (e.g., input data that has no impact on the execution flow in the tested program). Due to these issues, it might be not suitable to apply a typical low mutation rate like 1/
n
(where
n
is the number of genes in an individual), which would lead to mutating only one gene on average. Therefore, in this article, we propose an adaptive weight-based hypermutation, which is aware of the different characteristics of the mutated genes. We developed adaptive strategies that enable the selection and mutation of genes adaptively based on their fitness impact and mutation history throughout the search. To assess our novel proposed mutation operator, we implemented it in the
EvoMaster
tool, integrated in the MIO algorithm, and further conducted an empirical study with three artificial REST APIs and four real-world REST APIs. Results show that our novel mutation operator demonstrates noticeable improvements over the default MIO. It provides a significant improvement in performance for six out of the seven case studies, where the relative improvement is up to +12.09% for target coverage, +12.69% for line coverage, and +32.51% for branch coverage.
Funder
Research Council of Norway
Publisher
Association for Computing Machinery (ACM)
Reference67 articles.
1. A Systematic Review of the Application and Empirical Investigation of Search-Based Test Case Generation
2. An experience report on applying software testing academic results in industry: We need usable automated test generation;Arcuri Andrea;Empirical Software Engineering,2017
Cited by
20 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Advanced White-Box Heuristics for Search-Based Fuzzing of REST APIs;ACM Transactions on Software Engineering and Methodology;2024-06-27
2. KAT: Dependency-Aware Automated API Testing with Large Language Models;2024 IEEE Conference on Software Testing, Verification and Validation (ICST);2024-05-27
3. Random Testing and Evolutionary Testing for Fuzzing GraphQL APIs;ACM Transactions on the Web;2024-01-05
4. RESTlogic: Detecting Logic Vulnerabilities in Cloud REST APIs;Computers, Materials & Continua;2024
5. An Approach to Generating API Test Scripts Using GPT;Proceedings of the 12th International Symposium on Information and Communication Technology;2023-12-07