test-report

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Context

背景

Quick status check without re-running tests. Reads cached results from last test execution.
Use when:
  • Checking current test health
  • Quick status update for standup
  • Reviewing before deciding next action
无需重新运行测试即可快速查看状态。读取上次测试执行的缓存结果。
适用场景:
  • 检查当前测试健康状况
  • 站会时快速同步状态
  • 决定下一步操作前进行复核

Parameters

参数

  • --history
    : Show trend from recent runs
  • --coverage
    : Include coverage summary
  • --flaky
    : Identify potentially flaky tests
  • --history
    :显示近期运行的趋势
  • --coverage
    :包含覆盖率摘要
  • --flaky
    :识别潜在的不稳定测试

Cached Result Locations

缓存结果位置

FrameworkCache Location
pytest
.pytest_cache/
,
htmlcov/
Vitest
node_modules/.vitest/
Jest
coverage/
,
.jest-cache/
Playwright
test-results/
,
playwright-report/
Go
coverage.out
Cargo
target/debug/
测试框架缓存位置
pytest
.pytest_cache/
,
htmlcov/
Vitest
node_modules/.vitest/
Jest
coverage/
,
.jest-cache/
Playwright
test-results/
,
playwright-report/
Go
coverage.out
Cargo
target/debug/

Behavior

运行机制

  1. Find Latest Results:
    • Check cache directories
    • Parse last run timestamp
    • Extract pass/fail counts
  2. Coverage Summary (if --coverage):
    • Read coverage reports
    • Show percentage vs target
    • List uncovered files
  3. Flaky Detection (if --flaky):
    • Compare recent runs
    • Identify tests with inconsistent results
    • Flag suspected flaky tests
  4. History (if --history):
    • Show last 5 runs
    • Track pass rate trend
    • Identify regression patterns
  1. 查找最新结果:
    • 检查缓存目录
    • 解析上次运行的时间戳
    • 提取通过/失败数量
  2. 覆盖率摘要(若使用--coverage):
    • 读取覆盖率报告
    • 显示覆盖率百分比与目标值对比
    • 列出未覆盖的文件
  3. 不稳定测试检测(若使用--flaky):
    • 对比近期运行结果
    • 识别结果不一致的测试
    • 标记疑似不稳定的测试
  4. 历史趋势(若使用--history):
    • 显示最近5次运行结果
    • 追踪通过率趋势
    • 识别回归模式

Output Format

输出格式

undefined
undefined

Test Status (last run: 5 minutes ago)

Test Status (last run: 5 minutes ago)

TierPassedFailedSkipped
Unit4520
Integration1201
E2E810
Coverage: 78% (target: 80%)
TierPassedFailedSkipped
Unit4520
Integration1201
E2E810
Coverage: 78% (target: 80%)

Recent Failures

Recent Failures

  • test_user_validation: AssertionError (tests/test_user.py:42)
  • e2e/login.spec.ts: Timeout (line 15)
  • test_user_validation: AssertionError (tests/test_user.py:42)
  • e2e/login.spec.ts: Timeout (line 15)

Flaky Tests (if --flaky)

Flaky Tests (if --flaky)

  • test_async_handler: 3 failures in last 10 runs
  • test_async_handler: 3 failures in last 10 runs

Suggested Actions

Suggested Actions

  • Run
    /test:quick
    to verify current state
  • Use
    /test:consult coverage
    for gap analysis
undefined
  • Run
    /test:quick
    to verify current state
  • Use
    /test:consult coverage
    for gap analysis
undefined

Post-Actions

后续操作建议

  • If failures exist: Suggest
    /test:quick
    to verify current state
  • If coverage low: Suggest
    /test:consult coverage
  • If flaky detected: Suggest
    /test:consult flaky
  • If stale (> 1 hour): Suggest running
    /test:quick
    or
    /test:full
  • 若存在失败测试:建议运行
    /test:quick
    以验证当前状态
  • 若覆盖率较低:建议使用
    /test:consult coverage
  • 若检测到不稳定测试:建议使用
    /test:consult flaky
  • 若结果已过期(超过1小时):建议运行
    /test:quick
    /test:full