- September 28, 2017

As assertions are at the heart of any testing strategy, we decided to encourage users to make the most of them. This is why we’ve been working on a new engine in Restlet Client that automatically suggests assertions for test requests. The suggestion engine is context aware, meaning it will only suggest assertions that are appropriate for what you are doing.

Let’s illustrate the concept with some use cases:

1) You’ve just created a request. No assertions are defined. 

Now, in one click on a suggestion, you can define what you expect from the response before launching the request.

2) Another example is when you define a request header such as Accept. Then a new suggestion appears:

Hopefully, you’ll want to use more assertions to test the expected response, for example, checking the response content:


By the way, do you recognize the syntax for the name attribute? You guessed it, JSON Path! Don’t worry if you don’t know JSON Path, we’ve got you covered:


A dedicated page about JSON Path is one click away, here is a preview:

See the complete JSONPath and XPath reference on our use guide.

So, ready to rock some assertions?

Well, one more thing…

Writing an assertion for a response header has never been so easy thanks to the autocompletion feature that takes into account the last response received.

We hope these improvements will make asserting a lot easier and faster.

By the way, if you have any other ideas for suggested assertions, don’t hesitate to share them with us.

Live long and assert. 🖖


  • Oliver

    Is there any way the Restlet Client (or Maven) would not stop on a failed assertion and continute the tests?
    Let’s say I want to check if there are 20 items present in a JSON response and want to know about all those that are missing. Not just the first one and then change the whole test or wait until the programmers fix the 1st problem, but make them fix all the problems at once. Thanks