
Test Suite Integrity Audit
Audits your test suite's output for silently vanished tests, unexplained skips, and suspiciously fast runs — turns green CI into a real signal. #생산성
붙여넣는 내용: 테스트 실행 요약 또는 CI 로그(이번 실행, 가능하면 지난 실행도)와 설정 또는 diff 메모입니다.
받는 결과: 세 가지 점검(개수 불일치, 사유 없는 skip/비활성화, 실행 시간 이상)에 대한 감사 결과와 "전부 green"을 신뢰할 수 있는지에 대한 판정입니다.
작동 방식
Test Suite Integrity Audit은 붙여넣은 출력에 대해 세 가지 점검을 수행한 뒤 하나의 판정을 내립니다.
1. 개수 불일치. 계획된 테스트와 실행된 테스트를 비교하고, 이번 실행을 제공하신 이전 기준 실행과도 비교하여 조용히 수집되지 않게 된 테스트를 찾아냅니다.
2. 사유 없는 skip/비활성화. 새로 skip되었거나 설정에서 제외된 테스트를 나열하고, 티켓, 담당자 또는 재활성화 날짜가 있는지 함께 기록합니다.
3. 실행 시간 이상. 실행 시간을 테스트 수와 비교하여 의심스러울 만큼 빨리 끝난 스위트를 찾아냅니다.
판정. green 결과를 얼마나 신뢰할 수 있는지, 무엇을 먼저 고쳐야 하는지, 무엇이 이를 확인해 줄지에 대한 짧은 판단입니다.
샘플 출력
샘플 입력(만들어 낸 예시):
Use the Test Suite Integrity Audit on this (a sample I wrote). Fictional CI log for a small TypeScript service "invoice-api".
Last week's main-branch run:
Test Suites: 42 passed, 42 total
Tests: 318 passed, 318 total
Time: 96.4 s
Today's main-branch run:
Test Suites: 38 passed, 38 total
Tests: 271 passed, 6 skipped, 277 total
Time: 14.2 s
Notes from the pull request that merged yesterday: "Move to the new jest config; clean up old test directories." The diff touched jest.config.ts (testPathIgnorePatterns now includes "/legacy/" and "/integration/"), and added `it.skip(` to 6 tests in billing/refund.test.ts with the comment "// flaky, fix later". No ticket is referenced. The CI job is green and the PR was approved with "all tests pass".
수정하지 않은 실제 출력:
## Test Suite Integrity Audit
### 1. Count mismatch
Planned: 277 | Executed: 271 | Passed: 271
(Prior main-branch baseline from the pasted log: 318 tests, 42 suites, all passed)
**FINDING: 47 fewer tests executed than last week, and the runner reported none of it as a failure.**
- **Within today's run:** planned 277 vs. executed 271. The 6-test gap is the 6 `it.skip` tests in `billing/refund.test.ts`. The runner reports them as "skipped," so this part is visible but not explained (see Check 2).
- **Against the baseline:**
- Collected tests fell from 318 to 277, a drop of 41.
- Suites fell from 42 to 38, a drop of 4.
- Those 41 tests and 4 suites no longer appear in the output at all. They are not reported as skipped or failed.
- **Which tests are missing:** I can't name them by file. Neither run includes a per-suite or per-file listing.
- **Likely cause:** the `testPathIgnorePatterns` change in `jest.config.ts`, which now excludes `/legacy/` and `/integration/`. The PR note ("clean up old test directories") fits this. The material doesn't show whether those directories were deleted, moved, or are still in the repo and now just ignored.
- **Open question:** whether the `/integration/` tests now run in a separate CI job. Nothing pasted shows one.
### 2. Unexplained skips/disables
- `billing/refund.test.ts` (line numbers not given): `it.skip(` added to 6 tests with the comment `// flaky, fix later`.
- No ticket, issue, owner, or re-enable date is referenced.
- A comment exists, but it is not a tracked reason. Nothing will bring these back, so in practice this is the same as deleting 6 billing/refund tests.
- Test names weren't provided.
- `jest.config.ts`: the `testPathIgnorePatterns` additions for `/legacy/` and `/integration/` also disable tests.
- The only explanation is the general PR note, "clean up old test directories."
- There is no statement that these tests were intentionally retired or relocated.
### 3. Timing anomalies
**FINDING: runtime fell about 85% (96.4 s → 14.2 s), while executed tests fell only about 15% (318 → 271).**
- The time drop is far larger than the test-count drop.
- One plausible explanation is that the excluded `/integration/` tests were the slow part of the suite. That would fit the config change rather than point to a no-op runner, but it can't be confirmed without per-suite timings.
- No per-test durations were provided, so I couldn't check for uniform (0 ms / 1 ms) timings.
## Verdict
**LIKELY SILENT DROP**: 41 tests across 4 suites stopped being collected after the `testPathIgnorePatterns` change, and 6 refund tests were skipped with no ticket, so 47 of 318 tests no longer run. The "all tests pass" approval was based on 271 tests, not the full suite.
**Fix first:** confirm whether `/legacy/` and `/integration/` tests were deliberately retired or moved to another job. If not, remove them from the ignore patterns or restore them in a separate CI job.
**What would confirm the drop:**
- Run `jest --listTests` with the old and new configs and diff the results. Alternatively, compare per-suite output from both runs.
- Check `git log` / `git blame` on the `legacy/` and `integration/` directories.
- File a ticket for the 6 `it.skip` tests in `billing/refund.test.ts`.
활용 사례
- green CI 실행이 예전에 돌리던 테스트를 여전히 돌리고 있는지 확인
- 테스트 설정을 건드리거나 skip을 추가하는 풀 리퀘스트 검토
- 테스트를 통과했는데도 버그가 배포된 이유 조사
- Claude Code용으로 만들어졌으며, SKILL.md 파일을 읽는 다른 에이전트(Codex CLI, OpenClaw 등)에서도 작동할 것으로 보입니다. 이 Skill 자체에는 추가 도구가 필요하지 않습니다.
자주 묻는 질문
제 테스트를 실행하나요? 아니요. 붙여넣으신 출력, 설정, 메모를 읽기만 합니다.
한계는 무엇인가요? 붙여넣은 자료에 나타난 내용만 판단할 수 있으며, 확인할 수 없는 발견 사항은 미해결 질문으로 표시합니다.
민감한 정보는 어떻게 되나요? 붙여넣기 전에 공유하고 싶지 않은 내부 경로와 이름은 가려 주십시오. 이 Skill에는 서버가 없고 사용자의 텍스트를 직접 수집하지 않습니다. 붙여넣은 내용은 그대로 사용 중인 에이전트의 모델로 전송되며(Skill을 호스팅 플랫폼에서 실행하는 경우 해당 플랫폼으로도 전송됩니다), 에이전트, 모델 제공자 또는 플랫폼이 각자의 정책에 따라 이를 보관할 수 있습니다.
여기에 언급된 Anthropic, OpenAI, OpenClaw를 포함한 제품명과 회사명은 각 소유자의 상표입니다. 이 Skill은 독립 제품이며 그 어느 곳과도 제휴, 보증 또는 후원 관계가 없습니다.


