Testing

Testing

Testing in agile software development is crucial in assuring quality is delivered. Well defined testing strategies and high-level of automation make continuous delivery a reality.
Jul
17
Change the test display names in JUnit 5

Change the test display names in JUnit 5

Test names usually tend to become very long and difficult to read. JUnit5 allows us to set custom test display names, different from the test method names.
3 min read
Jul
09
Testing for exceptions in JUnit 5

Testing for exceptions in JUnit 5

Testing for exceptions in JUnit has never been a very straightforward thing. I've often seen it mangled, misused or not well executed, especially in JUnit 4.
2 min read
Jul
01
Running tests in parallel with JUnit 5

Running tests in parallel with JUnit 5

Before JUnit 5 running tests in parallel was not easy. Luckily, now we have JUnit 5, and it has the possibility of running tests in parallel out of the box.
4 min read
Jun
18
Dynamic tests in JUnit 5

Dynamic tests in JUnit 5

Although not a novelty concept, dynamic tests in the current form were introduced in JUnit 5. The main point of dynamic tests is to demonstrate that users can can generate tests dynamically, at runtime.
2 min read
Apr
26
Joining JaCoCo JUnit Reports with Gradle

Joining JaCoCo JUnit Reports with Gradle

One issue that I ran into when generating JaCoCo reports is that I would get different reports for each of my test tasks. What I needed was to join the reports and get a single report for the overall test coverage of my code.
2 min read
Apr
17
JUnit test coverage reports using Gradle and JaCoCo

JUnit test coverage reports using Gradle and JaCoCo

JaCoCo is one the most used tools for generating coverage reports for JUnit tests. One of the reasons for it being so used is it's seamless integration with tools like Jenkins, SonarQube, Maven and Gradle.
2 min read
Apr
12
Running JUnit 5 tests with Gradle

Running JUnit 5 tests with Gradle

With Gradle, very little comes out of the box and a lot of the filtering and configuration you need to do on your own. That can be confusing at first especially as a beginner and even more so if you are accustomed to Maven.
4 min read
May
10
Mock final classes with Mockito

Mock final classes with Mockito

[https://i2.wp.com/igorski.co/wp-content/uploads/2018/05/Mockit-Junit-5-1.png] One of the standard Mockito related questions I’
2 min read
Apr
28
Using Mockito with JUnit 5

Using Mockito with JUnit 5

Since version2.16.3 [https://github.com/mockito/mockito/pull/1221]Mockito has official support for Junit5. Using Mockito with
1 min read
Apr
07
JUnit 5 extension model

JUnit 5 extension model

JUnit 4 extension model is a bit scary. You have @Rule, @ClassRule, and different Runner implementations. Very often you need
3 min read
Mastodon