Gil Zilberfeld explains how to mock API calls for integration tests

Uncategorized

Integration Testing with Spring: Consumers

We’ve been through a lot. We’ve covered all kinds of flows to be tested on the server side. We’ve seen how to check flows from the controller down to the database, combined with injecting different mocks and services. We’ve got… Continue Reading…

Gil Zilberfeld explains considerations for Spring controller integration tests

Uncategorized

Integration Testing with Spring – Controllers II

We’ve gone over what we needed from Spring to test a controller. And Spring is about to give it to us. Here’s a controller: This controller has GET and POST APIs. It has some logic in it (although this is… Continue Reading…

Gil Zilberfeld explains considerations for Spring controller integration tests

Uncategorized

Integration Testing with Spring – Controllers I

In Spring, Controllers allow external consumers to use REST APIs to call into the application logic. This is very convenient, since we don’t need to write a whole translation level. Spring controllers give us full access to the request parameters… Continue Reading…

Gil Zilberfeld explains the data integration tests in Spring

Uncategorized

Integration Testing with Spring – Data III

Hibernate and JPA have done a lot for developers in minimizing the code needed to write database applications. Spring Data does a lot of magic behind the code for us, and we’d like to take advantage of that magic. Let’s… Continue Reading…

Gil Zilberfeld explains the data integration tests in Spring

Uncategorized

Integration Testing with Spring – Data II

Today we’ll tackle JDBC options for testing in Spring. Before we start, there’s one more annotation to learn from Spring: @Repository. We put it on a class to tell Spring that this is a data class, talking to a data… Continue Reading…

Gil Zilberfeld explains the data integration tests in Spring

Uncategorized

Integration Testing with Spring – Data I

We’ve discussed what Spring can do for us in terms of integration tests so far, but nothing says more integration than database integration. First, let’s define what we want in our integration tests, before we describe how the wonderful people… Continue Reading…

Gil Zilberfeld explains how to using mocking in Spring integration tests

Uncategorized

Integration Testing with Spring – Mocking III

Mocking in Spring is very useful in testing scenarios. This post is about the MockBean capabilities of Spring.

Gil Zilberfeld explains how to using mocking in Spring integration tests

Uncategorized

Integration Testing with Spring – Mocking II

Mocking in Spring is very helpful in testing scenarios. It allows you to inject mocks of beans, database connections and APIs.

Gil Zilberfeld explains how to using mocking in Spring integration tests

Uncategorized

Integration Testing with Spring – Mocking I

Mocking in Spring is very helpful in testing scenarios. It allows you to inject mocks of beans, database connections and APIs.

Gil Zilberfeld explains Spring files and how they relate to integration tests

Uncategorized

Integration Testing with Spring – Profiles

Profiles in Spring is very helpful in testing scenarios. You can run the same test under different profiles.