Skip to content

Releases: approvals/ApprovalTests.Java

SimpleLogger handles threading better for tests

26 Sep 18:44
Compare
Choose a tag to compare

By default, when you call SimpleLogger.logToString() will now create an instance of it's logger per thread. This is particular useful when running tests in Intellij.

Query.skip and Query.take

08 Sep 20:35
Compare
Choose a tag to compare

Added skip() and take() functions to Query/Queryable objects

Query.skip and Query.take

01 Sep 22:21
Compare
Choose a tag to compare

Added skip() and take() functions to Query/Queryable objects

Query.skip and Query.take

01 Sep 21:48
Compare
Choose a tag to compare

Added skip() and take() functions to Query/Queryable objects

Support for dynamic tests with new naming approach

22 Aug 18:43
Compare
Choose a tag to compare

We deprecated JupiterApprovals.dynamicTest(String displayName, Action0 action0) and want you to instead use JupiterApprovalsdynamicTest(String displayName, Action1<Options> action1) which passes back a prepopulated options.

Support for jqwik and other test frameworks using @Testable

08 Aug 19:04
Compare
Choose a tag to compare

Breaking Change

JUnit5Approvals has been renamed to JupiterApprovals.

New Feature

We now support the detection of @testable, meaning most tests that run in Junit 5 engine will be supported.

Approvals.NAMES

02 Aug 03:52
Compare
Choose a tag to compare

ExtraInformation.Approvals.txt

the old way

There is now a new way to add information to approval names. Previously the way to add additional information was

try (NamedEnvironment ne1 = NamerFactory.asOsSpecificTest()) { 
    try (NamedEnvironment ne2 = NamerFactory.asMachineNameSpecificTest()) { 
        Approvals.verify("hello, World!");
    }
} 

the new way

We now added a cleaner and more thread-safe method of passing in an Options to the additional information.

Options options = Approvals.NAMES.asOsSpecificTest().and(Approvals.NAMES::asMachineNameSpecificTest);
Approvals.verify("hello, World!", options);

We're not removing the previous way, we're simply adding the new way. In the future, we will update everything underneath to be more thread-safe.

More

We're having a new reporter for TortoiseGIT. Thank you @pfichtner

JsonJacksonApprovals

18 Jul 18:25
Compare
Choose a tag to compare

You can now use jackson to render your json or continue to use Gson.

Both of these require optional dependencies on Gson/Jackson, but these dependencies are not required if you don't use JsonApprovals or JsonJacksonApprovals.

AwtApprovals is JRE aware

06 Jul 17:19
Compare
Choose a tag to compare

Breaking change

Why

In JRE 11 the compression algorithm for png files changed. Approvals now appends either jdkPre11 or jdkPost11 to the filenames to make this distinction clear and allow for running in CI.

Who is affected

This will only affect you if you're using AwtApprovals.

Bugfix for AwtApprovals.verify(BufferedImage)

05 Jul 06:38
Compare
Choose a tag to compare

Fixes a bug where AwtApprovals.verify(BufferedImage) rendered a string instead of an image.