Skip to content

Commit

Permalink
Document @testinstance lifecycle support in the M5 Release Notes
Browse files Browse the repository at this point in the history
Issue: #419
  • Loading branch information
sbrannen committed Jun 30, 2017
1 parent 56c484a commit 29f4f70
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions documentation/src/docs/asciidoc/release-notes-5.0.0-M5.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

*Date of Release:* ❓

*Scope:* Fifth milestone release of JUnit 5 with a focus on dynamic containers and minor
API changes.
*Scope:* Fifth milestone release of JUnit 5 with a focus on dynamic containers, test
instance lifecycle management, and minor API changes.

WARNING: This is a milestone release and contains breaking changes. Please refer to the
<<running-tests-ide-intellij-idea,instructions>> above to use this version in a version of
Expand Down Expand Up @@ -38,6 +38,7 @@ is placed on the Java 9 module path.
| `junit-vintage-engine-<VERSION>.jar` | `org.junit.vintage.engine`
|===


[[release-notes-5.0.0-m5-junit-platform]]
==== JUnit Platform

Expand Down Expand Up @@ -69,7 +70,7 @@ is placed on the Java 9 module path.
- `junit-platform-commons`: `ReflectionUtils.findAllClassesInClasspathRoot(Path, Predicate, Predicate)`
* The `isLeaf()` method of the `org.junit.platform.engine.support.hierarchical.Node`
interface has been removed.
* The default methods `pruneTree()`, and `hasTests()` have been removed from
* The default methods `pruneTree()` and `hasTests()` have been removed from
`TestDescriptor`.

===== New Features and Improvements
Expand All @@ -94,6 +95,7 @@ is placed on the Java 9 module path.
* The `ENGINE` enum constant was removed from `TestDescriptor.Type`. The default type of
the `EngineDescriptor` is now `TestDescriptor.Type.CONTAINER`.


[[release-notes-5.0.0-m5-junit-jupiter]]
==== JUnit Jupiter

Expand All @@ -116,6 +118,8 @@ is placed on the Java 9 module path.
the functionality for creating an `Arguments` instance is now available via the
`Arguments.of(...)` static factory method.
* The `names` property of `@MethodSource` has been renamed to `value`.
* The `getTestInstance()` method in the `TestExtensionContext` API has been moved to the
`ExtensionContext` API.

[[release-notes-5.0.0-m5-migration-extension-api]]
.Extension API Migration
Expand All @@ -133,6 +137,18 @@ is placed on the Java 9 module path.

===== New Features and Improvements

* The test instance lifecycle can now be switched from the default per-method mode to a
new per-class mode via the new class-level `@TestInstance` annotation. This enables
shared test instance state between test methods in a given test class as well as
between non-static `@BeforeAll` and `@AfterAll` methods in the test class.
- See <<writing-tests-test-instance-lifecycle>> for details.
* `@BeforeAll` and `@AfterAll` methods are no longer required to be `static` if the test
class is annotated with `@TestInstance(Lifecycle.PER_CLASS)`. This enables the
following new features.
- Declaration of `@BeforeAll` and `@AfterAll` methods in `@Nested` test classes.
- Declaration of `@BeforeAll` and `@AfterAll` on interface `default` methods.
- Simplified declaration of `@BeforeAll` and `@AfterAll` methods in test classes
implemented with the Kotlin programming language.
* `Assertions.assertAll()` now tracks exceptions of any type (as opposed to only tracking
exceptions of type `AssertionError`), unless the exception is a _blacklisted_ exception
in which case it will be immediately rethrown.
Expand All @@ -149,6 +165,7 @@ is placed on the Java 9 module path.
* `@TestFactory` now supports arbitrarily nested dynamic containers. See `DynamicContainer`
and abstract base class `DynamicNode` for details.


[[release-notes-5.0.0-m5-junit-vintage]]
==== JUnit Vintage

Expand Down

0 comments on commit 29f4f70

Please sign in to comment.