You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check the version is equal to the current milestone.
Check the changelog has the right version and no typo.
Basic
The following events will startup the extension:
Workspace contains pom.xml
Workspace contains build.gradle
Test explorer gets focus
Trigger the extension commands
The startup activation time of the extension should no more than 1000ms.
Test Explorer - UI
The explorer should perform as lazy-load behavior: only load the children nodes if the parent nodes are expanded.
The nodes should all be sorted alphabetically.
If the method has annotated with @DisplayName (a JUnit 5 annotation), the node will use the annotation value as it's display name.
The hierarchy should be correct - Both for Single-Root or Multi-Root scenarios.
Click on the class/method level node, the editor should jump to the correct position of the source file.
Update/Delete/Create test code, the explorer should be updated accordingly.
The explorer can be refreshed if the user clicks refresh in either navigation bar or context menu.
Test Explorer - Run/Debug Test
There are actions called run test/debug tests in both navigation bar or context menu. In other words, the tests can be run/debug in the following level:
Workspace Root
Workspace Folder
Package
Class/Inner Class
Method
After executing run tests/debug tests, all the tests under the target node will be run.
After executing run tests/debug tests, in the notification window at the right-bottom side, it will show the status of the current test tasks, such as: searching test items..., then running tests...
Code Lens
Code Lens should be shown at the following places:
Test Methods (Annotated with @Test).
Classes which contains test methods.
By default, the Code Lens Contains following actions:
Run Test
Debug Test
After tests are run, a new status icon should be added as the third Code Lens action. For those tests that have not been run, the status icon should not be shown for it.
Click Run Test will run the tests
Click Debug Test will debug tests
Click the status icon should show the Test Report
User can set the visibility of the Code Lens by using the setting java.test.editor.enableShortcuts
Test Report
Only show the filter button when necessary. For example, the Failed button will appear only when there are failed tests. All of them can filter the results correctly.
Test report theme updates when the user changes the color theme.
The report can auto-update if the user reruns the tests and get different results.
The test report is read-only. (Not prompt saving when closing it).
The methods are categorized by classes.
Can navigate to the method source from the report.
Can config the report position through java.test.report.position.
When the report is not opened in the editor, reveal it as the setting specified.
When the report is opened in the editor, just update the report and do not change its column.
Can config whether to automatically show the report after execution, default is onFailure. Other available values are: always and never.
Test Status Bar
Should show Running Tests... during running.
When the status bar is showing Running Tests..., click it should open the output channel.
After running/debugging tests, the status bar should show the result.
Click the result, will open the Test Report.
Cancel the running job
start a test run that lasts for a long period, for example, add Thread.sleep in your test.
click Cancel button on the notification message, the running job should be stopped.
Logs
Can trigger command Java: Show Test Output to open the output channel.
Can trigger command Java: Open Test Runner Log to show the log file.
Can set log level: verbose, info, error
Can print the Chinese character correctly (providing that the user has correctly setup the project).
The extension will only honor the java.test.config if it exists.
java.test.config could be either an array or an object
If java.test.config is not empty, user will see a list to select the configuration
After the user selects the configuration, the extension will pop up a message box. The user can: Yes: Set the selected config as default, No: Do nothing or Never show: Do not show this message any more
The ${workspaceFolder} is available in workdingDirectory, args, vmargs and the value of entries in env
Migrate deprecated launch.test.json
Should be able to migrate the content in launch.test.json into the workspace setting, using Java: Migrate Deprecated 'launch.test.json'.
After migration, user can:
open setting
remove deprecated files
view more details
Test Discovery
For a Spring Boot project, if both src/main/resource and src/test/resource contain application.properties file, the test runner should pick the one in src/test/resource.
Star import should also be supported. (For example, import org.junit.*)