Update dependency io.rest-assured:rest-assured to v6 #34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
4.5.1→6.0.0Release Notes
rest-assured/rest-assured (io.rest-assured:rest-assured)
v6.0.0v5.5.6v5.5.5v5.5.4v5.5.3Greatly improved csrf support. When applying csrf, it'll automatically forward the cookies to returns from the GET request to the csrf token and apply it to the actual request. These cookies will also be applied to the CookieFilter automatically (if configured) and SessionFilter (if configured). For example:
given().
csrf("/login").
formParam("name", "My New Name").
when().
post("/users/123").
then().
statusCode(200);
Now the cookies returned from the GET request to login will be automatically applied to the POST to "/users/123".
If you have a CookieFilter defined for multiple requests, the cookies returned by GET to /login will be automatically stored in the CookieFilter and used in the second request.
You can disable this behavior by setting automaticallyApplyCookies to false the csrf config:
given().
config(config().csrfConfig(csrfConfig().automaticallyApplyCookies(false))).
csrf("/login").
when().
...
v5.5.2v5.5.1v5.5.0Removing custom validation of pathParams in the mock-mvc module and instead rely on the Spring implementation(issue 1782) (thanks to taeyeon-Kim for pull request)
Fixing "Error java.lang.NoSuchMethodError for HttpMethod.resolve()" in mock-mvc module (issue 1760) (thanks to d0vi for pull request)
Fix #1707: SVG file upload - fatal error :1:1: content is not allowed in prolog (#1777) (thanks to Byounghee kim for pull request)
Fix #1773: Remove check for response HTTP status code. (thanks to macmon for pull request)
Introducing the "scala-extensions" module for Scala 3 (#1770). This means that you can write tests like this in Scala 3:
@Test
def
extraction with rest assured scala extensions: Unit =val message: String = Given(req =>
req.port(7000)
req.header("Header", "Header")
req.body("hello")
)
.When(
_.put("/the/path")
)
.Extract(
_.path("message")
)
assertThat(message).isEqualTo("Hello World")
(thanks to Carlos Eduardo for pull request)
Remove deprecated Content-Transfer-Encoding from multipart post headers (#1762) (thanks to Michal Trna for pull request)
Fixed pathParams double encoding in mock-mvd module (#1756) (thanks to Dmitry Kaukov for pull request)
Upgraded Groovy from version 4.0.16 to 4.0.22
Upgraded Jackson from version 2.14.3 to 2.17.1
Upgraded kotlin extension module to use Kotlin 2.0.0 (previously 1.9.20 was used)
Upgraded Guava library from 32.0.1-jre to 33.2.1-jre
v5.4.0org.restassured:spring-web-test-client-kotlin-extensions:<version>you can write code like this for Spring WebTest client:val id: Int =
Given {
webTestClient(webTestClient)
param("name", "Johan")
} When {
get("/greeting")
} Then {
body(
"id", Matchers.equalTo(1),
"content", Matchers.equalTo("Hello, Johan!")
)
} Extract {
path("id")
}
v5.3.2onFailMessageafterthenlike:when().get("/somewhere").then().onFailMessage("My fail message").statusCode(200);(thanks to Ilya Koshaleu for pull request)v5.3.1v5.3.0v5.2.1v5.2.0Improved FilterContext used in Filters by adding the method FilterContext#hasValue(name, object). This makes it easier to check if a value exists and is equal to the expect object.
Introducing a much improved CSRF (cross-site request forgery) support. For example:
given().
csrf("/users").
formParm("firstName", "John").
formParm("lastName", "Doe").
when().
post("/users").
then().
statusCode(200);
This will first make a GET request to /users (due to csrf("/users")) to get an HTML page that contains the CSRF token.
Rest Assured will then automatically try to find the input field that contains the CSRF token and include in the POST to /users.
Here's an example of what Rest Assured expects as a response for the GET request to /users:
<title>Add User</title>Fixed so that form authentication takes CSRF into account. The previous form authentication CSRF implementation didn't really work (sorry!).
Now you can combine csrf with form authentication and it actually works as expected! Note that for requests other than GET or HEAD,
you need to specify both form authentication and csrf, e.g.
given().
csrf("/users").
formParm("firstName", "John").
formParm("lastName", "Doe").
auth().form("j_spring_security_check", "j_username", "j_password").
when().
post("/users").
then().
statusCode(200);
The reason for this is that the server returns a new CSRF token per request. So after the login request (with will use the CSRF token from the login page),
REST Assured needs to make an additional GET request to /users to get a new CSRF token. This token will then finally be supplied with the "POST" request
to "/users".
Adds support for Multipart upload via http PATCH method (thanks to Madis Liias for pull request)
Upgraded kotlin module to using Kotlin 1.7.10 (previously 1.6.21 was used)
v5.1.1v5.1.0Not all files have been moved yet, but refactoring will continue in the next release.
v5.0.1v5.0.0Configuration
📅 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.
This PR was generated by Mend Renovate. View the repository job log.