code-review-testing

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
For agent changes prefer integration tests over unit tests. Integration tests are under
core/suite
and use
test_codex
to set up a test instance of codex.
Features that change the agent logic MUST add an integration test:
  • Provide a list of major logic changes and user-facing behaviors that need to be tested.
If unit tests are needed, put them in a dedicated test file (*_tests.rs). Avoid test-only functions in the main implementation.
Check whether there are existing helpers to make tests more streamlined and readable.
对于Agent相关的变更,优先选择集成测试而非单元测试。集成测试位于
core/suite
目录下,使用
test_codex
来搭建codex的测试实例。
修改Agent逻辑的功能必须添加集成测试:
  • 列出需要测试的主要逻辑变更和用户可见行为。
如果需要单元测试,请将其放在专门的测试文件(*_tests.rs)中。 避免在主实现中添加仅用于测试的函数。
检查是否有现有的辅助工具来让测试更简洁易读。