Testing Microservices with REST Assured

Testing and validating REST services in Java is harder than in dynamic languages such as Ruby and Groovy. REST Assured is an open source software testing tool that brings the simplicity of using these languages into the Java domain. REST Assured supports any HTTP method but has explicit support for POST, GET, PUT, DELETE, OPTIONS, PATCH and HEAD and includes specifying and validating e.g. parameters, headers, cookies and body easily. REST-assured is a 100% java REST testing solution that integrates nicely with other tools such as JUnit.

As the number of microservices in our application landscape grows, we’d better make sure they are tested really well! There are multiple approaches to testing microservices. Unit tests help, but if we want to test a microservice as a whole, we’ll have to use integration testing. This talk presents REST-assured, a framework using a Java DSL, to test against the REST interface of a microservice. I will also show how this compares with other solutions, for example Cucumber in combination with custom glue code, and Spring integration tests.

Video producer: http://www.jbcnconf.com/