# ide-vscode-java-test **Repository Path**: openkylin/ide-vscode-java-test ## Basic Information - **Project Name**: ide-vscode-java-test - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 6 - **Forks**: 0 - **Created**: 2023-06-30 - **Last Updated**: 2025-09-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Kylin Java Test (Support OpenJDK11) - Fork of vscjava.vscode-java-test, modified on the lower version to support OpenJDK 11 - Modified based on the version 0.35.2 of vscjava.vscode-java-test - Run and debug Java test cases in VSCode or kylin-ide. It depends on the [Kylin Java(Support OpenJDK11)](https://open-vsx.org/extension/KylinIdeTeam/java) and [Kylin Java Debug(Support OpenJDK11)](https://open-vsx.org/extension/KylinIdeTeam/vscode-java-debug). ## Overview A lightweight extension to run and debug Java test cases in IDE. The extension support following test frameworks: - JUnit 4 (v4.8.0+) - JUnit 5 (v5.1.0+) - TestNG (v6.8.0+) > Note: JUnit 3 styled tests are not supported in this extension (i.e. extends `junit.framework.TestCase`). The [Kylin Java Test(Support OpenJDK11)](https://open-vsx.org/extension/KylinIdeTeam/vscode-java-test) works with [Kylin Java(Support OpenJDK11)](https://open-vsx.org/extension/KylinIdeTeam/java) and [Kylin Java Debug(Support OpenJDK11)](https://open-vsx.org/extension/KylinIdeTeam/vscode-java-debug) to provide the following features: - Run/Debug test cases - Customize test configurations - View test report - View tests in Test Explorer ## Requirements - JDK (version 11 or later), but Kylin Java(Support OpenJDK11) needs JDK11 or later, so JDK11 or later - VSCode API (version 1.59.0 or later) - [Kylin Java(Support OpenJDK11)](https://open-vsx.org/extension/KylinIdeTeam/java) - [Kylin Java Debug(Support OpenJDK11)](https://open-vsx.org/extension/KylinIdeTeam/vscode-java-debug) ## Features ### Run/Debug Test Cases

Run/Debug Test Cases

- The extension will generate shortcuts (the green play button) on the left side of the class and method definition. To run the target test cases, simply click on the green play button. You can also right click on it to see more options. --- ### Test Explorer

Test Explorer

- The Test Explorer is the place to show all the test cases in your workspace. You can also run/debug your test cases from here. --- ### Customize Test Configurations

Customize Test Configurations

- Sometimes you may want to customize the configuration to run your test cases. To achieve this, you can add the configuration into your workspace settings under the section: `java.test.config`. --- ### View Test Result

View Test Result

- After running/debugging the test cases, the state of the related test items will be updated in both editor decoration and test explorer. - You can trigger the command `Test: Peek Output` to peek the result view. - You can click on the links in the stack trace to navigate to the source location. ### IDE Embedded Commands for Testing

IDE Embedded Commands for Testing

There are other IDE embedded commands for testing, which can be found by searching `Test:` in the Command Palette. ## Settings | Setting Name | Description | Default Value | |---|---|---| | `java.test.config` | Specify the configuration for the test cases to run with. [More details](https://aka.ms/java-test-config). | `{}` | | `java.test.defaultConfig` | Specify the name of the default test configuration. | `""` | ### IDE Embedded Settings for Testing

IDE Embedded Settings for Testing

There are some other IDE embedded settings for testing, which can be found by searching `testing` in the Settings view. ## Project Setup ### JUnit 5 Please refer to [Getting Started](https://junit.org/junit5/docs/current/user-guide/#overview-getting-started) from the JUnit 5's official document for getting started documentation. > Note: If your project does not use build tools(Maven/Gradle/...), please make sure [junit-platform-console-standalone.jar](https://search.maven.org/search?q=g:org.junit.platform%20AND%20a:junit-platform-console-standalone) is on your project classpath. ### JUnit 4 Please refer to [Download and Install](https://github.com/junit-team/junit4/wiki/Download-and-Install) from the JUnit 4's official document for the getting started documentation. ### TestNG Please refer to [TestNG Docs](https://testng.org/doc/) from the TestNG's official document for getting started documentation. ## FAQ If you meet any problem when using the extension, please refer to our [issue list](https://gitee.com/openkylin/ide-vscode-java-test/issues) to check if there is an answer to your problem.