Unit Testing

Introduction to Spies

When we are writing automated tests for our code, often we notice that it's not possible to invoke the real dependencies of the system under test. The problem might be that: The problematic dependency invokes an external API which cannot be accessed from our test environment. We cannot invoke the real dependency because invoking it […] Read more

Introduction to Dummies

When we are writing automated tests for our code, often we notice that it's not possible to invoke the real dependencies of the system under test. The problem might be that: The problematic dependency invokes an external API which cannot be accessed from our test environment. We cannot invoke the real dependency because invoking it […] Read more

Introduction to Fakes

When we are writing automated tests for our code, often we notice that it's not possible to invoke the real dependencies of the system under test. The problem might be that: The problematic dependency invokes an external API which cannot be accessed from our test environment. We cannot invoke the real dependency because invoking it […] Read more

Introduction to Mocks

When we are writing automated tests for our code, often we notice that it's not possible to invoke the real dependencies of the system under test. The problem might be that: The problematic dependency invokes an external API which cannot be accessed from our test environment. We cannot invoke the real dependency because invoking it […] Read more

Introduction to Stubs

When we are writing automated tests for our code, often we notice that it's not possible to invoke the real dependencies of the system under test. The problem might be that: The problematic dependency invokes an external API which cannot be accessed from our test environment. We cannot invoke the real dependency because invoking it […] Read more

JUnit 5 Tutorial: Running Unit Tests With Gradle

This blog post describes how we can create a Gradle project that can compile and run unit tests which use JUnit 5. After we have finished this blog post, we: Can get the required dependencies with Gradle Understand how we can use the Gradle's native JUnit 5 support. Can run our unit tests with Gradle. […] Read more