@SpringBootTest: Difference between revisions
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
=Overview= | =Overview= | ||
@SpringBootTest tells to SpringRunner, which is a JUnit plugin that provides custom Spring-specific testing behavior, to bootstrap the test with Spring Boot capabilities. | @SpringBootTest tells to SpringRunner, which is a JUnit plugin that provides custom Spring-specific testing behavior, to bootstrap the test with Spring Boot capabilities: | ||
* load [[application.properties]] | |||
* etc. | |||
<syntaxhighlight lang='java'> | <syntaxhighlight lang='java'> | ||
@SpringBootTest(webEnvironment=WebEnvironment.RANDOM_PORT) | @SpringBootTest(webEnvironment=WebEnvironment.RANDOM_PORT) | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 00:28, 11 October 2018
Internal
Overview
@SpringBootTest tells to SpringRunner, which is a JUnit plugin that provides custom Spring-specific testing behavior, to bootstrap the test with Spring Boot capabilities:
- load application.properties
- etc.
@SpringBootTest(webEnvironment=WebEnvironment.RANDOM_PORT)