> For the complete documentation index, see [llms.txt](https://jack80342.gitbook.io/spring-boot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jack80342.gitbook.io/spring-boot/iv.-spring-boot-features/46.-creating-your-own-auto-configuration/46.4-testing-your-auto-configuration/46.4.1-simulating-a-web-context.md).

# 46.4.1 模拟网络上下文

如果你需要测试一个只在Servlet和Reactive网络应用上下文里操作的自动配置，分别使用`WebApplicationContextRunner`和`ReactiveWebApplicationContextRunner`。
