Skip to main content
Version: 5.3

Advanced Extensions

This table lists more advanced extensions that can be used to hook into the Engine itself to:

  • intercept tests, skipping them, and modify test results
  • intercept specs specs skipping them if required
  • post process spec instances after instantiation
  • modify the coroutine context used by specs and tests
  • apply custom instantiation logic
  • filter specs and tests
  • adjust test output
ExtensionDescription
ConstructorExtensionProvides custom logic to instantiate spec classes. An example is the Spring extension constructor extension which autowire's spring beans.
TestCaseExtensionIntercepts calls to a test, can skip a test, override the test result, and modify the coroutine context.
SpecExtensionIntercepts calls to a spec, can skip a spec, and modify the coroutine context.
SpecRefExtensionIntercepts calls to a spec before it is instantiated. Can skip instantiation.
DisplayNameFormatterExtensionCan customize the display names of tests used in test output.
EnabledExtensionCan provide custom logic to determine if a test is enabled or disabled.
ProjectExtensionIntercepts calls to the test engine before a project starts.
SpecExecutionOrderExtensionCan sort specs before execution begins to provide a custom spec execution order.
TagExtensionCan provide active tags from arbitrary sources.
InstantiationErrorListenerIs notified when a spec fails to be instantiated due to some exception.
InstantiationListenerIs notified when a spec is successfully instantiated.
PostInstantiationExtensionIntercepts specs when they are instantiated, can replace the spec instance and modify coroutine context.
IgnoredSpecListenerIs notified when a spec is skipped.
SpecFilterCan provide custom logic to skip a spec.
TestFilterCan provide custom logic to skip a test.