Skip to content

Commit 9551b3a

Browse files
committed
Eliminate sub-sections in Spring MVC test chapter
The very short, summary mini-sections confuse the client-side code that highlights the TOC item. This commit removes the sub-sections.
1 parent efdfe9a commit 9551b3a

File tree

1 file changed

+19
-36
lines changed

1 file changed

+19
-36
lines changed

src/docs/asciidoc/web/webmvc-test.adoc

Lines changed: 19 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,54 +2,37 @@
22
= Testing
33
[.small]#<<web-reactive.adoc#webflux-test,Same in Spring WebFlux>>#
44

5+
This section summarizes the options available in `spring-test` for Spring MVC applications.
56

7+
**Servlet API Mocks**
68

9+
Mock implementations of Servlet API contracts for unit testing controllers, filters, and
10+
other web components. See <<testing.adoc#mock-objects-servlet,Servlet API>> mock objects
11+
for more details.
712

8-
[[testing-servlet-mocks]]
9-
== Servlet API Mocks
13+
**TestContext Framework**
1014

11-
`spring-test` provides mock implementations of Servlet API contracts for unit testing
12-
controllers, filters, and other web components.
13-
See <<testing.adoc#mock-objects-servlet,Servlet API>> mock objects for more details.
14-
15-
16-
17-
18-
[[testing-testcontext]]
19-
== TestContext Framework
20-
21-
`spring-test` provides support for loading Spring configuration in JUnit and TestNG tests
22-
including efficient caching of the loaded configuration across test methods and support for
23-
loading a `WebApplicationContext` with a `MockServletContext`.
15+
Support for loading Spring configuration in JUnit and TestNG tests including efficient
16+
caching of the loaded configuration across test methods and support for loading a
17+
`WebApplicationContext` with a `MockServletContext`.
2418
See <<testing.adoc#testcontext-framework,TestContext Framework>> for more details.
2519

20+
**Spring MVC Test**
2621

27-
28-
29-
[[testing-mockmvc]]
30-
== Spring MVC Test (MockMvc)
31-
32-
`spring-test` provides a framework for testing annotated controllers through the
22+
A framework, also known as `MockMvc`, for testing annotated controllers through the
3323
`DispatcherServlet`, i.e. supporting annotations and complete with Spring MVC
34-
infrastructure, but without an HTTP server.
35-
See <<testing.adoc#spring-mvc-test-framework,Spring MVC Test>> for more details.
36-
37-
38-
24+
infrastructure, but without an HTTP server. See
25+
<<testing.adoc#spring-mvc-test-framework,Spring MVC Test>> for more details.
3926

40-
[[testing-resttemplate]]
41-
== Client-side REST
27+
**Client-side REST**
4228

4329
`spring-test` provides a `MockRestServiceServer` that can be used as a mock server for
4430
testing client-side code that internally uses the `RestTemplate`.
4531
See <<testing.adoc#spring-mvc-test-client,Client REST Tests>> for more details.
4632

33+
**WebTestClient**
4734

48-
49-
50-
[[testing-webtestclient]]
51-
== WebTestClient
52-
53-
`spring-test` provides a dedicated `WebTestClient` for end-to-end integration testing.
54-
`WebTestClient` can connect to any server over an HTTP connection. It is non-blocking,
55-
reactive client and well suited for testing asynchronous and streaming scenarios.
35+
`WebTestClient` was built for testing WebFlux applications but it can also be used for
36+
end-to-end integration testing, to any server, over an HTTP connection. It is a
37+
non-blocking, reactive client and well suited for testing asynchronous and streaming
38+
scenarios.

0 commit comments

Comments
 (0)