Code Investigate Test Failure
Table of Contents
When to use this skill
When a unit test is failing and you need to systematically find the root cause from test result XML and log output.
How to use this skill
The full operational procedure is in How do I investigate a test failure?. The skill exists to surface that recipe under a name an LLM session can invoke, and to add the framing decisions a recipe cannot make on its own.
- Ask which suite if the user hasn't specified — single suite
like
ores.accounts.tests, orratfor everything. - Ask whether a specific test or all failures in the suite are in scope. A single failure usually means deep dive; a sweep means catalogue them, then prioritise.
- Run How do I investigate a test failure? end-to-end: enable logging → run suite → parse results → walk the investigation order (exception → test source → per-test log → suite log → re-run with trace → targeted debug logging).
- When you find the cause, decide:
- Disable logging when you're done — keeps the rest of the test suite fast.
Recipes
- How do I investigate a test failure? — the full procedure.
- How do I enable test logging? — the prerequisite.
- How do I run the tests? — the surrounding run loop.
Reference
- Unit test conventions — file structure, naming, helpers — to orient yourself once you open the failing test file.
- CMake setup — preset / output-directory background.
- unit-test-writer — sibling skill for authoring tests.