PropCov: Effective Coverage Reporting for Property-Based Testing
Jesse Coultas, Joseph Wiseman, Luís Pina
摘要
Property-based testing (PBT), introduced by Haskell’s Quickcheck, is becoming more popular with successful ports for other languages, such as Java’s junit-quickcheck. With PBT, developers write a property test and a data generator. The data generator takes a source of non-determinism and uses it to output well-formed data. The property test exercises the System Under Test (SUT) using the random well-formed data from the generator to ensure a particular property always holds (e.g., data serialized and deserialized should be equal to the original data). The PBT framework then performs many trials, each generating fresh data and executing the property test. A test failure shows a bug to developers, typically in edge-cases. A passing test gives some assurance on the quality of the SUT with regards to the property being tested. Unfortunately, well-known test coverage tools that are instrumental for understanding unit testing work poorly for PBT. In this paper, we present PropCov, a tool for understanding statement coverage in PBT that also provides suggestions for coverage improvement. PropCov employs a novel combination of static analysis with PBT to approximate the maximum possible statement coverage, providing an effective measure of the PBT coverage and making suggestions to developers of where to improve existing tests. PropCov features an easily extensible architecture designed to support new languages, build systems, and PBT frameworks. We evaluated PropCov using 25 Java projects using junit-quickcheck or jqwik, totaling 293 properties, and found that existing tools report missed coverage that is impossible to reach (86% of lines that JaCoCo reports as not covered), which leads developers to consider hundreds of extra lines of code (2897). Unlike existing coverage tools, PropCov results are accurate — only 6.4% of all properties contain unfeasible code, and PropCov only misses 3% of reachable code. Using PropCov’s suggestions, we increased the coverage of 42 tests over 7 projects and found 5 new bugs in 4 projects.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
它引用的顶会 Paper7
- Evaluating Fuzz TestingGeorge Klees, Andrew Ruef, Benji Cooper, Shiyi Wei 等CCS 2018 · 被引用 753 次
- CONFETTI: Amplifying Concolic Guidance for FuzzersJames Kukucka, Luís Pina, Paul Ammann, Jonathan BellICSE 2022 · 被引用 24 次
- Property-Based Testing in PracticeHarrison Goldstein, Joseph W. Cutler, Daniel Dickstein, Benjamin C. Pierce 等ICSE 2024 · 被引用 21 次
- Reachable Coverage: Estimating Saturation in FuzzingDanushka Liyanage, Marcel Böhme, Chakkrit Tantithamthavorn, Stephan LippICSE 2023 · 被引用 14 次
- Jmvx: Fast Multi-threaded Multi-version Execution and Record-Replay for Managed LanguagesDavid Schwartz, Ankith Kowshik, Luís PinaOOPSLA 2024 · 被引用 5 次
相关 Paper
- We've Got You Covered: Type-Guided Repair of Incomplete Input GeneratorsPatrick LaFontaine, Zhe Zhou, Ashish Mishra, Suresh Jagannathan 等OOPSLA 2025 · 被引用 1 次
- Covering All the Bases: Type-Based Verification of Test Input GeneratorsZhe Zhou, Ashish Mishra, Benjamin Delaware, Suresh JagannathanPLDI 2023 · 被引用 7 次
- FailMapper: Automated Generation of Unit Tests Guided by Failure ScenariosRuiqi Dong, Zehang Deng, Xiaogang Zhu, Xiaoning Du 等ASE 2025
- PROPR: Property-Based Automatic Program RepairMatthías Páll Gissurarson, Leonhard Applis, Annibale Panichella, Arie van Deursen 等ICSE 2022 · 被引用 13 次
- State Field Coverage: A Metric for Oracle QualityFacundo Molina, Nazareno Aguirre, Alessandra GorlaASE 2025 · 被引用 1 次
