Lune

ICSE2020Top-tier venue

Quickly generating diverse valid test inputs with reinforcement learning

Sameer Reddy, Caroline Lemieux, Rohan Padhye, Koushik Sen

Abstract

Property-based testing is a popular approach for validating the logic of a program. An effective property-based test quickly generates many diverse valid test inputs and runs them through a parameterized test driver. However, when the test driver requires strict validity constraints on the inputs, completely random input generation fails to generate enough valid inputs. Existing approaches to solving this problem rely on whitebox or greybox information collected by instrumenting the input generator and/or test driver. However, collecting such information reduces the speed at which tests can be executed. In this paper, we propose and study a black-box approach for generating valid test inputs. We first formalize the problem of guiding random input generators towards producing a diverse set of valid inputs. This formalization highlights the role of a guide which governs the space of choices within a random input generator. We then propose a solution based on reinforcement learning (RL), using a tabular, on-policy RL approach to guide the generator. We evaluate this approach, RLCheck, against pure random input generation as well as a state-of-the-art greybox evolutionary algorithm, on four real-world benchmarks. We find that in the same time budget, RLCheck generates an order of magnitude more diverse valid inputs than the baselines.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

18 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Guiding Greybox Fuzzing with Mutation Testing cites BEDIVFUZZ: Integrating Behavioral Diversity into Generator-based Fuzzing
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers18

  1. Learning Deep Semantics for Test CompletionPengyu Nie, Rahul Banerjee, Junyi Jessy Li, Raymond J. Mooney et al.ICSE 2023 · 45 citations
  2. JITfuzz: Coverage-guided Fuzzing for JVM Just-in-Time CompilersMingyuan Wu, Minghai Lu, Heming Cui, Junjie Chen et al.ICSE 2023 · 36 citations
  3. BEDIVFUZZ: Integrating Behavioral Diversity into Generator-based FuzzingHoang Lam Nguyen, Lars GrunskeICSE 2022 · 29 citations
  4. Baffle: Hiding Backdoors in Offline Reinforcement Learning DatasetsChen Gong, Zhou Yang, Yunpeng Bai, Junda He et al.S&P 2024 · 28 citations
  5. Guiding Greybox Fuzzing with Mutation TestingVasudev Vikram, Isabella Laybourn, Ao Li, Nicole Nair et al.ISSTA 2023 · 22 citations

Related papers

  1. Tuning Random Generators: Property-Based Testing as Probabilistic ProgrammingRyan Tjoa, Poorva Garg, Harrison Goldstein, Todd D. Millstein et al.OOPSLA 2025 · 2 citations
  2. Higher income, larger loan? monotonicity testing of machine learning modelsArnab Sharma, Heike WehrheimISSTA 2020 · 12 citations
  3. Multicore Environment State Representation for Agent-Directed Test GenerationBruno D. Miranda, Luiz M. V. Pereira, Márcio Castro, Luiz C. V. dos SantosDAC 2025 · 1 citation
  4. Data-Driven Loop Bound Learning for Termination AnalysisRongchen Xu, Jianhui Chen, Fei HeICSE 2022 · 6 citations
  5. DeepREST: Automated Test Case Generation for REST APIs Exploiting Deep Reinforcement LearningDavide Corradini, Zeno Montolli, Michele Pasqua, Mariano CeccatoASE 2024 · 13 citations
Dusk over the sea between two cliffs drawn in fine vertical lines