The Spring TestExecutionListener  1. Overview Typically, we use the JUnit annotations like @BeforeEach, @AfterEach, @BeforeAll, and @AfterAll, to orchestrate tests’ lifecycle, but sometimes that’s not enough — especially when we’re working with the Spring framework. This is where Spring TestExecutionListener comes in handy. In this tutorial, we’ll see what the… Continue Reading spring-testexecutionlistener

Unable to Find @SpringBootConfiguration with @DataJpaTest 1. Introduction In our tutorial on testing in Spring Boot, we saw how we can use the @DataJpaTest annotation. In this next tutorial, we’ll see how to resolve the error “Unable to find a @SpringBootConfiguration“. 2. Causes The @DataJpaTest annotation helps us to set up… Continue Reading spring-boot-unable-to-find-springbootconfiguration-with-datajpatest

Serenity BDD with Spring and JBehave 1. Introduction Previously, we have introduced the Serenity BDD framework. In this article, we’ll introduce how to integrate Serenity BDD with Spring. 2. Maven Dependency To enable Serenity in our Spring project, we need to add serenity-core and serenity-spring to the pom.xml: <dependency> <groupId>net.serenity-bdd</groupId>… Continue Reading serenity-spring-jbehave