本文へ移動
cccskills
無料GitHub で公開

mutation-testing

Reading a Stryker mutation report from JSON — list the surviving mutants and locate each one in the source. Use after `npm run test:mutation`, or when asked which mutants survived.

日本語の概要は準備中です。原文の説明を表示しています。

mattpocock/cohort-005-project-fork-2スター 2(GitHub 2 + cccskills 0)

実行スコア 未検証

インストール方法を見る

含まれるファイル(2)

  • SKILL.md2.6 KB
  • agents/openai.yaml144 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Reading a mutation report

npm run test:mutation writes three files below reports/, and .gitignore excludes all of them. Read the report, not the cache:

  • reports/mutation/mutation.json — the report: the result of the last run, and the file to query.
  • reports/mutation/mutation.html — the same data, for a human to open in a browser.
  • reports/stryker-incremental.json — the incremental cache. Same shape, but it carries results merged from earlier runs, so a mutant in it may be stale.

The survivors

Every run, start here:

jq -r '.files | to_entries[] | .key as $file | .value.mutants[]
       | select(.status == "Survived" or .status == "NoCoverage")
       | "\($file):\(.location.start.line):\(.location.start.column)  \(.mutatorName)  ->  \(.replacement)"' \
  reports/mutation/mutation.json

Each line is one change to the source that the suite stayed green through. replacement is the mutated code; location.start is where it goes. To see the original, read those lines of the file — or slice the copy the report keeps in .files[<path>].source.

The statuses

status decides whether a mutant is your problem:

StatusMeaning
SurvivedA test ran the mutated code and passed. Act on it.
NoCoverageNo test ran the mutated code at all. Act on it.
Killed, TimeoutA test caught the change. statusReason holds the failure message.
CompileError, RuntimeError, IgnoredStryker could not test the mutant. Not a signal about your tests.

Other fields on a mutant: id, killedBy (test ids), coveredBy, testsCompleted. Test ids resolve against .testFiles.

Acting on a survivor

A survivor is a review comment on the test, not on the implementation: the behaviour changed and the suite did not notice. For each one, either tighten the test until it fails against replacement, or state why that behaviour is unspecified and the mutant is accepted.

Done when every Survived and NoCoverage mutant in the report is accounted for.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

ask-matt

無料

Ask which skill or flow fits your situation. A router over the skills in this repo.

日本語の概要は準備中です。原文の説明を表示しています。

mattpocock/cohort-005-project-fork-222026年10月21日 更新

Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes — Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/PRD asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to "review since X".

日本語の概要は準備中です。原文の説明を表示しています。

mattpocock/cohort-005-project-fork-222026年10月21日 更新

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

日本語の概要は準備中です。原文の説明を表示しています。

mattpocock/cohort-005-project-fork-222026年10月21日 更新

Database schema changes — generate the migration, update the seed, reseed. Use when editing `app/db/schema.ts`, when adding or altering a table, column, or enum, or when `npm run db:seed` fails to start.

日本語の概要は準備中です。原文の説明を表示しています。

mattpocock/cohort-005-project-fork-222026年10月21日 更新

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.

日本語の概要は準備中です。原文の説明を表示しています。

mattpocock/cohort-005-project-fork-222026年10月21日 更新

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

日本語の概要は準備中です。原文の説明を表示しています。

mattpocock/cohort-005-project-fork-222026年10月21日 更新

mattpocock のスキルをすべて見る

このスキルの問題を報告する