-
Notifications
You must be signed in to change notification settings - Fork 163
Test Plan
Sheng Chen edited this page Jan 14, 2019
·
46 revisions
The following projects can be used (but not limited to):
- Junit4:
- Junit5:
- TestNG:
- Check the version is equal to the current milestone.
- Check the changelog has the right version and no typo.
- 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.
- 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 barorcontext menu.
- There are actions called
run test/debug testsin bothnavigation barorcontext 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 first showsearching test items..., thenrunning tests...
- Code Lens should be shown at the following places:
- Test Methods (Annotated with
@Test). - Classes which contains test methods.
- Test Methods (Annotated with
- By default, the Code Lens Contains following actions:
Run TestDebug 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 Testwill run the tests - Click
Debug Testwill debug tests - Click the status icon should show the Test Report
- Only show the filter button when necessary. For example, the
Failedbutton 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 config the report position through
java.test.report.position
- 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.
- start a test run that lasts for a long period, for example, add
Thread.sleepin your test. - click
Cancelbutton on the notification message, the running job should be stopped.
- Can trigger command
Java: Show Test Outputto open the output channel. - Can trigger command
Java: Open Test Runner Logto show the log file.
- When having non-empty setting for
java.test.config, the extension should honorjava.test.config, otherwise, ifjava.test.configis not set or is empty, the extension will try to read thelaunch.test.json - If
launch.test.jsonis read, the extension will show a message box, hinting that the user is using the deprecated configuration. The user can:More details: View documentsorNever show: Do not show this message any more -
java.test.configcould be either an array or an object - If
java.test.configis not empty, user will see an list to select the configuration - After user selects the configuration, the extension will pop up a message box. The user can:
Yes: Set the selected config as default,No: Do nothingorNever show: Do not show this message any more