A lightweight extension to run and debug Java test cases in Visual Studio Code. The extension support following test frameworks:
- JUnit 4 (v4.8.0+)
- JUnit 5 (v5.1.0+)
- TestNG (v6.8.0+)
The Java Test Runner works with Language Support for Java by Red Hat and Debugger for Java to provide the following features:
- Run test cases
- Debug test cases
- View test report
- View tests in Test Explorer
You can find the following commands in the Command Palette (F1 / Ctrl + Shift + P):
Java: Show Test Output
: Open the test output window.Java: Open Test Runner Log
: Open the log file.Java: Cancel Test Job
: Cancel the currently being executed test task.
Setting Name | Description | Default Value |
---|---|---|
java.test.report.position |
Specify where to show the test report. Supported values are: sideView , currentView . |
sideView |
java.test.log.level |
Specify the level of the test logs. Supported values are: error , info , verbose . |
info |
java.test.config |
Specify the configuration for the test cases to run with. More details. | {} |
java.test.defaultConfig |
Specify the name of the default test configuration. | "" |
- JDK (version 1.8.0 or later)
- VS Code (version 1.23.0 or later)
- Language Support for Java by Red Hat
- Debugger for Java
If you are interested in providing feedback or contributing directly to the code base, please check the document Contributing to Java Test Runner, which covers the following parts:
This extension is licensed under MIT License.
This extension collects telemetry data to help improve our products. Please read Microsoft privacy statement to learn more. If you opt out to send telemetry data to Microsoft, please set below configuration in settings.json: telemetry.enableTelemetry = false
. Learn more in our FAQ.