Sunday, April 28, 2019

Annotate - simple yet productive screenshots tool for macOS

After switching from Windows to macOS I was looking for a simple screenshots taking tool to support my daily workflow. The built-in tools offered by macOS are not sufficient for me, mainly because of the image annotating tools and limited keyboard shortcuts support. For couple of days I used Skitch, but then I found Annotate, a light-weight and simple app with quite good keyboard shortcuts support. In this short blog post, I share how I currently work with Annotate app.

Sunday, March 24, 2019

Test Execution Order in JUnit 5

The general practices say that automated tests should be able to run independently and with no specific order as well as the result of the test should not depend on the results of previous tests. But there are situations where a specific order of test execution can be justified, especially in integration or end to end tests.

By default, in JUnit 5 the execution of test methods is repeatable between builds hence deterministic but the algorithm is intentionally non-obvious (as authors of the library state). Fortunately, execution order can be adjusted to our needs using either built-in method orderers or by creating custom ones.

Sunday, March 17, 2019

Temporary directories in JUnit 5 Tests

JUnit 4 TemporaryFolder @Rule allowed developers to create tests utilizing temporary directories. With JUnit 5, the @Rules are not supported hence testing files and directories requireds a little bit of additional work. Fortunately, with JUnit 5.4 there is a new built-in extension to handle temporary directories in tests. And it is extremely easy to use.