How to test database records using Flyway in spring framewrok using in-memory Database
Testing Database using Flyway migration library.
Testing your data base without touching Your original data by using an in-memory Database such as Embedded PostgreSQL, also using flyway to migrate the SQL script to the databases, by this way you are guaranteeing the integrity of your data inside your production or your main database, that is because all of your tests are going to be in-memory database.
In this video I am explaining the concept of using in-memory database to test your Data Access Object DAO, I have explained according to my current experience and knowledge, hope it will be benefits for you.
Library used;
- Spring core - Spring Beans
- Spring context - Spring JDBC
- Spring test -PG Embedded
- Flyway
Find the Project on GitHub
https://github.com/JAVA-MSDT/FlywayDatabaseTest