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

Writing Unit Tests for a Spring MVC REST API: Writing Data

The previous parts of my Spring MVC Test tutorial described how you we can write unit tests for a Spring MVC REST API when the system under test returns the information of a single item or returns a list. In other words, now we know how we can write unit tests for Spring MVC controllers […] Read more