This blog post explains what a mock is, describes how a mock works, explains how we can create mocks and use them in our automated tests, and helps us to understand when we should use mocks. Read More
Testing
This blog post describes what a stub is, explains how a stub works, describes how we can create stubs and use them in our automated tests, and helps us to understand when we should use stubs. Read More
This blog post describes how we can send POST requests to the system under test, explains how we can configure the request body of the HTTP request, and describes how we can verify that our REST API is working as expected when validation fails and when validation is successful. Read More
This blog post describes how we can ensure that the system under test returns the correct HTTP status code and verify that the system under test returns the correct information when we are writing unit tests for a Spring MVC REST API endpoint that returns a list. Read More
This blog post describes how we can ensure that the system under test returns the correct HTTP status code and verify that the system under test returns the correct information when we are writing unit tests for a Spring MVC REST API endpoint that returns the information of a single item. Read More
This blog post describes how we can configure the Spring MVC Test framework (aka MockMvc) by using the standalone configuration when we are writing unit tests for a Spring MVC REST API. Read More