Test Quality Lab
Run Python tests against realistic mutations and investigate which defects your tests miss.
First time here?Quick start & guided walkthrough
Run actual Python assertions against a reference implementation and deliberately changed versions.
- Choose a small exerciseThe exercise loads a reference implementation and starting assertions. Use sample code; the worker is an educational execution environment, not a place for private credentials.
- Strengthen the assertionsAdd examples at boundaries, invalid inputs, and observable state changes. A test should fail for a plausible defect, rather than simply execute the function.
- Investigate surviving mutationsRun the Python tests. The correct baseline must pass before a mutation result is meaningful. Read which changes survived and improve a relevant assertion. The first run loads the local Python runtime.
The first run loads the self-hosted Python runtime. Code executes in a disposable browser worker with a five-second execution limit. Use sample code only; the worker protects the page from a stuck exercise and is not a general-purpose security sandbox.
Load an example or enter your own input to begin.
How to use this tool
Choose an exercise and run the starting assertions against the reference and selected mutations. A surviving mutation passed your tests even though it contains a targeted defect.
Edit the test suite to exercise boundaries, negative inputs, boolean alternatives, or exceptions. Rerun to see which mutations your new assertions detect. The reference must pass before the mutation results are meaningful.
How it works
Python runs through the starter’s self-hosted Pyodide runtime, loaded only when requested. Each run uses a disposable worker and a five-second execution limit after initialization.
Each selected implementation executes with the same assertion suite in a new globals dictionary. Results report actual exceptions or successful execution. This is mutation sampling, not a coverage measurement.
Scope and limitations
- Plain Python assert statements are supported. At least one assertion is required. General unittest discovery and installing additional packages are outside scope.
- Worker termination protects page responsiveness. It is not a general-purpose security sandbox for hostile code. Use sample code without credentials or private data.
- Reference code, mutation set, timeouts, and resource limits constrain the exercise; passing these tests cannot establish production correctness.
Technical references
Your input stays in this tab. These tools do not upload, store, or send it to an AI service.