Loading...
Loading...
Compares a single test case's behavior across two branches, analyzing pass/fail status, duration, flakiness, and failure details. Useful for investigating test regressions introduced by a feature branch.
npx skill4agent add tuist/agent-skills compare-test-casetuist test case show <id-or-identifier> --jsontuist test case run list <identifier> --jsontuist test case run show <run-id> --jsontuist test case show <test-case-id> --jsontuist test case show Module/Suite/TestCase --jsontuist test case list --flaky --json --page-size 10idnamemodule_namesuite_namereliability_rateflakiness_ratetotal_runsfailed_runsis_flakyis_quarantinedgit_branchtuist test case run list <identifier> --json --page-size 20passed_runs / total_runs * 100main| Metric | Base branch | Head branch | Verdict |
|---|---|---|---|
| Pass rate | e.g. 100% | e.g. 60% | REGRESSION |
| Avg duration | e.g. 0.5s | e.g. 2.1s | REGRESSION |
| Flaky runs | 0 | 3 | NEW FLAKINESS |
| Last status | success | failure | REGRESSION |
tuist test case run show <test-case-run-id> --jsonfailures[].messagefailures[].pathfailures[].line_numberfailures[].issue_typerepetitionscrash_reportrepetitionsTest Case Comparison: AuthModuleTests/LoginTests/test_login_with_expired_token
Overall reliability: 85% (was 100% before head branch)
Base (main):
Pass rate: 100% (15/15 runs)
Avg duration: 0.3s
Flaky: No
Head (feature/auth-refactor):
Pass rate: 60% (3/5 runs)
Avg duration: 0.5s
Flaky: Yes (2 flaky runs)
Verdict: NEWLY FLAKY -- test was stable on main but intermittently fails on feature branch
Root cause: The auth refactor introduced an async token refresh that races with the
test's synchronous assertion. Failures show "Expected status 401, got nil" at
Tests/AuthModuleTests/LoginTests.swift:42, suggesting the response arrives before
the token refresh completes.
Recommendations:
- Add an await/expectation before the assertion at LoginTests.swift:42
- Consider mocking the token refresh to make the test deterministic