Automated Isolation for White-box Test Generation

10/06/2019
by   Dávid Honfi, et al.
0

Context. White-box test generation is a technique used for automatically selecting test inputs using only the source or binary code. However, such techniques encounter challenges when applying them to complex programs. One of the main challenges is handling the dependencies of the unit under test. Objective. Without proper actions, generated tests cannot cover all parts of the source code, or calling the dependencies may cause unexpected side effects (e.g., file system or network access). These issues should be tackled while maintaining the advantages of white-box test generation. Method. In this paper, we present an automated source code transformation approach tackling the dependency issue for white-box test generation. This technique isolates the test execution by creating a parameterized sandbox wrapped around the transformed unit. We implemented the approach in a ready-to-use tool using Microsoft Pex as a test generator, and evaluated it on 10 open-source projects from GitHub having more than 38.000 lines of code in total. Results. The results from the evaluation indicate that if the lack of isolation hinders white-box test generation, then our approach is able to help: it increases the code coverage reached by the automatically generated test, while it reduces unwanted side effects. Also, our results act as a unique baseline for the test generation performance of Microsoft Pex on open-source projects. Conclusion. Based on the results, our source code transformations might serve well for alleviating the isolation problem in white-box test generation as it increases the coverage reached in such situations, while maintaining the practical applicability of the tests generated on the isolated code.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/13/2022

White-Box and Black-Box Fuzzing for GraphQL APIs

The Graph Query Language (GraphQL) is a powerful language for APIs manip...
research
01/06/2019

RESTful API Automated Test Case Generation

Nowadays, web services play a major role in the development of enterpris...
research
07/27/2023

StubCoder: Automated Generation and Repair of Stub Code for Mock Objects

Mocking is an essential unit testing technique for isolating the class u...
research
05/18/2020

Generating Unit Tests for Documentation

Software projects capture information in various kinds of artifacts, inc...
research
01/20/2022

npm-filter: Automating the mining of dynamic information from npm packages

The static properties of code repositories, e.g., lines of code, depende...
research
08/01/2022

Flaky Test Sanitisation via On-the-Fly Assumption Inference for Tests with Network Dependencies

Flaky tests cause significant problems as they can interrupt automated b...
research
09/15/2023

Advanced White-Box Heuristics for Search-Based Fuzzing of REST APIs

Due to its importance and widespread use in industry, automated testing ...

Please sign up or login with your details

Forgot password? Click here to reset