45: Johan Haleby: Getting Started Testing with Rest-Assured
with Rest-Assured
About this episode
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.
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!
Rest-Assured Resources
- 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
Keep listening
Related episodes

Automation Testing Podcast · Ep. 609
Why Your AI Tests Pass When Your Features Fail with Donovan Brady
with Donovan Brady
Why Your AI Tests Pass When Your Features Fail? Donovan Brady of Leapwork shows how to make
Oct 27

Automation Testing Podcast · Ep. 608
Scary Test Automation POCs Made Easy: Halloween Special With Paul Grossman
with Paul Grossman
Running a proof of concept on test automation tools can feel like a horror movie. Vendors promise
Oct 20

Automation Testing Podcast · Ep. 607
Locust and Azure Load Testing: Create and Debug Load Tests with AI with Lars Holmberg and Abhinav Premsekhar
with Lars Holmberg and Abhinav Premsekhar
Performance testing has never been easier to start, or more important to get right. As teams ship
Oct 6

Automation Testing Podcast · Ep. 606
AI Agents Passed the Tests. Real Devices Didn’t. with Nick Metcalfe
with Nick Metcalfe
Cloud device farms make it easy to get started with real device testing. But what happens when
Sep 29