1快速初始化测试套件
- 1运行 `cargo install rustforge` 安装 RustForge 命令行工具
- 2在项目根目录执行 `rustforge init` 生成默认测试模板
- 3使用 `cargo test` 运行生成的示例测试并验证
2集成 CI/CD 测试流水线
- 1在项目根目录执行 `rustforge setup-ci --provider github-actions` 生成 CI 配置文件
- 2将生成的 `.github/workflows/test.yml` 提交到仓库
- 3推送代码后,GitHub Actions 自动运行模块化的测试套件
3添加模块化测试组件
- 1运行 `rustforge add component integration` 添加集成测试模块
- 2在 `tests/` 目录下编辑生成的 `integration.rs` 文件,编写自定义测试用例
- 3使用 `cargo test --test integration` 单独运行该组件测试