Tomorrow the yearly Dutch Software Engineering Conference J-Fall opens its doors at 08.00 am (for the early birds ;-))
A great event to get inspired with the latest technologies and to meet/greet Software Engineering professionals, geeks and gurus.
Such as our colleague Michel Schudel! Who will present a session on REST:
Subject: Easy REST API testing with REST-Assured
Location: Zaal 7
As the number of REST based services in our application landscape grows, we better make sure they are tested really well! There are multiple approaches to testing REST APIs.
Unit testing helps, but if we want to test a service as a whole, we have to use integration or component testing.
In this session, Michel Schudel uses REST-Assured, an small REST testing library using a Java DSL, to test against the REST interface of a service. REST-Assured is a 100% java REST testing solution that integrates nicely with other tools such as JUnit and Spring / SpringBoot, which Michel will show in a live coding demo.
REST-Assured is an awesome library that everyone working on REST heavy application architectures should have in their toolkit!
We started out with REST-Assured after fiddling with SoapUI, Postman and using Cucumber + custom glue code. We discovered that REST-assured made things much easier for us.
It provides a human-readable, concise way to write tests for your REST API. REST-Assured uses GPath and groovy closures under the hood so it’s really easy to perform asserts on responses.
During the coding session, Michel uses an existing service (a service for retrieving and storing Java Conferences) to test against. He will demo the following:
– Basic GET request
– Assertions using GPath, JsonPath and XPath
– Adding Logging
– Query parameters and form parameters
– Posting stuff
– Extracting parts from the responses
– Using specBuilders to reuse request setups
– Handling authenticated services
– Tweaking the default settings of the library
– Integration with SpringBoot
– Integration with traditional Spring applications
– Using WireMock to stub out dependencies to other services
For all of you attending J-Fall: enjoy!