SpringBootTest

Annotation that can be specified on a test class that runs Spring Boot based tests. Provides the following features over and above the regular Spring TestContext Framework:

Author

Phillip Webb

Andy Wilkinson

Since

1.4.0

See also

Types

Link copied to clipboard
Enumeration of how the main method of the @SpringBootConfiguration-annotated class is used when creating and running the SpringApplication under test.
Link copied to clipboard
An enumeration web environment modes.

Functions

Link copied to clipboard
abstract fun annotationType(): Class<out Annotation>
Link copied to clipboard
abstract fun args(): Array<String>
Application arguments that should be passed to the application under test.
Link copied to clipboard
abstract fun classes(): Array<Class<out Any>>
The component classes to use for loading an ApplicationContext.
Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
@AliasFor(value = "value")
abstract fun properties(): Array<String>
Properties in form key=value that should be added to the Spring Environment before the test runs.
Link copied to clipboard
abstract fun toString(): String
Link copied to clipboard
The type of main method usage to employ when creating the SpringApplication under test.
Link copied to clipboard
@AliasFor(value = "properties")
abstract fun value(): Array<String>
Alias for properties.
Link copied to clipboard
The type of web environment to create when applicable.