CRiT-Gen: A Calibrated Risk-Informed Framework for AI-Assisted Test Case Generation and Defect Detection
Writing test cases by hand is time-consuming, and manual defect detection becomes less reliable as software systems grow and release cycles shorten. AI-based tools have been introduced to address these problems, but they work in very different ways: some generate tests from natural-language descriptions, some detect visual regressions in running applications, and others monitor deployed systems for errors. Each tool should therefore be assessed against the job it is designed to do. This paper reviews five AI-assisted testing tools (ChatGPT, Claude AI, Mabl, Applitools, and Sentry) and compares them in terms of test generation, defect detection, cost, and support for calibrated confidence. Building on this comparison, the paper proposes CRiT-Gen (Calibrated Risk-Informed Test Generation), a framework that uses a calibrated just-in-time defect-risk model to identify the code changes most likely to contain defects and allocates a larger share of an LLM test-generation budget to them. Every generated test must pass a six-stage validation pipeline, including a fault-revealing check against the buggy and fixed program versions, before it is counted. CRiT-Gen has not yet been implemented; the paper presents its design, a formal budget-allocation procedure, and a controlled experiment on the BugsInPy benchmark that tests whether risk-guided generation detects more real defects than uniform and LLM-only baselines under an equal budget. This is a preprint and has not been peer reviewed.
Authors
- Zarmeen Afzal
Institutions
- Minhaj University Lahore (PK)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-12-03
- DOI
- https://doi.org/10.5281/zenodo.24785175
- Primary Topic
- Software Testing and Debugging Techniques
- Type
- preprint