Annotation Interface SqsTest


@Target(TYPE) @Retention(RUNTIME) @Documented @Inherited @BootstrapWith(SqsTestContextBootstrapper.class) @OverrideAutoConfiguration(enabled=false) @TypeExcludeFilters(SqsTypeExcludeFilter.class) @ExtendWith(org.springframework.test.context.junit.jupiter.SpringExtension.class) @AutoConfigureSqs @ImportAutoConfiguration public @interface SqsTest
Annotation for a SQS test that focuses only on SQS-based components.

Using this annotation will disable full auto-configuration and instead apply only configuration relevant to SQS tests.

When using JUnit 4, this annotation should be used in combination with @RunWith(SpringRunner.class).

Since:
2.4.0
Author:
Maciej Walkowiak
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    A set of exclude filters which can be used to filter beans that would otherwise be added to the application context.
    A set of include filters which can be used to add otherwise filtered beans to the application context.
    Class<?>[]
    Specifies the listeners to test.
    Properties in form key=value that should be added to the Spring Environment before the test runs.
    boolean
    Determines if default filtering should be used with @SpringBootApplication.
    Class<?>[]
    Specifies the listeners to test.
  • Element Details

    • useDefaultFilters

      boolean useDefaultFilters
      Determines if default filtering should be used with @SpringBootApplication. By default no beans are included.
      Returns:
      if default filters should be used
      See Also:
      Default:
      true
    • value

      @AliasFor("listeners") Class<?>[] value
      Specifies the listeners to test. This is an alias of listeners() which can be used for brevity if no other attributes are defined. See listeners() for details.
      Returns:
      the listeners to test
      See Also:
      Default:
      {}
    • listeners

      @AliasFor("value") Class<?>[] listeners
      Specifies the listeners to test.
      Returns:
      the listeners to test
      See Also:
      Default:
      {}
    • properties

      String[] properties
      Properties in form key=value that should be added to the Spring Environment before the test runs.
      Returns:
      the properties to add
      Default:
      {}
    • includeFilters

      ComponentScan.Filter[] includeFilters
      A set of include filters which can be used to add otherwise filtered beans to the application context.
      Returns:
      include filters to apply
      Default:
      {}
    • excludeFilters

      ComponentScan.Filter[] excludeFilters
      A set of exclude filters which can be used to filter beans that would otherwise be added to the application context.
      Returns:
      exclude filters to apply
      Default:
      {}