compare-test-runs
できること
このスキルは、mainのものと機能ブランチのものなど、Tuistの二つのテストの実行を比べます。変更がテスト結果にどう影響したかを確認したい開発者のためのものです。
使う場面
- ✓機能ブランチに、mainと比べて新しいテストの失敗があるとき。
- ✓修正されたテストや、不安定になったテストを見たいとき。
- ✓テストの所要時間が増え、どこで増えたかを知りたいとき。
スキルのリンク
https://github.com/tuist/tuist/blob/main/skills/skills/compare-test-runs/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のブランチの最新のテストの実行をmainと比べて、新しい失敗を一覧にしてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは二つのテストの実行と、そのモジュール、スイート、テストケースの結果を読み、失敗、不安定なテスト、所要時間を比べて、何が変わったかを要約します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Compare Test Runs
Quick Start
You'll typically receive two test run identifiers. Follow these steps:
- Run
tuist test show <id> --jsonfor both base and head test runs. - Run
tuist test module list <test-run-id> --jsonandtuist test suite list <test-run-id> --jsonto get module and suite breakdowns. - Run
tuist test case run list <identifier> --jsonto get individual test case results. - Compare failures, flaky tests, durations, and overall status.
- Inspect failing test cases with
tuist test case run show <id> --json. - Summarize findings with actionable recommendations.
Step 1: Resolve Test Runs
If base/head are test run IDs or dashboard URLs
Fetch each directly:
tuist test show <base-id> --json
tuist test show <head-id> --json
If base/head are branch names
List recent test runs on each branch to identify test run IDs:
tuist test list --git-branch <base-branch> --json --page-size 5
tuist test list --git-branch <head-branch> --json --page-size 5
Pick the latest test run ID from each branch's results.
Defaults
- If no base is provided, use the project's default branch (usually
main). - If no head is provided, detect the current git branch.
Step 2: Compare Top-Level Metrics
After fetching both test runs, compare:
| Metric | What to check |
|---|---|
status |
Flag if base passed but head failed |
duration |
Flag if head is >10% slower |
total_test_count |
Note if test count changed (new or removed tests) |
failed_test_count |
Compare failure counts |
flaky_test_count |
Compare flaky counts |
avg_test_duration |
Flag significant changes |
Step 3: Get Module and Suite Breakdowns
Fetch module and suite-level results for both test runs to understand which areas regressed:
tuist test module list <base-test-run-id> --json
tuist test module list <head-test-run-id> --json
tuist test suite list <base-test-run-id> --json
tuist test suite list <head-test-run-id> --json
Match modules and suites by name across both runs to identify areas with new failures or duration regressions.
Step 4: Get Individual Test Case Results
Fetch test case runs for both test runs:
tuist test case run list <identifier> --json --page-size 100
Match test cases by their name + module_name + suite_name across both runs.
Step 5: Classify Changes
Group test cases into categories:
- New failures: Tests that passed in base but failed in head.
- Fixed tests: Tests that failed in base but passed in head.
- Newly flaky: Tests not flaky in base but flaky in head.
- No longer flaky: Tests that were flaky in base but stable in head.
- New tests: Tests present in head but not in base.
- Removed tests: Tests present in base but not in head.
- Duration regressions: Tests with >50% duration increase.
Step 6: Inspect Failures
For each new failure, get detailed information:
tuist test case run show <test-case-run-id> --json
Key fields to examine:
failures[].message-- the assertion or error messagefailures[].path-- source file pathfailures[].line_number-- exact line of failurefailures[].issue_type-- type of issuerepetitions-- if present, shows retry behavior (flaky detection)crash_report-- crash data if test runner crashed
Step 7: Inspect Attachments
The tuist test case run show output includes attachment and crash report information. Review:
- Screenshots or UI test artifacts
- Log files or crash reports
- Any diagnostic data attached to failing runs
Summary Format
Produce a summary with:
- Overall verdict: Better, worse, or neutral compared to base.
- New failures: List each with failure message, file path, and line number.
- New flaky tests: List with flakiness context.
- Fixed tests: List tests that are now passing.
- Duration: Overall and notable per-test regressions.
- Recommendations: Actionable next steps for each issue.
Example:
Test Run Comparison: base (run-123 on main) vs head (run-456 on feature-x)
Status: success -> failure -- REGRESSION
Duration: 120.5s -> 145.2s (+21%)
Tests: 342 -> 345 (3 new tests)
Failures: 0 -> 2 (2 new failures)
Flaky: 1 -> 3 (2 newly flaky)
New Failures:
1. AuthModuleTests/LoginTests/test_login_with_expired_token
Message: "Expected status 401, got 500"
File: Tests/AuthModuleTests/LoginTests.swift:42
Likely cause: Server error handling
よくある質問
何を比べますか?
失敗、新しく不安定になったテスト、修正されたテスト、所要時間、全体の状態を比べます。
失敗したテストの詳細を見せられますか?
はい。実行の失敗したテストケースを調べられます。
Tuistが必要ですか?
はい。テストの実行のデータを読むのにTuistのコマンドラインツールを使います。
詳細
作者による元の説明
Compares two test runs to identify new failures, newly flaky tests, fixed tests, and duration regressions. Can be invoked with test run IDs, dashboard URLs, or branch names.
repo: tuist/tuist
人気
- GitHubのスター
- 5.9k
- ランキング
- #14543
- ライセンス
- —
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
analyze-selective-testing
5.9kXcodeの選択的テストが、変更のないテストターゲットをどれだけうまくスキップしたかを確認し、実行ごとにスキップが変わった理由を見つけるよう支援します。
compare-builds
5.9k二つのXcodeのビルドの実行を比べて、遅くなったビルド、キャッシュの使用の変化、新しい問題を見つけるようエージェントを支援します。
compare-bundles
5.9k二つのアプリのバンドルを比べて、サイズの変化、追加または削除されたファイル、プラットフォームの違いを見つけるようエージェントを支援します。
compare-cache-runs
5.9k二つのキャッシュの実行を比べて、キャッシュのヒット率の変化を見つけ、キャッシュが無効になった理由を説明するようエージェントを支援します。
似ているスキル
test-driven-development
311k機能や修正を作る前に、まず失敗するテストを書き、それが失敗するのを確認してから、合格させる最小のコードを書くようエージェントに教えます。
verification-before-completion
311kタスク、修正、ビルドが完了した、または合格したと主張する前に、実際のチェックを実行し、その出力を読むようエージェントに教えます。
migrate-to-shoehorn
310kテストファイル内の危険な型キャストを、shoehornライブラリに置き換え、テストが部分的なデータを使いつつ型チェックを通るようにします。