ReleaseNotes33

Johan Haleby edited this page Jan 11, 2019 · 1 revision

Release Notes for REST Assured 3.3.0

Contents

  1. Highlights
  2. Minor Changes

Highlights

  • Added io.restassured.mapper.TypeRef class that allows one to deserialize a response to a container with generic type. For example:

    List<Map<String, Object>> products = get("/products").as(new TypeRef<List<Map<String, Object>>>() {});

    Note that currently this only works for JSON :(

  • Added a artifact called rest-assured-all that can be used if you run into issues with split packages in Java 9+. If so exclude the rest-assured dependency from you build script and instead add (maven example):

    <dependency>
       <groupId>io.rest-assured</groupId>
       <artifactId>rest-assured-all</artifactId>
       <version>3.3.0</version>
       <scope>test</scope>
    </dependency>

    Thanks to Tomasz Gaweda for pull request.

  • Introduces custom listeners on test validation failures. This makes it possible to hook into Rest Assured and get a callback when the test fails with full access to the request/response specification as well as the response. You can do this by implementing the ResponseValidationFailureListener and add it to the new FailureConfig. For example:

    given().config(RestAssured.config().failureConfig(failureConfig().with().failureListeners((requestSpec, responseSpec, response) -> log.info("Rest Assured validation failed!")).when(). ..
    

    (issue 1093) (thanks to Daniel Dyląg for pull request).

Minor changes

See change log for more details.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.