PROZE: Generating Parameterized Unit Tests Informed by Runtime Data
Deepika Tiwari, Yogya Gamage, Martin Monperrus, and Benoit Baudry

TL;DR
PROZE is a system that automatically generates parameterized unit tests by identifying assertions that hold over multiple inputs, thereby improving test coverage and reliability without requiring manual oracle creation.
Contribution
It introduces a novel runtime approach to automatically find multi-input assertions for parameterized tests, enhancing test effectiveness and developer productivity.
Findings
Generated 2,287 PUTs from real-world Java modules.
217 PUTs proved assertions hold over larger input ranges.
Demonstrated assertions in CUTs are often general enough for multiple inputs.
Abstract
Typically, a conventional unit test (CUT) verifies the expected behavior of the unit under test through one specific input / output pair. In contrast, a parameterized unit test (PUT) receives a set of inputs as arguments, and contains assertions that are expected to hold true for all these inputs. PUTs increase test quality, as they assess correctness on a broad scope of inputs and behaviors. However, defining assertions over a set of inputs is a hard task for developers, which limits the adoption of PUTs in practice. In this paper, we address the problem of finding oracles for PUTs that hold over multiple inputs. We design a system called PROZE, that generates PUTs by identifying developer-written assertions that are valid for more than one test input. We implement our approach as a two-step methodology: first, at runtime, we collect inputs for a target method that is invoked within…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsModel-Driven Software Engineering Techniques · Software Testing and Debugging Techniques · Distributed and Parallel Computing Systems
