Teralizer: Semantics-Based Test Generalization from Conventional Unit Tests to Property-Based Tests
Johann Glock, Clemens Bauer, Martin Pinzger

TL;DR
Teralizer automatically converts conventional unit tests into property-based tests by extracting specifications from program semantics, improving test coverage and effectiveness with minimal manual effort, demonstrated on Java projects.
Contribution
It introduces a semantics-based method for transforming unit tests into property-based tests, leveraging symbolic analysis to derive specifications from implementation.
Findings
Improved mutation scores on EvoSuite-generated tests by 1-4 percentage points.
Minimal improvement (0.05-0.07%) on mature developer-written tests.
Only 1.7% of analyzed projects successfully completed the generalization pipeline.
Abstract
Conventional unit tests validate single input-output pairs, leaving most inputs of an execution path untested. Property-based testing addresses this shortcoming by generating multiple inputs satisfying properties but requires significant manual effort to define properties and their constraints. We propose a semantics-based approach that automatically transforms unit tests into property-based tests by extracting specifications from implementations via single-path symbolic analysis. We demonstrate this approach through Teralizer, a prototype for Java that transforms JUnit tests into property-based jqwik tests. Unlike prior work that generalizes from input-output examples, Teralizer derives specifications from program semantics. We evaluated Teralizer on three progressively challenging datasets. On EvoSuite-generated tests for EqBench and Apache Commons utilities, Teralizer improved…
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.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Testing and Debugging Techniques · Software Engineering Research · Software System Performance and Reliability
