REST Assured 2.8.0
Highlights
Section titled “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
SECONDSis just a standardTimeUnit. You can also validate it using the validation DSL:when().get("/lotto").then().time(lessThan(2000L)); // Millisecondsor
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
Section titled “Non-backward compatible changes”- FilterableRequestSpecification#getPathParams now returns now returns both unnamed and named path parameters (before only named parameters were returned).
Deprecations
Section titled “Deprecations”- FilterContext#getRequestMethod, use FilterableRequestSpecification#getMethod instead.
- FilterContext#getRequestPath, use FilterableRequestSpecification#getUserDefinedPath instead.
- FilterContext#getRequestURI, use FilterableRequestSpecification#getURI instead.
- FilterContext#getOriginalRequestPath, use FilterableRequestSpecification#getUserDefinedPath instead.
- FilterableRequestSpecification#getRequestContentType, use FilterableRequestSpecification#getContentType instead.
Minor changes
Section titled “Minor changes”See change log for more details.

