Introduction to Hoverfly in Java 1. Overview In this article, we’ll have a look at the Hoverfly Java library – which provides an easy way of creating real API stubs/simulations. 2. Maven Dependencies To use Hoverfly, we need to add a single Maven dependency: <dependency> <groupId>io.specto</groupId> <artifactId>hoverfly-java</artifactId> <version>0.8.1</version> </dependency> The… Continue Reading hoverfly

Optimizing Spring Integration Tests 1. Introduction In this article, we’ll have a holistic discussion about integration tests using Spring and how to optimize them. First, we’ll briefly discuss the importance of integration tests and their place in modern Software focusing on the Spring ecosystem. Later, we’ll cover multiple scenarios, focusing… Continue Reading spring-tests

DB Integration Tests with Spring Boot and Testcontainers 1. Overview Spring Data JPA provides an easy way to create database queries and test them with an embedded H2 database. But in some cases, testing on a real database is much more profitable, especially if we use provider-dependent queries. In this tutorial,… Continue Reading spring-boot-testcontainers-integration-test

Consumer Driven Contracts with Pact 1. Overview In this quick article, we’ll be looking at the concept of Consumer-Driven Contracts. We’ll be testing integration with an external REST service through a contract that we define using the Pact library. That contract can be defined by the client, then picked up… Continue Reading pact-junit-consumer-driven-contracts

Cucumber Spring Integration 1. Overview Cucumber is a very powerful testing framework written in the Ruby programming language, which follows the BDD (behavior-driven development) methodology. Its intent is to enable developers to write high-level use cases in plain text that can be verified by non-technical stakeholders, and turn them into… Continue Reading cucumber-spring-integration

Exclude Auto-Configuration Classes in Spring Boot Tests 1. Overview In this quick tutorial, we’ll discuss how to exclude auto-configuration classes from Spring Boot tests. Spring Boot’s auto-configuration feature is very handy, as it takes care of a lot of setup for us. However, this can also be an issue during… Continue Reading spring-boot-exclude-auto-configuration-test