Files
2026Technology-Competition/tests/test-execution-log.md
T
范智鹏 e469554691 test: 新增 8 个测试文件 63 用例 + 覆盖率设施,行覆盖 42.58%→48.24%
- 新增 jsp-extractor/report/method-extractor/fix-prompt/registry/provider-chat/import-service/yaml-parser 测试
- .vscode-test.mjs 加 srcDir+coverage,package.json 加 test:coverage,产出 tests/coverage/(html)
- 修复 method-extractor java fallback 取错捕获组、mockDocument.getText 忽略 range
- 更新 tests/test-cases.md(24 文件 179 条)与 test-execution-log.md(覆盖率记录)
2026-08-27 22:54:00 +08:00

60 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 测试执行日志
## 一、执行信息
| 项目 | 内容 |
|---|---|
| 执行日期 | 2026-08-26 |
| 测试命令 | `npm test` |
| 前置链路 | `lint 0 error → compile 通过 → compile:test 通过` |
| 测试运行器 | `@vscode/test-cli`.vscode-test.mjs`out/tests/**/*.test.js` |
| 插件版本 | 1.3.0 |
| 测试文件数 | 16 个 `*.test.ts` |
## 二、执行结果摘要
| 指标 | 结果 |
|---|---|
| 通过(passing | **116** |
| 失败(failing | 0 |
| 跳过(pending | 0 |
| 运行时长 | ~5sExtension Host 退出码 0 |
> 详细逐条用例清单见 `tests/test-cases.md`。
## 三、运行环境
| 项目 | 内容 |
|---|---|
| 测试宿主 | VSCode Extension Test Host@vscode/test-electron |
| 操作系统 | Windowswin32 |
| Node.js | 插件 devDependencies 锁定版本(@types/node 22.x |
| 编译 | `tsc -p ./` + `node scripts/copy-webview-js.mjs`(主工程);`tsc -p ./tsconfig.test.json`(测试工程) |
| Lint | `eslint src`0 error(仅 `src/utils/mockDocument.ts` 2 处既有 curly warning |
## 四、复现方式
```bash
npm run lint # eslint src → 0 error
npm run compile # tsc 主工程
npm run compile:test # tsc 测试工程(out/tests
npm test # @vscode/test-cli 运行 out/tests/**/*.test.js
```
## 五、覆盖率执行记录(2026-08-27)
| 项目 | 内容 |
|---|---|
| 执行日期 | 2026-08-27 |
| 测试命令 | `npm run test:coverage`compile → compile:test → `vscode-test --coverage --coverage-output tests/coverage` |
| 测试文件数 | 24 个 `*.test.ts` |
| 通过(passing | **179** |
| 失败(failing | 0 |
| 行/语句覆盖率 | **48.24%**5570/11546 |
| 分支覆盖率 | 77.97%524/672 |
| 函数覆盖率 | 43.66%155/355 |
| 覆盖率报告 | `tests/coverage/index.html`(仅统计测试实际触达模块) |
| 新增覆盖模块 | jsp-extractor、report、method-extractor、fix-prompt、registry、ai/providers(三协议)、import-service、yaml-parser |
> 覆盖率基线:2026-08-27 首跑 116 passing / 42.58% → 补测 63 条后 179 passing / 48.24%。