Light Air RESTful back-end sample project.
Demonstrates using Light Air to write system / integration tests for a RESTful backend using a database.
This sample backend implements the functionality of a sample FSD for an imaginary Ordering system.
- Java 8
- Spring Boot 2.2.2
- REST: Spring Web MVC REST controllers
- ORM: JPA / Hibernate
- Connection pool: Hikari
- DB migrations: Flyway
- DB: PostgreSQL
- DB tests: Light Air
To build the application uber-JAR:
./mvnw clean install
The uber-JAR is then created at target/lightair-spring-sample-0.0.1-SNAPSHOT.jar
.
To run the application from sources:
./mvnw -Pdb,run
Then press CTRL-C
to stop the application.
While the app is running, you can execute individual Integration tests.
To re-create the database tables after a new migration has been introduced:
./mvnw -Pdb,recreate-db
To execute all Integration tests:
./mvnw -Pdb,it