{"id":17760885,"url":"https://github.com/microsoft/vscode-java-test","last_synced_at":"2025-04-08T02:37:45.313Z","repository":{"id":38290595,"uuid":"110522074","full_name":"microsoft/vscode-java-test","owner":"microsoft","description":"Run and debug Java test cases in Visual Studio Code.","archived":false,"fork":false,"pushed_at":"2025-02-18T01:32:06.000Z","size":11214,"stargazers_count":302,"open_issues_count":100,"forks_count":147,"subscribers_count":22,"default_branch":"main","last_synced_at":"2025-04-01T01:38:33.775Z","etag":null,"topics":["java","junit","test","testng","vscode"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-test","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microsoft.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-13T08:40:43.000Z","updated_at":"2025-03-30T21:54:35.000Z","dependencies_parsed_at":"2023-09-22T14:47:22.278Z","dependency_job_id":"4ac01c7b-05ec-40b5-823f-cff257e3ca11","html_url":"https://github.com/microsoft/vscode-java-test","commit_stats":null,"previous_names":[],"tags_count":71,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fvscode-java-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fvscode-java-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fvscode-java-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fvscode-java-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","download_url":"https://codeload.github.com/microsoft/vscode-java-test/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247766299,"owners_count":20992446,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","junit","test","testng","vscode"],"created_at":"2024-10-26T19:14:05.364Z","updated_at":"2025-04-08T02:37:45.289Z","avatar_url":"https://github.com/microsoft.png","language":"Java","readme":"# Test Runner for Java\n\n\u003e Run and debug Java test cases in Visual Studio Code\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/Microsoft/vscode-java-test/main/resources/logo.png\" width=\"128\" height=\"128\" alt=\"\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/microsoft/vscode-java-test/actions/workflows/build.yml?query=branch%3Amain\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/microsoft/vscode-java-test/build.yml?style=flat-square\" alt=\"\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://gitter.im/microsoft/vscode-java-test\"\u003e\n    \u003cimg src=\"https://img.shields.io/gitter/room/microsoft/vscode-java-test.svg?style=flat-square\" alt=\"\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-test\"\u003e\n    \u003cimg src=\"https://img.shields.io/visual-studio-marketplace/d/vscjava.vscode-java-test.svg?style=flat-square\" alt=\"\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Overview\n\nA lightweight extension to run and debug Java test cases in Visual Studio Code. The extension support following test frameworks:\n\n- JUnit 4 (v4.8.0+)\n- JUnit 5 (v5.1.0+)\n- TestNG (v6.9.13.3+)\n\n\u003e Note: JUnit 3 styled tests are not supported in this extension (i.e. extends `junit.framework.TestCase`).\n\nThe [Test Runner for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-test) works with [Language Support for Java by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java) and [Debugger for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-debug) to provide the following features:\n\n- Run/Debug test cases\n- Customize test configurations\n- View test report\n- View tests in Test Explorer\n\n## Requirements\n\n- JDK (version 17 or later)\n- VS Code (version 1.59.0 or later)\n- [Language Support for Java by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java)\n- [Debugger for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-debug)\n\n## Features\n\n### Run/Debug Test Cases\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/Microsoft/vscode-java-test/main/demo/editor-decoration.png\" alt=\"Run/Debug Test Cases\"/\u003e\n\u003c/p\u003e\n\n- 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.\n\n---\n\n### Test Explorer\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/Microsoft/vscode-java-test/main/demo/test_explorer.png\" alt=\"Test Explorer\"/\u003e\n\u003c/p\u003e\n\n- 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.\n\n---\n\n### Customize Test Configurations\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/Microsoft/vscode-java-test/main/demo/configuration.png\" alt=\"Customize Test Configurations\"/\u003e\n\u003c/p\u003e\n\n- 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`.\n\n\u003e Note: More details can be found [here](https://github.com/Microsoft/vscode-java-test/wiki/Run-with-Configuration).\n\n---\n\n### View Test Result\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/Microsoft/vscode-java-test/main/demo/test_report.png\" alt=\"View Test Result\"/\u003e\n\u003c/p\u003e\n\n- After running/debugging the test cases, the state of the related test items will be updated in both editor decoration and test explorer.\n- You can trigger the command `Test: Peek Output` to peek the result view.\n- You can click on the links in the stack trace to navigate to the source location.\n\n### VS Code Embedded Commands for Testing\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/Microsoft/vscode-java-test/main/demo/command_palette.png\" alt=\"VS Code Embedded Commands for Testing\"/\u003e\n\u003c/p\u003e\n\nThere are other VS Code embedded commands for testing, which can be found by searching `Test:` in the Command Palette.\n\n## Settings\n\n| Setting Name | Description | Default Value |\n|---|---|---|\n| `java.test.config` | Specify the configuration for the test cases to run with. [More details](https://aka.ms/java-test-config). | `{}` |\n| `java.test.defaultConfig` | Specify the name of the default test configuration. | `\"\"` |\n\n### VS Code Embedded Settings for Testing\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/Microsoft/vscode-java-test/main/demo/settings.png\" alt=\"VS Code Embedded Settings for Testing\"/\u003e\n\u003c/p\u003e\n\nThere are some other VS Code embedded settings for testing, which can be found by searching `testing` in the Settings view.\n## Project Setup\n### JUnit 5\n\nPlease 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.\n\n\u003e 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.\n\n### JUnit 4\nPlease 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.\n\n### TestNG\nPlease refer to [TestNG Docs](https://testng.org/) from the TestNG's official document for getting started documentation.\n\n## FAQ\nIf you meet any problem when using the extension, please refer to the [FAQ](https://github.com/microsoft/vscode-java-test/wiki/FAQ) and our [issue list](https://github.com/microsoft/vscode-java-test/issues) to check if there is an answer to your problem.\n\n## Contributing and Feedback\n\nIf you are interested in providing feedback or contributing directly to the code base, please check the document [Contributing to Test Runner for Java](https://github.com/Microsoft/vscode-java-test/blob/main/CONTRIBUTING.md), which covers the following parts:\n- [Questions and Feedback](https://github.com/Microsoft/vscode-java-test/blob/main/CONTRIBUTING.md#questions-and-feedback)\n- [Reporting Issues](https://github.com/Microsoft/vscode-java-test/blob/main/CONTRIBUTING.md#reporting-issues)\n- [Contributing Fixes](https://github.com/Microsoft/vscode-java-test/blob/main/CONTRIBUTING.md#contributing-fixes)\n\n## License\n\nThis extension is licensed under [MIT License](LICENSE.txt).\n\n## Telemetry\n\nThis extension collects telemetry data to help improve our products. Please read [Microsoft privacy statement](https://privacy.microsoft.com/en-us/privacystatement) 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](https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fvscode-java-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrosoft%2Fvscode-java-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fvscode-java-test/lists"}