You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the log filter for Request and Response in my beforeEach, to be functional in all tests of this class.
This class has 3 tests, each time a new test is run, the previous test log is displayed in sequence with the new test log, reaching the end of the test with a huge queue of requests/responses in my console.
Since the filter is a LinkedList, not a Set, then every time @BeforeEach method run, it will add new RequestLoggingFilter(), new ResponseLoggingFilter() to list of filter--> you will see my duplicated logs.
To fix this.
RestAssured.filters(new RequestLoggingFilter(), new ResponseLoggingFilter());
changes to
RestAssured.replaceFiltersWith(new RequestLoggingFilter(), new ResponseLoggingFilter());
I'm using the log filter for Request and Response in my beforeEach, to be functional in all tests of this class.
This class has 3 tests, each time a new test is run, the previous test log is displayed in sequence with the new test log, reaching the end of the test with a huge queue of requests/responses in my console.
Am I applying these filters wrong?
RestAssured version 5.4.0
The text was updated successfully, but these errors were encountered: