Mean code coverage
Maintained across submissions in both pilot rounds.
Team 30978 / 2025-2026
An automated test-generation pipeline for producing reliable Python pytest suites from natural-language specifications.
Given a Python function specification:
Maintained across submissions in both pilot rounds.
Reached in Round 2 after targeted prompt refinement.
The strongest result for detecting both fault categories.
01 / The challenge
NIST evaluated AI-generated unit tests for elementary Python functions. Each suite had to run directly in pytest, cover meaningful execution paths, and catch incorrect implementations without introducing faulty assertions of its own.
02 / The system
The system turns a NIST specification into a validated submission entry through five controlled stages.
Combine the Python specification with a fixed or custom quality prompt.
Use GPT-5.1-Codex to produce a candidate pytest suite.
Isolate runnable tests from the model response using standard delimiters.
Validate syntax, repair imports, and remove accidental implementations.
Assemble schema-valid JSON entries for NIST evaluation.
03 / Quality assurance
Generated code is treated as a candidate, not a finished artifact. Every suite passes through lightweight post-processing before packaging.
Parse every generated suite with Python AST. Malformed code triggers a retry with the failure context.
Verify that pytest and the function under test are imported so each suite runs in isolation.
Strip accidental copies of the target function before they can distort coverage measurements.
04 / What improved
Coverage was already near-perfect. The harder problem was generating tests that were logically correct and precise enough to detect faults. Dry-run analysis turned recurring failures into focused prompt and QA refinements.
Best correct-test rate
Require the exact exception type described by the specification.
Explicitly cover edge cases and validate expected values before output.
Repair missing imports and reject malformed generated test suites.