# Claude Code vs Codex test generation benchmark

> Compare tests from Claude Code and Codex on the same hidden faults. Score detection on broken and fixed revisions and record model versions and cost.

Source: https://cueapril.com/benchmarks/claude-code-vs-codex-test-generation
Updated: 2026-12-01
Index: https://cueapril.com/llms.txt

## Which agent writes tests that detect the hidden regression on our fixed task set?

Give both tools the same clean checkout, dependency lock, independent requirement and time limit. Record exact model versions. Keep the hidden fault and fixed revision outside the authoring workspace.

Judge the generated tests by whether they fail on a faulty revision and pass after the fix. A polished test that passes on both revisions gives the team little protection against that fault.

[Download the blank benchmark scorecard](https://cueapril.com/downloads/qa-worksheets/claude-code-vs-codex-test-generation.csv)

## How to score the comparison

Faults detected / eligible faults. Keep the underlying case-level observations available so another reviewer can audit the denominator.

Scoring worksheet and illustrative observations

| Record | What to enter |
| --- | --- |
| Workload | Give both tools the same clean checkout, dependency lock, independent requirement and time limit. Record exact model versions. Keep the hidden fault and fixed revision outside the authoring workspace. |
| Measure | Faults detected / eligible faults |
| Worked numbers | Example only: six faults, four detected by A and three by B. |

## Interpreting the worked example

The illustrative detection rates are 67% and 50%. A test that fails on both versions counts as an invalid test. Keep it in a separate column.

## Making the release decision

Repeat each brief with fresh sessions and publish cost and variance before naming a winner. Our linked pandas study contains real Codex outputs from two briefs and no head-to-head Claude result.

## Primary documentation

- [Worked example with two AI-written regression tests](/guides/agentic-software-testing)
- [QA metrics for release decisions](/guides/qa-metrics)

By Cue April. Updated 2026-12-01.

## Related

- [QA benchmarks](https://cueapril.com/benchmarks): Evaluate AI-generated tests, report quality and feedback time with defined workloads. Inspect scoring rules, example calculations and evidence limits.
- [Evaluation playbooks](https://cueapril.com/playbooks/blind-qa-vendor-trial): Compare QA vendors using the same hidden faults, scoring rules and evidence requirements. Keep known answers away from test authors during the trial.
- [2027 agentic testing report](https://cueapril.com/guides/agentic-testing-2027): Where agentic QA fits after a Claude Code or Codex pull request, our 2027 outlook for browser and computer-use testing, and what six AI-written tests caught.
