Skip to content

Conversation

@renovate
Copy link

@renovate renovate bot commented Mar 16, 2023

This PR contains the following updates:

Package Change Age Confidence
io.rest-assured:rest-assured (source) 3.0.0 -> 3.3.0 age confidence

Release Notes

rest-assured/rest-assured (io.rest-assured:rest-assured)

v3.3.0

  • Upgraded json-schema-validator from version 2.2.6 to 2.2.10 (thanks to thorin for pull request)

  • Added io.restassured.mapper.TypeRef class that allows you to deserialize the response to a container with generic type. For example:
    List<Map<String, Object>> products = get("/products").as(new TypeRef<List<Map<String, Object>>>() {});
    Currently this only works for JSON :(

  • Add logging functionality to the ResponseSpecBuilder, i.e. you can now do:
    ResponseSpecification spec = new ResponseSpecBuilder().log(LogDetail.ALL).build();
    (issue 579). Thanks to Aleksandr Podkutin for pull request!

  • httpmime dependency is updated to version 4.5.3 and is now consistent with httpclient (thanks to Rüdiger Herrmann for pull request).

  • Updated commons-fileupload from 1.3.1 to 1.3.3 to fix security issues

  • Added a new artifact, rest-assured-all, which you can depend on instead of rest-assured to avoid split packages in Java 9+. (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 "io.restassured.listener.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).

v3.2.0

  • Added OSGi support (thanks to ponziani for pull request)
  • Make it clear that junit is only a test scope dependency (thanks to Eric Pabst for pull request)
  • Changed MockMvcParamConfig.attributeUpdateStrategy() to actually return the attributeUpdateStrategy and not the formParamsUpdateStrategy.
  • Added a spring-web-test-client module which let's you unit test Spring Webflux Controllers using the REST Assured DSL. Depend on artifact id "spring-web-test-client" using group id "io.rest-assured" from Maven to use it. Then use io.restassured.module.webtestclient.RestAssuredWebTestClient to get started (thanks to Olga Maciaszek-Sharma for pull request)
  • Upgraded to from Groovy 2.4.12 to 2.4.15
  • Upgraded Scala from version 2.11.12 to 2.12.7, this also means that the Scala support module now requires Java 8.
  • Rest Assured now requires Java 6 (previously Java 5 was required).
  • Moved XmlAssertion from io.restassured.assertion package to io.restassured.internal.path.xml since it's an internal class (issue 1051)

v3.1.1

  • Ensure RequestSpecBuilder picks up static config (issue 1012). (thanks to Peter Major for pull request)
  • Support multiple 'Set-Cookie' headers in a response (issue 1016). (thanks to runtarinn for pull request)
  • Fixed OAuth 1 for GET requests (thanks to Corneliu Duplachi for pull request)
  • Add detailed cookie matching to RequestSpecBuilder (thanks to Peter Major for pull request)
  • Add File Size to InputStreamEntity (issue 988) (thanks to vjykumar for pull request)
  • Properly encodes JSON from InputStream (issue 1040) (thanks to Maksymilian Pawlak for pull request)
  • Implemented ability to add headers to a multipart using the MultiPartSpecBuilder

v3.1.0

  • Fixed generics handling of the detailed cookie matcher (thanks to Rafał Siwiec for pull request)

  • Now using Type instead of Class in the API for mapping to Java Objects. For users of the REST Assured API the change is most prominent in the
    "ResponseBodyExtractionOptions" interface where the "as" method now takes a "java.lang.Type" instead of "java.lang.Class". This should not cause
    any backward incompatibilities. However this change also applies to ObjectMapperFactory's where there is a chance of backward incompatibilities
    to arise. For example if you previously had a custom JAXBObjectMapperFactory that looked like this:

    public class MyJAXBObjectMapperFactory implements JAXBObjectMapperFactory {
    public JAXBContext create(Class cls, String charset) {
    ...
    }
    }

    you now need to change it to:

    public class MyJAXBObjectMapperFactory implements JAXBObjectMapperFactory {
    public JAXBContext create(Type cls, String charset) {
    ...
    }
    }

    (note the change from Class to Type). This was needed for swagger integration (issue 980). (thanks to Victor Orlovsky for pull request)

  • Add better integration for standard HTTP methods with Apache HttpClient which also solves an issue content-type header being generated for empty GET requests (issue 974) (thanks to Daniel Dyląg for pull request)

  • No longer using DEF_CONTENT_CHARSET from Apache HttpClient since it caused compatibility issues (issue 757)

  • Fix for #​979 Removing Authorization header when setting auth().none() (issue 979) (thanks to jovanovicivan for pull request)

  • Fixed so that header equals is case-insensitive (issue 999) (thanks to Todd Bradley for pull request)

  • Allow querying (extracting values out of) a request specification using the io.restassured.specification.SpecificationQuerier. For example:
    RequestSpecification spec = ...
    QueryableRequestSpecification queryable = SpecificationQuerier.query(spec);
    String headerValue = queryable.getHeaders().getValue("header");
    String param = queryable.getFormParams().get("someparam");

  • Fixed so that it's possible to specify arguments to root paths in multi expectation blocks such as:
    get("/jsonStore").then()
    .root("store.book.find { it.author == '%s' }.price")
    .body(
    withArgs("Nigel Rees"), is(8.95f),
    withArgs("Evelyn Waugh"), is(12.99f),
    withArgs("Herman Melville"), is(8.99f),
    withArgs("J. R. R. Tolkien"), is(22.99f)
    );

  • It's now possible to automatically include additional input fields when using form authentication. Just use the FormAuthConfig and specify the additional values to include using:
    given().auth().form("username", "password", formAuthConfig().withAdditionalFields("firstInputField", "secondInputField"). ..
    REST Assured will automatically parse the HTML page, find the values for the additional fields and include them as form parameters in the login request.

v3.0.7

  • CookieFilter now conforms to RFC6265 standard by only copying expected cookies instead of all (thanks to Maciej Ciszewski for pull request) (issue 956).
  • Prettifier can now prettify empty xml body (issue 960)
  • Introduced a "detailed cookie matcher" that allows you to verify more detailed aspects of a cookie, for example:
    given().
    get("/multiCookie").
    then()
    cookie("cookie1", detailedCookie().maxAge(1234567));
    (thanks to Rafał Siwiec for pull request)

v3.0.6

  • Upgraded to Groovy 2.4.12
  • REST Assured now works on Java 9

v3.0.5

  • Reverted the API to take String instead of CharSequence again since this change introduced an accidental breaking change by not being binary compatible (only source compatible).

v3.0.4

  • Changed API to take CharSequence instead of String. For example the "get" method in when().get("/something").. now takes a CharSequence instead of String (issue 858) (thanks to weaselmetal for pull request)
  • Fixed so that assertions on content type with a ContentType.BINARY argument don't fail for binary content (issue 861) (thanks to Grégory Fouquet for pull request)
  • Fixed an issue with two-way SSL whose root cause was Apache HTTP Client v4.5.2. Upgrading to 4.5.3 solved the issue (thanks to Ryan Tighe for pull request)
  • Added support for ntlm authentication (issue 869) (thanks to Pawel Cesar Sanjuan Szklarz for pull request)
  • Better support for empty GZIP responses (thanks to Sergey Trasko for pull request)
  • Treat text/json as JSON content type (thanks to Ionuț Păduraru for pull request)
  • RestAssured.oauth2("accessToken") now uses PreemptiveOAuth2HeaderScheme instead of OAuth2Scheme
  • Added body params in OAuthRequest (issue 868) (thanks to Corneliu Duplachi for pull request)
  • Set authentication once to set in SecurityContextHolder and Principal in method parameter in the MockMvc module (thanks to Leonard Siu for pull request)
  • Allow passing multi-parts with content-types not starting with "multipart/" but also containing "multipart+" such as "application/x-hub-multipart+xml" (issue 919)

v3.0.3

  • Fixed issue with multi-word parameters that were treated as a list (issue 787) (thanks to britka for pull request)
  • Merges cookies of HttpServletResponse additionally to the Set-Cookie header (issue 791) (thanks to Andreas Gerstmayr for pull request)
  • Removed second negative from exception message "... no supported Content-Type was not specified... " (thanks to Mark N Broadhead for pull request)
  • Fixing EOFException for empty GZIP responses (issue 814)
  • Update groovy version to fix memory leaks (issue 735) (thanks to Nikolai Gladkov for pull request)
  • Improved cookie expiry parsing (issue 563) (thanks to Martin Aun for pull request)
  • Improved multipart log output to make it prettier (thanks to Andrey Smirnov for pull request)
  • Ignores spacing between content type and charset when validating content types (issue 804)
  • Allow specifying default charset (only applicable when HttpMultipartMode is not STRICT) that'll be used when sending multiparts (issue 844)

v3.0.2

  • Don't join root and path with '.' if path starts with array indexing (thanks to feshbach for pull request)
  • Updated SSLConfig to allow keystore and truststore passwords to differ (thanks to mike42 for pull request)
  • SSLConfig#getKeyStore() was returning trustStore rather than keyStore (thanks to mike42 for pull request)
  • Added ability to get Cookies as a list (using Cookies#asList)
  • Added new functionality to filters that allows removing and replacing headers and cookies.
  • Fixed so that form parameters (i.e. String-values) does get merged correctly with the multipart parameters (issue 762) (thanks to Klaus Dorninger for pull request)
  • Fixed so that the boundary of a request is set explicitly in the "Content-Type" header of the request (issue 762) (thanks to Klaus Dorninger for pull request)
  • Fixed error message thrown by RestAssuredMockMvc that hinted at using the regular RestAssured API instead of the MockMvc variant (thanks to Toshiaki Maki for pull request)
  • Fixed mismatch description from Hamcrest Matcher that previously was ignored for status codes (thanks to Javier Romero for pull request)
  • Added support for ordered filters. Implement the io.restassured.filter.OrderedFilter interface and specify the precedence (thanks to jcravi for initial pull request).
  • Fixed so that you can download binary data with the RestAssuredMockMvc module (thanks to Sergey Bespalov for pull request)
  • Improved exception message when there's no supported (de-)serialization library in classpath (issue 788)

v3.0.1

  • Fixed issues with colliding keys in multi-expectations for body and header validations. For example if "/x" returns the JSON { "x" : 2 } this would (previously) not throw an assertion error:
    when().
    get("/x").
    then().
    body("x", greaterThan(1),
    "x", equalTo(5),
    "x", lessThan(3));
    The reason was the only the last first and last "x" expectation were taken into account (issue 714).
  • Removed log.warn(..) messages from internal classes (issue 715)
  • Cookie attributes are no longer sent in request in accordance with RFC6265. Thanks to Maciej Gawinecki for pull request. (issue 720)
  • Mismatch description from TypeSafeDiagnosingMatcher is no longer ignored for when validating cookies. Thanks to Maciej Gawinecki for pull request. (issue 717)
  • REST Assured no longer forces the use of the platform charset when parsing JSON as string when combined with expectations (issue 728)
  • Don't append '.' to root path if given path starts with array indexing. Thanks to Tobias Johansson for pull request (issue 727).
  • Removed the need for the cookie max age value to be greater than or equal to -1 (issue 732).
  • Fixed memory leak in JSONAssertion. Big thanks to Andrey for pull request and investigation (issue 735).
  • Releasing loaded classes in XmlAssertion after expression evaluation to reduce memory foot print.

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant