Multiple selections in test UI run individually/isolated

未关闭
#1,836 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
java, typescript

调研方向

首先,使用多个方法和类从 Tests sidebar 复现变慢的问题,并将其与选择父类或包进行比较。跟踪自定义的选择和执行路径,注意 setup 和 teardown 在哪里被调用。完成标准是多个选择共享适当的 setup/teardown 周期,同时不改变之前失败测试的重新运行。

由索引模型根据 Issue 内容生成。

描述

ai-triaged enhancement junit low-priority test-execution ui

Originally raised at redhat-developer/vscode-java#4338.

Observed behaviour: multiple methods under a Java test class (or multiple test classes under a package) selected in the Tests sidebar tree seem to run significantly slower than when just selecting the single parent class (or package).

This seems to be because each selection does a full setup/teardown (i.e. selecting a class does one setup/teardown cycle, before the first and after the last method; selecting four methods from that class does four cycles, one around each method). For projects like Spring web applications and their unit tests, the application is recreated unnecessarily for each test, and for large applications this causes a significant slowdown. Repeating failed unit tests from a previous run doesn't seem to be affected in this way.

My understanding is that JUnit at least doesn't provide much of a test selection interface, so I'm assuming there's a custom runner in play in order to target the selected or previously-failed tests in the first place.

主要语言
TypeScript
星标
340
派生
173
平均合并
1 天 2 小时
30 天内合并 PR
17

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/vscode-java-test 的其他 Issue

查看 microsoft/vscode-java-test 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。