For the past few years, I’ve been trying to promote the idea that not every automation test should be a UI test, and have been focusing more on the types of tests that can be performed below the UI, like API testing. With the rise of the Internet of Things, this type of headless testing is only going to become more popular.
One of the tools I use all the time for REST-based API testing is rest-assured. In this episode, we’ll talk to the creator of the open-source tool’s REST-Assured, Power Mock and Awaitility, Johan Haleby.
About Johan Haleby Rest-Assured
Johan has a profound interest in software engineering and constantly try to keep up with the latest technologies. He is particularly interested in software architecture, testing, domain driven design, and scalable systems and open source. In his spare time, he keeps himself busy with reading software related books, papers, and articles.
He’s also founded several successful open source projects such as PowerMock (a Java framework for “mocking the impossible”), REST Assured and Awaitility. Johan is a frequent speaker at user groups, companies and conferences such as Öredev, Jazoon, Devoxx, and JFokus.
Quotes & Insights from this Test Talk with About Johan Haleby Rest-Assured
- Jayway is a Swedish consulting company
- Rest-assured is a fluent Java library that you can use to test HTTP based REST services. It was designed with testing in mind.
- Rest-assured uses an easy to use specification like Given, When, Then syntax.
- Easy to configure
- Implemented with both Java and Groovy
- The Rest-assured API is created to make it so you don’t need to be an expert with HTTP.
- JSON is more compact then XM and simpler to read than XML
- One of the cool things about Rest-assured is that it used GPath and Groovy under the covers and Groovy has great support for parsing documents.
- Groovy uses basically the same syntax to parse JSON, XML or HTML
- One of the functionality that most people are not aware of is that REST-assured is made up of three separate projects. So you can use XmlPath standalone without depending on REST-assured.
- Much, much more!
- Domain-Driven Design: Tackling Complexity in the Heart of Software
- Growing Object-Oriented Software, Guided by Tests
- Rest-Assured – Testing and validating REST services in Java is harder than in dynamic languages such as Ruby and Groovy. REST Assured brings the simplicity of using these languages into the Java domain.
- PowerMock – is a framework that extends other mock libraries such as EasyMock with more powerful capabilities.
- Awaitility – is a DSL that allows you to express expectations of an asynchronous system in a concise and easy to read manner.
- VIDEO GeeCON 2014 Rest-Assured Demo
Connect with Johan about Rest-Assured
May I Ask You For a Favor?
Thanks again for listening to the show. If it has helped you in any way, shape or form, please share it using the social media buttons you see on the page.
Additionally, reviews for the podcast on iTunes are extremely helpful and greatly appreciated! They do matter in the rankings of the show and I read each and every one of them.