Code Monkey home page Code Monkey logo

fast-tests-spring-boot-flyway's Introduction

Fast, Reliable Integration Tests with Spring Boot and Flyway

This sample project shows different ways to set up reliable integration tests with Spring Boot, Flyway, and Testcontainers. All other technologies used (JDBC, PostgreSQL, JUnit 5) are interchangeable: Using, for example, Hibernate, MariaDB, and TestNG is possible with the same techniques.

All approaches guarantee that all test cases are independent (start with a fresh database) and do not hide errors (like database rollbacks). Furthermore, the test classes can be executed concurrently1 to take advantage of multicore processors. What varies, however, is their execution speed and how much custom plumbing is necessary.

The performance numbers are indicative. They depend on your hardware and the specifics of your project, for example, the number of Flyway migrations.

Footnotes

  1. The project relies on Gradle's parallel test execution because it uses process isolation to run the tests concurrently. This ensures that tests that run simultaneously do not interfere with each other while keeping the number of running PostgreSQL containers at a reasonable number (one PostgreSQL container per worker process). โ†ฉ

fast-tests-spring-boot-flyway's People

Contributors

aahlenst avatar dependabot[bot] avatar renovate[bot] avatar

Watchers

 avatar  avatar

fast-tests-spring-boot-flyway's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

docker-compose
docker-compose.yml
  • postgres 16.2
github-actions
.github/workflows/check.yml
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
  • gradle/actions v3
  • actions/setup-java v4
gradle
settings.gradle
build.gradle
  • org.springframework.boot 3.2.5
  • io.spring.dependency-management 1.1.4
  • com.bmuschko.docker-remote-api 9.4.0
  • org.testcontainers:testcontainers-bom 1.19.7
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.7

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.