Annotation Interface ConfigureImposter


Declares a named imposter to create when the test context starts. Repeatable.

The imposter's URI (and optionally port) are published as Spring environment properties so the application under test is wired to the imposter without any test-specific configuration.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Logical name; used for InjectImposter lookup and as the engine imposter name.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Property set to imposter.uri().toString() (highest test precedence).
    Property set to imposter.port().
    Supplier of the imposter specification (pre-stubbing, recording, etc.).
  • Element Details

    • name

      String name
      Logical name; used for InjectImposter lookup and as the engine imposter name.
    • baseUrlProperty

      String baseUrlProperty
      Property set to imposter.uri().toString() (highest test precedence). Empty = skip.
      Default:
      ""
    • portProperty

      String portProperty
      Property set to imposter.port(). Empty = skip.
      Default:
      ""
    • spec

      Class<? extends Supplier<ImposterSpec>> spec
      Supplier of the imposter specification (pre-stubbing, recording, etc.). The default NoSpec is a sentinel meaning "a bare recording imposter" — the integration creates imposter(name).record().
      Default:
      io.github.achirdlabs.rift.spring.NoSpec.class