跳转到内容

测试地图

先用 该改哪里 定位源码边界,再用本页选择覆盖该变更的最小验证;只有必要时再扩大范围。

变更领域先运行再考虑
纯文档just site check对新的 IA 或组件密集页面做手动导航检查
仅格式化cargo fmt --check合并更广泛改动前运行 just check
配置 schema/defaults聚焦配置加载测试pixi run cargo test --libjust check
Route matchingRoute matching unit/e2e tests如果 proxy 行为变化,运行 just test-e2e
协议转换Pair-specific conversion tests覆盖 request/response 行为的 proxy e2e tests
Streaming/SSE/tool calls目标 streaming tests 和 fixtures流式回归用户可见,因此考虑 just test-e2e
错误渲染Error projection tests当 stream state 相关时,同时检查 HTTP 和 SSE error 行为
Capture/loggingCapture 行为测试和 docs checker phase coverage审查生成产物的隐私边界
  1. 1

    识别边界

    目标: 在知道改了什么之前,不要先跑大而全的测试。

    操作
    • 把变更映射到 config、routing、translation、streaming、errors、capture、docs 或 release packaging。
    • 使用 developer/where-to-change-code 中的源码归属。

    验证: 你能说出主要模块和受影响的用户可见行为。

  2. 2

    运行最小有意义检查

    目标: 快速发现局部错误。

    操作
    • 纯文档变更跑 docs checks。
    • 运行时模块改动跑聚焦 Rust 测试。
    • 协议转换改动跑 pair-specific tests。

    验证: 最小相关检查通过后,再扩大验证。

  3. 3

    为用户可见行为扩大验证

    目标: 覆盖用户实际命中的 proxy 和 streaming 路径。

    操作
    • Route、provider、normalization、streaming、capture 或 request/response 行为变化时运行 e2e。
    • 流式相关时,按需覆盖 terminal events、不完整工具流、stall 和 Unicode 边界。

    验证: 更广的命令通过,或失败已被理解并限定范围。

Terminal window
just site check
cargo fmt --check
pixi run cargo clippy --lib --tests -- -D warnings
pixi run cargo test --lib
just test-e2e
just check

使用根目录 justfilesite/justfile 里真实存在的项目 recipes;不要在文档里发明尚未加入仓库的新验证命令。