allure-java icon indicating copy to clipboard operation
allure-java copied to clipboard

AllureRestAssured add UTF-8 encoding while viewing request/response file

Open arturmkr opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe. Having following code:

  @Test
  void testEnconding() {
    RestAssured.given()
        .contentType("application/json; charset=UTF-8")
        .config(RestAssured.config().decoderConfig(decoderConfig().defaultContentCharset("UTF-8")))
        .header("Content-Type", "application/json")
        .filters(new AllureRestAssured())
        .body("{\"name\": \"Это тест создание\"}")
        .when()
        .post("https://petstore.swagger.io/v2/pet");
  }

While viewing test result preview of request body displays in a correct way, because encoding is set: preview

But while viewing request in separate tab (Open attachment in new tab) request body displays with some encoding symbols, because encoding is not set: view

Describe the solution you'd like I propose to add encoding as UTF-8 while viewing request/response in a separate tab.

arturmkr avatar Jan 05 '23 20:01 arturmkr