v1.1.31: Release of 1.1.31
Pull requests:
- #358 Rest core updated. Fixed issues with reason in old structure (@YamStranger)
Commits:
-
117dbf2 feat: serenity rest core updated to return updated configurations, filters, etc. (@YamStranger)
-
2787384 feat: serenity-rest implemented recording of boyd, content-type, path, method, prepared recoding structure (@YamStranger)
Now it will be is easy to include in restQuery recording info about cookies, headers, and so on using filtering RestAssured mechanism
-
2d4719b feat: serenity-rest supported sequences of operations in different steps: (@YamStranger)
Now it is possible run sequence of rest operations, with restspecification and response shared in one thread:
class RestSteps { [@Ste](https://github.com/Ste)p def successfulGet(final String url) { given().get("$url/{id}", 1000).then().body("id", Matchers.equalTo(1000)); } [@Ste](https://github.com/Ste)p def getById(final String url) { rest().get("$url/{id}", 1000); } [@Ste](https://github.com/Ste)p def thenCheckOutcome() { then().body("Id", Matchers.anything()) } }
-
52e54a9 feat: implemented wrapping of request specification after multypart request configurations (@YamStranger)
-
5b6c531 feat: implemented wrapping of request after configuring cookies (@YamStranger)
Now serenity rest will work correctly after operations like below:
given().cookies(mapWithCookies).get(url) given().cookies("value").get(url) given().cookies("value", param).get(url)
-
5bdeda5 feat: serenity-rest implemented wrapping for all requests in SerenityRest class, all covered by tests (@YamStranger)
-
7c0f58a test: added test to ceheck wrapping after cookie operations (@YamStranger)
-
7d5f5c8 test: implemented test for wrapping request with configured multipart request (@YamStranger)
-
8040ade feat: serenity-rest implemented recording of all basic fields, like status-code, body, path, method. Implemented recoding of exceptions. (@YamStranger)
Now all operations will be recorded, after request executed, in report all fields will appear in same format as send.
After this update content/body should be matched with additional transformation, because if string contains json/xml it will be reformatted by RestAssured,
for example for Json it can be:... import static net.serenitybdd.rest.staging.JsonConverter.*; ... assert formatted(query.responseBody) == formatted(body)
Introduced DecomposedContentType class for representation simple content types:
if in rest assured defined only:ANY("*/*"), TEXT("text/plain"), JSON("application/json", "application/javascript", "text/javascript"), XML("application/xml", "text/xml", "application/xhtml+xml"), HTML("text/html"), URLENC("application/x-www-form-urlencoded"), BINARY("application/octet-stream");
not it will be possible define something like that
given().contentType("$APPLICATION_JSON")
for:ANY("*/*"), TEXT("text/plain"), APPLICATION_JSON("application/json"), APPLICATION_JAVASCRIPT("application/javascript"), APPLICATION_XML("application/xml"), TEST_XML("text/xml"), APPLICATION_XHTML_XML("application/xhtml+xml"), TEST_JAVASCRIPT("text/javascript"), HTML("text/html"), URLENC("application/x-www-form-urlencoded"), BINARY("application/octet-stream");
as well as find some RestAssured content type by DecomposedContentType or String:
DecomposedContentType.byString("application/javascript; Charset: UTF-8").contentType()
-
8d3e5c9 feat: serenity rest core decomposed to make possible to use different classes for different purposes. (@YamStranger)
Now it is possible to execute almost all serenity rest operations using SerenityRest (90+ methods) or use smaller classes:
RestDefaults (50+ methods)can be used for configuratins only default parameters
RestRequests (20+ methods)can be used for making requests
RestUtility (20+ methods)can be used for initialising some default or reusable objects -
a608efe feat: serenity-rest-assured updated rest core and tests, renamed some classes (@YamStranger)
-
ae9e4a8 feat: serenity-core updated restQuery and reports to include Cookies and headers, changed wrapping of request and response (@YamStranger)
-
b99deb4 test: serenity-rest created test to check how dryRun works for serenity rest (@YamStranger)
-
ca6690e test: serenity-rest implemented test to check if body, contenttype, responce is recorded (@YamStranger)
-
d869ad2 test: serenity-rest implemented tests to check how recording of rest requests and reponses works (@YamStranger)
-
de2dc5e feat: implemented support of DryRun for Serenity Rest (@YamStranger)
-
ebe88bd feat: serenity rest core decomposed to make possible use shaned method invocations for configuring default parameters. (@YamStranger)
-
f5eb645 test: serenity-rest implemented test to check if failed query recorded and it is possible to use assertions (@YamStranger)