Skip to content

Commit 6b9e8ec

Browse files
authored
Remove references to very old versions of surefire and TestNG
TestNG 5 is circa 2010. Focus on what the current version does.
1 parent 2fed802 commit 6b9e8ec

File tree

1 file changed

+6
-36
lines changed

1 file changed

+6
-36
lines changed

maven-surefire-plugin/src/site/apt/examples/testng.apt.vm

+6-36
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@
2828

2929
Using TestNG
3030

31-
* Unsupported TestNG versions
32-
33-
- TestNG 5.14.3: Bad formatted pom.xml.
34-
- TestNG 5.14.4 and 5.14.5: TestNG is using a missing dependency (org.testng:guice:2.0). Excluding it, may break some features.
35-
3631
* Configuring TestNG
3732

3833
To get started with TestNG, include the following dependency in your project (replacing the version with the one you wish to use):
@@ -50,23 +45,6 @@ Using TestNG
5045
</dependencies>
5146
+---+
5247

53-
If you are using an older version of TestNG (\<= 5.11), the dependency would instead look like this:
54-
55-
+---+
56-
<dependencies>
57-
[...]
58-
<dependency>
59-
<groupId>org.testng</groupId>
60-
<artifactId>testng</artifactId>
61-
<version>5.11</version>
62-
<scope>test</scope>
63-
<classifier>jdk15</classifier>
64-
</dependency>
65-
[...]
66-
</dependencies>
67-
+---+
68-
69-
<<Note:>> if you are using JDK 1.4 Javadoc annotations for your TestNG tests, replace the classifier <<<jdk15>>> with <<<jdk14>>> above.
7048

7149
#{if}(${project.artifactId}=="maven-surefire-plugin")
7250
This is the only step that is required to get started - you can now create tests in your test source directory
@@ -175,9 +153,7 @@ Using TestNG
175153

176154
This is particularly useful for slow tests that can have high concurrency, or to quickly and roughly assess the independence
177155
and thread safety of your tests and code.
178-
179-
TestNG 5.10 and plugin version 2.19 or higher allows you to run methods in parallel test using data provider.
180-
156+
181157
+---+
182158
<plugins>
183159
[...]
@@ -202,7 +178,7 @@ Using TestNG
202178
</plugins>
203179
+---+
204180

205-
TestNG 6.9.8 (JRE 1.7) and plugin version 2.19 or higher allows you to run suites in parallel.
181+
You can run suites in parallel.
206182

207183
+---+
208184
<plugins>
@@ -234,12 +210,6 @@ Using TestNG
234210

235211
TestNG provides support for attaching custom listeners, reporters, annotation transformers and method interceptors to your tests.
236212
By default, TestNG attaches a few basic listeners to generate HTML and XML reports.
237-
238-
Unsupported versions:
239-
- TestNG 5.14.1 and 5.14.2: Due to an internal TestNG issue, listeners and reporters are not working with TestNG.
240-
Please upgrade TestNG to version 5.14.9 or higher.
241-
Note: It may be fixed in a future surefire version.
242-
243213
You can configure multiple custom listeners like this:
244214

245215
+---+
@@ -290,7 +260,7 @@ Using TestNG
290260

291261
* The level of verbosity
292262

293-
Since the plugin version 2.19 or higher the verbosity level can be configured in provider property
263+
The verbosity level can be configured in provider property
294264
<<<surefire.testng.verbose>>>. The verbosity level is between 0 and 10 where 10 is the most detailed.
295265
You can specify -1 and this will put TestNG in debug mode (no longer slicing off stack traces and all).
296266
The default level is 0.
@@ -347,7 +317,7 @@ Using TestNG
347317

348318
* Customizing TestNG Test Runner Factory
349319

350-
Since the plugin version 2.19 and TestNG 5.9 or higher you can customize
320+
You can customize the
351321
TestNG runner factory by implementing <<<org.testng.ITestRunnerFactory>>> and
352322
binding the class name to the key <<<testrunfactory>>> in provider properties:
353323

@@ -431,8 +401,8 @@ Using TestNG
431401

432402
* Running TestNG and JUnit Tests
433403

434-
TestNG 6.5.1 and higher provides support to run TestNG and JUnit 4.x in current Maven project. All you need
435-
is to introduce TestNG and JUnit dependency in POM.
404+
To run TestNG and JUnit 4.x in the current Maven project, you need
405+
both TestNG and JUnit dependencies in the POM:
436406

437407
+---+
438408
<dependencies>

0 commit comments

Comments
 (0)