Spring Web Services

Exercise: Todo REST Service Testing

The objective of this exercise is to implement different tests for the RESTful todo web service.

Assignment

  1. Add the Spring starter spring-boot-starter-test and the REST-assured library io.rest-assured:rest-assured to the Maven project
  2. Add an SQL file data.sql that inserts some test data into the H2 database and set the application property spring.jpa.defer-datasource-initialization to true
  3. Implement integration tests of the todo web service using
  4. Configure the Maven Failsafe plugin to run the integration tests

Solution