-
Notifications
You must be signed in to change notification settings - Fork 156
Test Plan
Sheng Chen edited this page Dec 21, 2018
·
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.
- Open a Java project folder
- Open a Java file
- Check if the extension will be activated.
- Explorer view will be shown.
- A new output channel
Java Test Runner
will be created.
- 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 bar
orcontext menu
.
- There are actions called
run test
/debug tests
in bothnavigation bar
orcontext 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 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
- 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 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.sleep
in your test. - click
Cancel
button on the notification message, the running job should be stopped.
- 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.
- Run tests from test explorer:
Run With Configuration
. For env variables, checkSystem.getenv()
works. - Run tests from test explorer:
Debug With Configuration
.- For env variables, check
System.getenv()
works. - Check variable evaluation works.
- For env variables, check
- Check default configuration works fine
- Edit test configuration, fill in
default
section with the name of the config that you specify as the default configuration. - Click
Run Test
in Code Lens, verify the default configuration is picked(e.g. set up the working directory in the config)
- Edit test configuration, fill in