Test Runner for Java ignores @Order annotations on test classes
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- java, typescript, vscode
- 領域
- devtools, testing-qa
調査の方向性
VSCode Testing ビューの実行パスから始め、関連する issue #1740 と #1756 をコンテキストとして、Gradle のテスト実行と比較してください。クラスレベルの @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時間
- マージ済み PR(30日)
- 15
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 が 88 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン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 が 88 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン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
-
enhancement providers-api ui-dashboard
難易度 2/5 1〜3時間 初心者へのやさしさ 61/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
external-issue to-triage
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
needs triage
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
homarr-labs/homarr#6976 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信