ReleaseNotes29

Johan Haleby edited this page Mar 12, 2016 · 9 revisions

Release Notes for REST Assured 2.9.0

This is a maintenance release but it contains some backward incompatible changes.

Contents

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

Highlights

  • Major improvements of certificate authentication. You can now use a keystore (without truststore) and a keystore and truststore at the same time (see non-backward compatible changes).

Non-backward compatible changes

  • Automatically escapes JsonPath and XmlPath fragments that contains a hyphen and an index lookup operator. For example consider the following JSON document:

{ "some-list" : ["one", "two"] }

Previously you had to escape `some-list` manually if you wanted to get first element out of the list:
```javascript
JsonPath jsonPath = ...
String firstElement = jsonPath.getString("'some-list'[0]"); // one

Now no explicit escaping is necessary:

String firstElement = jsonPath.getString("some-list[0]"); // one

But this means that if you previously had a JSON document like this:

{ "some-list[0]" : ["one", "two"] }

you would now have to escape it:

String firstElement = jsonPath.getString("'some-list[0]'[0]"); // one

which makes this an (unlikely but still) non-backward compatible change (issue 564).

  • Getting an attribute value from an XmlPath expression that doesn't exists now returns null instead of an empty list (issue #650).
  • Keystore was previously used as a truststore. You must change given().keystore(..) to given().trustStore(..), RestAssured.keystore(..) to RestAssured.trustStore(..) and SSLConfig.keystore(..) to SSLConfig.trustStore(..). Sorry!

Deprecations

Minor changes

  • Added support for composing a Hamcrest matcher with a ResponseAwareMatcher when using a ResponseAwareMatcherComposer
  • Added support for multipart DELETE requests (issue 634)
  • It's now possible to use empty and whitespace path parameters (issue 631)
  • Fixing NullPointerException for GET requests with an empty body (issue 642)
  • Form authentication for fully-qualified URIs now uses the URI specified in the request instead of just localhost (issue 641)
  • Improve escaping for XmlPath's containing colon. For example you can now do like this without manually having to escape anything in the path: x:something.x:y[0] (issue 647)

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.