Test Runner for Java ignores @Order annotations on test classes
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- java, typescript, vscode
- 领域
- devtools, testing-qa
调研方向
从 VSCode Testing 视图的执行路径开始,并将其与 Gradle 测试运行进行比较,同时以相关 issue #1740 和 #1756 作为上下文。确认类级别的 @Order 和 @EnabledIf 行为是否得到保留;完成的标准是有序类和方法能够一致地运行,或者已记录受支持的 runner 版本覆盖方式。
由索引模型根据 Issue 内容生成。
描述
Symptom: JUnit 5 test classes which reliably run in the correct order with gradlew test run in the wrong order in the VSCode IDE.
System: Windows 10, VSCode 1.96.3, Gradle 8.12, Spring Boot 3.4.1, Java 21.04, JUnit 5.11.4
Use case: In a Spring Boot client-server Gradle project, the integration tests in the client execute against the running server. The server-side database state built up by earlier integration tests is required by the later integration tests and thus the tests must be executed in a specific order. Accordingly, the test classes and methods are annotated with @Order and the configuration property junit.jupiter.testclass.order.default = org.junit.jupiter.api.ClassOrderer$OrderAnnotation is set. Executed under Gradle the test classes and methods all run in the designated order. However, in the VSCode Testing view contributed by this extension, the test classes get executed in the wrong order and some test methods don't run at all because they use the @EnabledIf annotation to check whether requisite client-side state (reflecting server-side state) has been collected by tests that are supposed to have run already but which in fact haven't yet run.
I've scoured the docs, searched the web and asked several AI chatbots about this but haven't found any solutions that work.
Hypothesis: the test runner is embedded in the extension (v. 0.43.0) and is of too early a version to support test class ordering (~JUnit 5.8, I believe).
Is it possible to override the test runner version?
Related issues: https://github.com/microsoft/vscode-java-test/issues/1740, #1756
- 主要语言
- TypeScript
- 星标
- 340
- 派生
- 173
- 平均合并
- 1 天 4 小时
- 30 天内合并 PR
- 15
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/vscode-java-test 的其他 Issue
-
CodeLens missing and individual method execution freezes on @Nested JUnit 6 classes (macOS)可能已有人在做 @wenytang-ms 于 5 天前认领。 未关闭ai-triaged bug investigating junit test-discovery test-execution
难度 4/5 3-5 天 新手友好度 42/100
microsoft/vscode-java-test#1897 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[BUG] The extension uses raw data.可能重新可做 @wenytang-ms 于 89 天前认领,目前没有进行中的 PR。 未关闭ai-triaged bug gradle high-priority test-execution
microsoft/vscode-java-test#1880 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[BUG] IllegalAccessException: module java.base does not open java.lang to unnamed module可能重新可做 @wenytang-ms 于 89 天前认领,目前没有进行中的 PR。 未关闭ai-triaged gradle junit test-execution ux
microsoft/vscode-java-test#1878 · 3 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
ai-triaged enhancement junit low-priority test-execution ui
难度 4/5 3-5 天 新手友好度 48/100
microsoft/vscode-java-test#1836 · 4 条评论 ·
维护者通常 1 天内回复
-
ai-triaged enhancement gradle investigating junit low-priority test-reporting
难度 4/5 3-5 天 新手友好度 48/100
microsoft/vscode-java-test#1824 · 1 条评论 ·
维护者通常 1 天内回复
查看 microsoft/vscode-java-test 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
MystenLabs/MemWal#1085 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
📕documentation
难度 2/5 1-3 小时 新手友好度 72/100
db-ux-design-system/core-web#8343 ·
维护者通常 1 天内回复
-
enhancement triage/needs-triage
难度 2/5 1-3 小时 新手友好度 88/100
heygen-com/hyperframes#4944 ·
维护者通常 1 天内回复
-
ai-driven-qa bug claude
难度 2/5 1-3 小时 新手友好度 82/100
linagora/twake-calendar-frontend#1493 · 1 条评论 ·
维护者通常 1 天内回复