NoClassDefFoundError for PreconditionViolationException when running JUnit5 tests
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
調査の方向性
まず、build.gradle に示されている Gradle の依存関係を使って、VSCode の JUnit5 runner で発生する失敗を再現します。stack trace にある org.junit.platform.commons.PreconditionViolationException の欠落に焦点を当ててください。Spring アプリケーションの JUnit5 テストが VSCode で NoClassDefFoundError なしに実行できれば完了です。この issue では、変更対象の repository ファイルやテストは指定されていません。
索引モデルが issue の本文から書いたものです。
説明
I can no longer run unit tests for my spring app within VSCode IDE, am only getting the following error when trying to do so:
java.lang.NoClassDefFoundError: org/junit/platform/commons/PreconditionViolationException
at org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.createTest(JUnit5TestLoader.java:90)
at org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.loadTests(JUnit5TestLoader.java:48)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:526)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
Caused by: java.lang.ClassNotFoundException: org.junit.platform.commons.PreconditionViolationException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
PreconditionViolationException is now deprecated, see here, so it would seem Java Test Runner is not aware of it or what. Currently my build.gradle has junit dependencies like this:
testImplementation "org.junit.jupiter:junit-jupiter-api:5.6.0"
testImplementation "org.junit.jupiter:junit-jupiter-params:5.6.0"
testImplementation "org.springframework.boot:spring-boot-starter-test:2.2.8.RELEASE"
testRuntime "org.junit.jupiter:junit-jupiter-engine:5.6.0"
I had a look at what seemed like a related issue but none of the workarounds from there worked for me.
- 主要言語
- 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 が 89 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン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 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン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
-
難易度 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 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
material-extensions/vscode-material-icon-theme#3610 ·
メンテナーはふだん 2 日以内に返信