Testing Reactive input adapters
Our testing efforts started on the Domain hexagon by unit testing the core system components. Then, we moved on to the Application hexagon, where we could test the use cases using behavior driven design techniques. Now that we have implemented Reactive REST endpoints on the Framework hexagon, we need to find a way to test them.
Fortunately, Quarkus is well equipped when it comes to endpoint testing. To get started, we need the following dependency:
<dependencies> <dependency> <groupId>io.rest-assured</groupId> <artifactId>rest-assured</artifactId> <scope>test</scope> </dependency> </dependencies>
The rest-assured
dependency allows us to test HTTP endpoints. It provides an intuitive library that's very useful for making requests and extracting responses from HTTP calls.
To see how...