@@ -13,15 +13,15 @@ however, that it is recommended to use IDEA 2017.3 or newer since more recent ve
13
13
IDEA download the following JARs automatically based on the API version used in the
14
14
project: `junit-platform-launcher`, `junit-jupiter-engine`, and `junit-vintage-engine`.
15
15
16
- In order to use a different JUnit 5 version (e.g., {jupiter- version}), you may need to
16
+ In order to use a different JUnit 5 version (e.g., {version}), you may need to
17
17
include the corresponding versions of the `junit-platform-launcher`,
18
18
`junit-jupiter-engine`, and `junit-vintage-engine` JARs in the classpath.
19
19
20
20
.Additional Gradle Dependencies
21
21
[source,groovy]
22
22
[subs=attributes+]
23
23
----
24
- testImplementation(platform("org.junit:junit-bom:{bom- version}"))
24
+ testImplementation(platform("org.junit:junit-bom:{version}"))
25
25
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
26
26
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
27
27
testRuntimeOnly("org.junit.vintage:junit-vintage-engine")
@@ -54,7 +54,7 @@ testRuntimeOnly("org.junit.vintage:junit-vintage-engine")
54
54
<dependency>
55
55
<groupId>org.junit</groupId>
56
56
<artifactId>junit-bom</artifactId>
57
- <version>{bom- version}</version>
57
+ <version>{version}</version>
58
58
<type>pom</type>
59
59
<scope>import</scope>
60
60
</dependency>
@@ -160,7 +160,7 @@ versions of all JUnit 5 artifacts.
160
160
.Explicit platform dependency on the BOM
161
161
----
162
162
dependencies {
163
- testImplementation(platform("org.junit:junit-bom:{bom- version}"))
163
+ testImplementation(platform("org.junit:junit-bom:{version}"))
164
164
testImplementation("org.junit.jupiter:junit-jupiter")
165
165
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
166
166
}
@@ -181,7 +181,7 @@ artifacts.
181
181
.Implicit platform dependency on the BOM
182
182
----
183
183
dependencies {
184
- testImplementation("org.junit.jupiter:junit-jupiter:{jupiter- version}") // <1>
184
+ testImplementation("org.junit.jupiter:junit-jupiter:{version}") // <1>
185
185
testRuntimeOnly("org.junit.platform:junit-platform-launcher") // <2>
186
186
}
187
187
----
@@ -212,7 +212,7 @@ on the dependency-aggregating JUnit Jupiter artifact similar to the following.
212
212
[subs=attributes+]
213
213
----
214
214
dependencies {
215
- testImplementation("org.junit.jupiter:junit-jupiter:{jupiter- version}")
215
+ testImplementation("org.junit.jupiter:junit-jupiter:{version}")
216
216
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
217
217
}
218
218
----
@@ -228,7 +228,7 @@ support.
228
228
testing {
229
229
suites {
230
230
named<JvmTestSuite>("test") {
231
- useJUnitJupiter("{jupiter- version}")
231
+ useJUnitJupiter("{version}")
232
232
}
233
233
}
234
234
}
@@ -241,7 +241,7 @@ testing {
241
241
testing {
242
242
suites {
243
243
test {
244
- useJUnitJupiter("{jupiter- version}")
244
+ useJUnitJupiter("{version}")
245
245
}
246
246
}
247
247
}
@@ -256,7 +256,7 @@ implementation similar to the following.
256
256
----
257
257
dependencies {
258
258
testImplementation("junit:junit:{junit4-version}")
259
- testRuntimeOnly("org.junit.vintage:junit-vintage-engine:{vintage- version}")
259
+ testRuntimeOnly("org.junit.vintage:junit-vintage-engine:{version}")
260
260
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
261
261
}
262
262
----
@@ -337,7 +337,7 @@ Maven build as follows.
337
337
<dependency>
338
338
<groupId>org.junit.platform</groupId>
339
339
<artifactId>junit-platform-launcher</artifactId>
340
- <version>{platform- version}</version>
340
+ <version>{version}</version>
341
341
<scope>test</scope>
342
342
</dependency>
343
343
----
@@ -358,7 +358,7 @@ versions of all JUnit 5 artifacts.
358
358
<dependency>
359
359
<groupId>org.junit</groupId>
360
360
<artifactId>junit-bom</artifactId>
361
- <version>{bom- version}</version>
361
+ <version>{version}</version>
362
362
<type>pom</type>
363
363
<scope>import</scope>
364
364
</dependency>
@@ -391,7 +391,7 @@ following.
391
391
<dependency>
392
392
<groupId>org.junit.jupiter</groupId>
393
393
<artifactId>junit-jupiter</artifactId>
394
- <version>{jupiter- version}</version> <!-- can be omitted when using the BOM -->
394
+ <version>{version}</version> <!-- can be omitted when using the BOM -->
395
395
<scope>test</scope>
396
396
</dependency>
397
397
<!-- ... -->
@@ -430,7 +430,7 @@ long as you configure `test` scoped dependencies on JUnit 4 and the JUnit Vintag
430
430
<dependency>
431
431
<groupId>org.junit.vintage</groupId>
432
432
<artifactId>junit-vintage-engine</artifactId>
433
- <version>{vintage- version}</version> <!-- can be omitted when using the BOM -->
433
+ <version>{version}</version> <!-- can be omitted when using the BOM -->
434
434
<scope>test</scope>
435
435
</dependency>
436
436
<!-- ... -->
@@ -659,7 +659,7 @@ With Gradle you can override the JUnit Jupiter version by including the followin
659
659
[source,groovy,indent=0]
660
660
[subs=attributes+]
661
661
----
662
- ext['junit-jupiter.version'] = '{jupiter- version}'
662
+ ext['junit-jupiter.version'] = '{version}'
663
663
----
664
664
665
665
With Maven you can override the JUnit Jupiter version by including the following in your
@@ -669,7 +669,7 @@ With Maven you can override the JUnit Jupiter version by including the following
669
669
[subs=attributes+]
670
670
----
671
671
<properties>
672
- <junit-jupiter.version>{jupiter- version}</junit-jupiter.version>
672
+ <junit-jupiter.version>{version}</junit-jupiter.version>
673
673
</properties>
674
674
----
675
675
@@ -680,7 +680,7 @@ The `{ConsoleLauncher}` is a command-line Java application that lets you launch
680
680
Platform from the console. For example, it can be used to run JUnit Vintage and JUnit
681
681
Jupiter tests and print test execution results to the console.
682
682
683
- An executable _Fat JAR_ (`junit-platform-console-standalone-{platform- version}.jar`) that
683
+ An executable _Fat JAR_ (`junit-platform-console-standalone-{version}.jar`) that
684
684
contains the contents of all of its dependencies is published in the {Maven_Central}
685
685
repository under the
686
686
https://repo1.maven.org/maven2/org/junit/platform/junit-platform-console-standalone[junit-platform-console-standalone]
@@ -711,7 +711,7 @@ standalone `ConsoleLauncher` as shown below.
711
711
712
712
[source,console,subs=attributes+]
713
713
----
714
- $ java -jar junit-platform-console-standalone-{platform- version}.jar execute <OPTIONS>
714
+ $ java -jar junit-platform-console-standalone-{version}.jar execute <OPTIONS>
715
715
716
716
├─ JUnit Vintage
717
717
│ └─ example.JUnit4Tests
@@ -820,7 +820,7 @@ files using the `--redirect-stdout` and `--redirect-stderr` options:
820
820
821
821
[source,console,subs=attributes+]
822
822
----
823
- $ java -jar junit-platform-console-standalone-{platform- version}.jar <OPTIONS> \
823
+ $ java -jar junit-platform-console-standalone-{version}.jar <OPTIONS> \
824
824
--redirect-stdout=stdout.txt \
825
825
--redirect-stderr=stderr.txt
826
826
----
@@ -1255,7 +1255,7 @@ to a problem.
1255
1255
In order to record Flight Recorder events generated while running tests, you need to:
1256
1256
1257
1257
1. Ensure that you are using either Java 8 Update 262 or higher or Java 11 or later.
1258
- 2. Provide the `org.junit.platform.jfr` module (`junit-platform-jfr-{platform- version}.jar`)
1258
+ 2. Provide the `org.junit.platform.jfr` module (`junit-platform-jfr-{version}.jar`)
1259
1259
on the class-path or module-path at test runtime.
1260
1260
3. Start flight recording when launching a test run. Flight Recorder can be started via
1261
1261
java command line option:
0 commit comments