This document contains the change log for all JUnit 5 releases since 5.8 GA.

Please refer to the User Guide for comprehensive reference documentation for programmers writing tests, extension authors, and engine authors as well as build tool and IDE vendors.

5.8.2

Date of Release: November 28, 2021

Scope:

  • Text blocks in @CsvSource are treated like CSV files

  • CSV headers in display names for @CsvSource and @CsvFileSource

  • Custom quote character support in @CsvSource and @CsvFileSource

For a complete list of all closed issues and pull requests for this release, consult the 5.8.2 milestone page in the JUnit repository on GitHub.

JUnit Platform

No changes.

JUnit Jupiter

New Features and Improvements

  • Text blocks in @CsvSource are now treated like complete CSV files, including support for comments beginning with a # symbol as well as support for new lines within quoted strings. See the User Guide for details and examples.

  • CSV headers can now be used in display names in parameterized tests. See @CsvSource and @CsvFileSource in the User Guide for details and examples.

  • The quote character for quoted strings in @CsvSource and @CsvFileSource is now configurable via a new quoteCharacter attribute in each annotation.

JUnit Vintage

No changes.

5.8.1

Date of Release: September 22, 2021

Scope:

  • Support for text blocks in @CsvSource

  • Java 18 support in the JRE enum

  • Access to the ExecutionMode in the ExtensionContext

  • Minor bug fixes and enhancements since 5.8.0

For a complete list of all closed issues and pull requests for this release, consult the 5.8.1 milestone page in the JUnit repository on GitHub.

JUnit Platform

Deprecations and Breaking Changes

  • @UseTechnicalNames has been deprecated in favor of the new @Suite support which does not require the use of technical names. See the warning in Using JUnit 4 to run the JUnit Platform for details.

New Features and Improvements

  • ReflectionSupport.findNestedClasses(..) is now thread-safe with regard to cycle detection.

JUnit Jupiter

Bug Fixes

  • assertLinesMatch() in Assertions no longer fails with a NoSuchElementException if a limited fast-forward followed by at least one more expected line exceeds the remaining actual lines.

  • assertLinesMatch() in Assertions now handles fast-forwards with leading and trailing spaces correctly and no longer throws an IndexOutOfBoundsException.

New Features and Improvements

  • JAVA_18 has been added to the JRE enum for use with JRE-based execution conditions.

  • CSV content in @CsvSource can now be supplied as a text block instead of an array of strings. See the User Guide for details and an example.

  • The ExecutionMode for the current test or container is now accessible via the ExtensionContext.

JUnit Vintage

Bug Fixes

  • Relaxed version constraint in published Gradle Module Metadata to allow downgrading the junit:junit dependency from 4.13.2.

5.8.0

Date of Release: September 12, 2021

Scope:

  • Declarative test suites via @Suite classes

  • LauncherSession and accompanying listener

  • New UniqueIdTrackingListener

  • More fine-grained Java Flight Recorder events

  • Java Flight Recorder support on Java 8 Update 262 or higher

  • Test class ordering

  • @TempDir can be used to create multiple temporary directories

  • Extension registration via @ExtendWith on fields and parameters

  • Auto-close support for arguments in @ParameterizedTest methods

  • Memory and performance optimizations

  • Numerous bug fixes and minor improvements

For complete details consult the 5.8.0 Release Notes online.