posted 4 months ago
I am writing cucumber tests in my Spring Boot project, I need to create a H2 (in-memory database) first. Then, the cucumber step definitions will use data from the database to validate if my application is working.
The problem that I am having is that the H2 database is not being created in the first place.
Here is the database section of my application.yml:
My cucumber tests are stored in src/integTest/acceptTests.
I have a couple of SQL files to create & populate the H2 database: schema.sql & data.sql. These are stored in src/integTest/resources
I think, by default Spring looks for these files in src/main/resources, but I need to somehow point them to the integTest/resources via my application.yml
Does anyone have any suggestions on what changes I need to make in order to do this?
I can post further code if it is required.
Thanks in advance for any feedback!