compare-test-runs
Fungsinya
Skill ini membandingkan dua run tes di Tuist, misalnya dari main dan dari cabang fitur. Skill ini untuk pengembang yang ingin melihat dampak sebuah perubahan terhadap hasil tes mereka.
Kapan dipakai
- ✓Saat cabang fitur memiliki kegagalan tes baru dibanding main.
- ✓Saat Anda ingin melihat tes mana yang sudah diperbaiki atau menjadi tidak stabil.
- ✓Saat durasi tes bertambah dan Anda ingin tahu di mana.
Link skill
https://github.com/tuist/tuist/blob/main/skills/skills/compare-test-runs/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
“Bandingkan run tes terbaru di cabang saya dengan main dan daftar kegagalan barunya.”
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent membaca kedua run tes beserta hasil modul, suite, dan kasus tesnya, membandingkan kegagalan, tes yang tidak stabil, dan durasi, lalu merangkum apa yang berubah.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum
Apa yang dibandingkan?
Kegagalan, tes yang baru tidak stabil, tes yang diperbaiki, durasi, dan status keseluruhan.
Bisakah menampilkan detail tes yang gagal?
Bisa. Skill dapat memeriksa kasus tes yang gagal dalam sebuah run.
Apakah perlu Tuist?
Ya. Skill memakai alat baris perintah Tuist untuk membaca data run tes.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 5.9k
- Peringkat
- #14543
- Lisensi
- —
- Diperbarui
- 2/11/2026
Komentar
- …
Skill lain dari repositori ini
analyze-selective-testing
5.9kMembantu agent Anda memeriksa seberapa baik selective testing Xcode melewati target tes yang tidak berubah, dan mencari tahu mengapa pelewatan berubah antar-run.
compare-builds
5.9kMembantu agent Anda membandingkan dua run build Xcode untuk menemukan build yang lebih lambat, perubahan penggunaan cache, dan masalah baru.
compare-bundles
5.9kMembantu agent Anda membandingkan dua bundle aplikasi untuk menemukan perubahan ukuran, file yang ditambahkan atau dihapus, dan perbedaan antar platform.
compare-cache-runs
5.9kMembantu agent Anda membandingkan dua run cache untuk menemukan perubahan tingkat cache hit dan menjelaskan mengapa cache dibatalkan.
Skill serupa
test-driven-development
311kMengajari agent Anda menulis tes yang gagal dulu, melihatnya gagal, lalu menulis kode terkecil yang lulus, sebelum membangun fitur atau perbaikan apa pun.
verification-before-completion
311kMengajari agent Anda menjalankan pemeriksaan nyata dan membaca keluarannya sebelum menyatakan tugas, perbaikan, atau build sudah selesai atau lulus.
migrate-to-shoehorn
310kMengganti type cast berisiko di file tes Anda dengan pustaka shoehorn, sehingga tes bisa memakai data parsial dan tetap lulus pemeriksaan tipe.