ReleaseNotes28

Johan Haleby edited this page Dec 18, 2015 · 12 revisions

Release Notes for REST Assured 2.8.0

Contents

  1. Highlights
  2. Non-backward compatible changes
  3. Deprecations
  4. Minor Changes

Highlights

  • Added support for measuring response time. For example:

    long timeInMs = get("/lotto").time()

    or using a specific time unit:

    long timeInSeconds = get("/lotto").timeIn(SECONDS);

    where SECONDS is just a standard TimeUnit. You can also validate it using the validation DSL:

    when().
            get("/lotto").
    then().
            time(lessThan(2000L)); // Milliseconds

    or

    when().
            get("/lotto").
    then().
            time(lessThan(2L), SECONDS);

    Please note that response time measurement should be performed when the JVM is hot! (i.e. running a response time measurement when only running a single test will yield erroneous results). This is also implemented in the Spring MockMvc module.

  • Lot's of improvements to filters.
    • It's now possible to change the request path from a filter, use the FilterableRequestSpecification#path method.
    • Added ability to remove parameters from the FilterableRequestSpecification. Use the remove methods such as removeQueryParam.
    • Filters can add and remove path parameters as well as getting undefined path parameter placeholders etc (see javadoc for the methods in com.jayway.restassured.specification.FilterableRequestSpecification)
  • Improvements to path parameters. You can now combine unnamed and name path parameters in the same request. Also the error messages are improved when unnamed path parameters are null.

Non-backward compatible changes

Deprecations

Minor changes

See change log for more details.