allure

How to log stacktrace , request body and response data in allure report?


I am using REST Assured API Framework with Cucumber BDD approach for my API testing. I want to log stacktrace, requestbody and response body in Allure report. How can I do that ? Any sample code would help.


Solution

  • You can add such code:

        @BeforeAll
        public static void setupAll() {
    
            if(RestAssured.filters().size() == 0) {
                RestAssured.filters(new AllureRestAssured());
            }
        }
    
    

    (java code) to have response and request in allure report.