Changelog
May 26, 2026 · View on GitHub
Changelog for the selfie JVM libraries.
com.diffplug.selfie:selfie-lib:VERSIONcom.diffplug.selfie:selfie-runner-junit5:VERSION- can be used with JUnit4 via junit-vintage
- works with Kotest JVM
com.diffplug.selfie:selfie-runner-kotest:VERSION- written in Kotlin Multiplatform The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
[3.1.1] - 2026-05-26
Fixed
ArrayMapno longer throwsNumberFormatExceptionfor test case names containing very large numbers. (#577)
[3.1.0] - 2026-05-09
Added
SelfieSettingsAPInow has overridabletestAnnotationsandtestSuperclassesproperties which allow users with custom composed annotations or Spec-like base classes to register them. (#573)
[3.0.0] - 2026-03-02
Changed
- BREAKING Bumped Kotest from
5.xto6.x. If you need Kotest5.xcompatibility, stick with2.5.5. (#559)- This breaking change only affects Kotest users.
- As part of the Kotest
6.xmigration, yourAbstractProjectConfigmust either have the fully qualified name ofio.kotest.provided.ProjectConfigor the system propertykotest.framework.config.fqnmust be set. See Kotest docs for more info. - The breaking changes are only within
selfie-runner-kotest. So if you are stuck on Kotest5.xbut want some feature or bugfix only available in a3.xversion of Selfie, you can probably get it by grabbing the latest Selfie but using2.5.5for theselfie-runner-kotestartifact. But in the long-term, we recommend using the latest supported version of all dependencies.
[2.5.5] - 2025-11-22
Fixed
SnapshotFileLayoutnow computes root folder lazily. (#557 partial fix for #551)- Allows parallel Maven execution with surefire and failsafe plugins with
forkCountgreater than one, but it only works ifreuseForksset tofalse.
- Allows parallel Maven execution with surefire and failsafe plugins with
[2.5.4] - 2025-09-12
Fixed
- Unsupported test sources (such as
FieldSource) no longer cause the JUnit5 runner to crash. (#550 fixes #549)
Changed
- Bump minimum required Kotest from
5.4.0to5.6.0(#535)- required to fix
java.lang.NoSuchMethodError: 'long kotlin.time.Duration$Companion.milliseconds-UwyO8pc(long)'
- required to fix
[2.5.3] - 2025-05-21
Fixed
- Restore support for JRE 11. (fixes #528)
- snapshots created by
junit.jupiter.api.TestFactoryare no longer garbage-collected (#534) - support parallel testing under
junit.jupiter.execution.parallel.enabled=true(#534)
[2.5.2] - 2025-04-28
Fixed
- Off-by-one in the error message for a VCR key mismatch. (#526)
- Fix
StringIndexOutOfBoundsExceptionwhen an empty snapshot had a facet added. (fixes #529) - Fix
ClassCastExceptionwhen multiple nested test cases need to update snapshot. (fixes #531)
[2.5.1] - 2025-03-04
Fixed
- Selfie VCR is now out of beta, no opt-in required. (#525)
- ArrayMap now sorts strings with multi-digit numbers as
1 2 ... 9 10 11instead of1 11 2 .... - Improved VCR-specific error messages for determining why
//selfieoncemight not be working for a test rule. - Fixed some bugs in VCR data storage (specifically concurrency and multiple frames).
- ArrayMap now sorts strings with multi-digit numbers as
[2.5.0] - 2025-02-21
Added
- Added an entrypoint
Selfie.vcrTestLocator()for the newVcrSelfieclass for snapshotting and replaying network traffic. (#517)
Fixed
- Fixed a bug when saving facets containing keys with the
]character (#518)
[2.4.2] - 2025-01-01
Fixed
- A single leading space (such as in the copyright header) should not override an otherwise 100% tab-indented file. (#506)
[2.4.1] - 2024-10-07
Fixed
- Multiline
toBeassertions (introduced in2.1.0for Java pre-15) were not throwing exceptions on snapshot mismatch, now fixed. (#479)
[2.4.0] - 2024-10-01
Added
- Snapshot mismatch error messages now show a diff of the first mismatched line. (#477)
- before
Snapshot mismatch - update this snapshot by adding `_TODO` to the function name - update all snapshots in this file by adding `//selfieonce` or `//SELFIEWRITE` - after
Snapshot mismatch at L7:C9 -Testing 123 +Testing ABC ‣ update this snapshot by adding `_TODO` to the function name ‣ update all snapshots in this file by adding `//selfieonce` or `//SELFIEWRITE`
- before
[2.3.0] - 2024-07-11
Added
DiskSelfienow makes theSnapshot actualvalue public, so that other testing infrastructure can read from snapshotted values. (#467)
Fixed
cacheSelfiewas missing@JvmOverloadson the methods with default arguments. (#425)
[2.2.1] - 2024-06-05
Fixed
- Added
Selfie.expectSelfies(Iterable<T> items, Function<T, String> toString)for doing easy "multi-asserts" insuspend funalso. (#421)
[2.2.0] - 2024-06-04
Added
SelfieSettingsAPInow has a fieldjavaDontUseTripleQuoteLiteralswhich ensures that multiline strings are always encoded as"strings. (#417)
[2.1.0] - 2024-06-03
Added
- Added
Selfie.expectSelfies(Iterable<T> items, Function<T, String> toString)for doing easy "multi-asserts". (#416) - For java versions which don't support multiline string literals, we now encode multiline strings like so: (#406)
-
toBe("line1", "line2", "line3");
-
Changed
- Bump Kotlin to 2.0.0. (#405)
Fixed
- Do not remove stale snapshot files when readonly is true. (#367)
- Provide more debugging info when a snapshot gets set multiple times. (helps with #370)
[2.0.2] - 2024-03-20
Fixed
toBeFilenow checks for duplicate writes and throws a more helpful error message if the file doesn't exist. (#277)
[2.0.1] - 2024-02-24
Fixed
- The
coroutinesmethods used to eagerly throw an exception if they were ever called from anywhere besides a Kotest method. Now they wait untiltoMatchDisk()is called, because they can work just fine anywhere if you usetoBe. (#247)
[2.0.0] - 2024-02-21
Added
- Memoization (#219 implements #215)
- like
expectSelfie, all are available asSelfie.cacheSelfieor assuspend funincom.diffplug.selfie.coroutines.
- like
val cachedResult: ByteArray = Selfie.cacheSelfieBinary { dalleJpeg() }.toBeFile("example.jpg")
val cachedResult: String = Selfie.cacheSelfie { someString() }.toBe("what it was earlier")
val cachedResult: T = Selfie.cacheSelfieJson { anyKotlinxSerializable() }.toBe("""{"key": "value"}""")
val cachedResult: T = Selfie.cacheSelfieBinarySerializable { anyJavaIoSerializable() }.toMatchDisk()
toBeBase64andtoBeFilefor true binary comparison of binary snapshots and facets. (#224)- spaces in multiline string literals aren't always escaped. (#220)
- if the leading spaces in the string literal match the file's existing indentation
Changed
- BREAKING reordered a class hierarchy for better binary support. (#221)
- most users won't need to make any changes at all
- only exception is that
expectSelfie(byte[]).toBeis now a compile error, must dotoBeBase64
[1.2.0] - 2024-02-12
Added
- Kotest support.
- Add
SelfieExtensionto yourAbstractProjectConfig. - Instead of calling
Selfie.expectSelfie, callcom.diffplug.selfie.coroutines.expectSelfie. selfie-runner-junit5supports snapshots in regular JUnit tests and Kotest tests in the same project.selfie-runner-kotestis a new selfie implemented in Kotlin Multiplatform, but doesn't support snapshots within regular JUnit tests.- Full docs at https://selfie.dev/jvm/kotest.
- Add
Fixed
- Swap thread-local cache for thread-ignorant LRU to improve performance when used with coroutines. (#191)
Changes
- (no user-facing changes) replaced terrible platform-specific
PathwithTypedPath. (#184) - (no user-facing changes) replaced
SnapshotStoragewithSnapshotSystem+DiskStorage. (#198) - (no user-facing changes) replaced most
synchronizedwith CAS. (#199)
[1.1.2] - 2024-01-30
Fixed
@ParameterizedTestno longer has. (#140)- If a test class contained package-private methods and a single test method was run without the others, selfie would erroneously garbage collect disk snapshots for the other methods, now fixed. (#175 fixes #174)
[1.1.1] - 2024-01-25
Fixed
- Selfie was erroneously garbage collecting snapshots when a test class contained no
@Test publicmethods. (#124 fixes #123)
[1.1.0] - 2024-01-21
Added
- Support for
@ParameterizedTest. (#118) ArraySet<K>has been added to the standard library alongsideArrayMap<K, V>. (#119)- These have the strange property that if the key is
String, then/characters are sorted to be the lowest possible character.
- These have the strange property that if the key is
Fixed
- We already smuggle errors from initialization to help debug them, and now we also smuggle errors that happen during test execution. (#117)
- Fix a garbage collection bug which occurred when a test method's name was a prefix of another test method's name. (#119)
[1.0.1] - 2024-01-19
Fixed
- Fix
CompoundLensfor Java users.
[1.0.0] - 2024-01-18
Added
- Full support for binary snapshots. (#108)
Fixed
- Groovy multiline string values just go into
"strings instead of"""until we have a chance to implement them properly. (#107)
[0.3.0] - 2024-01-17
Added
toBe("mismatched")now gets rewritten in write mode- fully implemented the new control scheme (#74)
- integers get
_separators for thousands, millions, etc
Known broken
- Groovy multiline strings
- Binary
[0.2.0] - 2023-12-27
Added
DiskSelfie.toMatchDisknow returnsDiskSelfieso that we can fluently chain inline assertions on facets.
[0.1.3] - 2023-12-26
- Publish
selfie-lib-jvmandselfie-libto Maven Central.
[0.1.2] - 2023-12-26
- Publish
selfie-lib-jvminstead of justselfie-libto Maven Central.
[0.1.1] - 2023-12-24
- Initial release, take 2.
[0.1.0] - 2023-12-24
- Initial release.