Package io.qameta.allure.assertj
Class AssertJLifecycleListener
java.lang.Object
io.qameta.allure.assertj.AssertJLifecycleListener
- All Implemented Interfaces:
io.qameta.allure.listener.FixtureLifecycleListener,io.qameta.allure.listener.LifecycleListener,io.qameta.allure.listener.TestLifecycleListener
public class AssertJLifecycleListener
extends Object
implements io.qameta.allure.listener.TestLifecycleListener, io.qameta.allure.listener.FixtureLifecycleListener
Clears per-thread AssertJ recorder state after Allure has finished owning the current result.
AllureAspectJ keeps an AssertJRecorder in a ThreadLocal so assertion objects can
be matched by identity across later fluent calls. Test engines commonly reuse worker threads, so that
thread-local map would otherwise keep old assertion objects, rendered steps, and operation stack state after
the test or fixture result has already been written. The retained StepResults are already attached to
the Allure model by reference, so removing the recorder here does not remove any reported steps; it only
releases per-thread bookkeeping before the next test or fixture starts on the same thread.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterFixtureStop(io.qameta.allure.model.FixtureResult result) voidafterTestWrite(io.qameta.allure.model.TestResult result) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.qameta.allure.listener.FixtureLifecycleListener
afterFixtureStart, afterFixtureUpdate, beforeFixtureStart, beforeFixtureStop, beforeFixtureUpdateMethods inherited from interface io.qameta.allure.listener.TestLifecycleListener
afterTestSchedule, afterTestStart, afterTestStop, afterTestUpdate, beforeTestSchedule, beforeTestStart, beforeTestStop, beforeTestUpdate, beforeTestWrite
-
Constructor Details
-
AssertJLifecycleListener
public AssertJLifecycleListener()
-
-
Method Details
-
afterTestWrite
public void afterTestWrite(io.qameta.allure.model.TestResult result) - Specified by:
afterTestWritein interfaceio.qameta.allure.listener.TestLifecycleListener
-
afterFixtureStop
public void afterFixtureStop(io.qameta.allure.model.FixtureResult result) - Specified by:
afterFixtureStopin interfaceio.qameta.allure.listener.FixtureLifecycleListener
-