Skip to content

Integration Testing

Saagar Arya edited this page Nov 12, 2021 · 2 revisions

In order to implement integration testing, we decided to try to run each of our CREATE, UPDATE, and DELETE RESTful endpoints in one big collection.

We have created a gradle build task called integrationTests, which can be run via gradle integrationTests while in the LibrarySystem-Backend folder. The output of each method is printed out to the terminal window.

The tests can also be run locally (not in browser) from our Postman collection, by importing this link into the Postman application. These also automatically verify that the output is correct. A sample of the output can be found here in json form.

In both cases, the application must be running on the local computer, as each endpoint uses LocalHost:8080. The tests must also be run in a fresh / empty database, to ensure there is no conflicting information such as the admin's password and username, or already implemented library hours.