Package org.springframework.test.context.event

# Annotation Interface RecordApplicationEvents

@Target(TYPE) @Retention(RUNTIME) @Documented @Inherited public @interface RecordApplicationEvents
`@RecordApplicationEvents` is an annotation that can be applied to a test class to instruct the Spring TestContext Framework to record all application events that are published in the `ApplicationContext` during the execution of a single test, either from the test thread or its descendants.

The recorded events can be accessed via the `ApplicationEvents` API within your tests.

This annotation may be used as a meta-annotation to create custom composed annotations.

This annotation will be inherited from an enclosing test class by default. See `@NestedTestConfiguration` for details.

Since:
  5.3.3
Author:
  Sam Brannen
See Also:
  - `ApplicationEvents`
  - `ApplicationEventsTestExecutionListener`