Add a warning about webDriver scope to the docs

Update the reference documentation with a warning about the `webDriver`
scope that we create.

Closes gh-13093
This commit is contained in:
Phillip Webb 2018-10-11 16:17:24 -07:00
parent 0d35af1813
commit b1399db994

View File

@ -6657,6 +6657,10 @@ that the driver exits after each test and that a new instance is injected. If yo
not want this behavior, you can add `@Scope("singleton")` to your `WebDriver` `@Bean`
definition.
WARNING: The `webDriver` scope created by Spring Boot will replace any user defined scope
of the same name. If you define your own `webDriver` scope you may find it stops working
when you use `@WebMvcTest`.
TIP: Sometimes writing Spring MVC tests is not enough; Spring Boot can help you run
<<boot-features-testing-spring-boot-applications-testing-with-running-server,
full end-to-end tests with an actual server>>.