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
Copy file name to clipboardExpand all lines: docs/java/java-testing.md
+7-14Lines changed: 7 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,8 +44,7 @@ The [Test Runner for Java](https://marketplace.visualstudio.com/items?itemName=v
44
44
45
45
Starting with Test Runner for Java version 0.34.0, you can enable a test framework for your unmanaged folder project (a project without any build tools) with just a few steps in the **Testing** Explorer:
46
46
47
-
<videoautoplayloopmutedplaysinlinecontrolstitle="Enable testing and adding test framework JARs to your project">
<videosrc="images/java-testing/enable-tests.mp4"autoplayloopmutedplaysinlinecontrolstitle="Enable testing and adding test framework JARs to your project">
49
48
</video>
50
49
51
50
> **Note**: Currently this feature only supports unmanaged folders that do not contain any testing dependencies.
@@ -139,16 +138,14 @@ If your project does not use any build tools, you can enable TestNG via the [Tes
139
138
140
139
The Test Runner for Java extension will generate shortcuts (the green play button) on the left side of the class and method definition. To run the target test cases, select the green play button. You can also right-click on it to see more options.
141
140
142
-
<videoautoplayloopmutedplaysinlinecontrolstitle="Run/debug test cases">
<videosrc="images/java-testing/gutter-icon.mp4"autoplayloopmutedplaysinlinecontrolstitle="Run/debug test cases">
144
142
</video>
145
143
146
144
### Testing Explorer
147
145
148
146
The Testing Explorer is a tree view to show all the test cases in your workspace. You can select the beaker button on the left-side Activity bar of Visual Studio Code to open it. You can also run/debug your test cases and view their test results from there.
<videosrc="images/java-testing/test-result.mp4"autoplayloopmutedplaysinlinecontrolstitle="View test results">
184
180
</video>
185
181
186
182
You can trigger the command **Test: Peek Output** to peek the results view. You can select the links in the stack trace to navigate to the source location.
@@ -191,22 +187,19 @@ The extension provides features to help you scaffold test cases. You can find th
191
187
192
188
If you trigger this source action from your main source code (test subject), you will be asked the test class's fully qualified name and the methods you want to test. The extension will then generate the test code for you:
If you trigger the source action from your test source code, you will be asked which kinds of test methods you want to add. Including the lifecycle methods and the test method:
199
194
200
-
<videoautoplayloopmutedplaysinlinecontrolstitle="Generate tests from test">
<videosrc="images/java-testing/generate-tests-from-test.mp4"autoplayloopmutedplaysinlinecontrolstitle="Generate tests from test">
202
196
</video>
203
197
204
198
### Test navigation
205
199
206
200
The extension provides features to help you navigate between your tests and test subjects. If your source code is contained in `src/main/java` or `src/test/java`, you can find the entry named **Go to Test** or **Go to Test Subject** in the editor context menu:
0 commit comments