Files
spring-framework/framework-docs/modules/ROOT/pages/testing/mockmvc/htmlunit.adoc
Stéphane Nicoll d43dba63a1 Document AssertJ support for MockMvc
This commit restructures the section on MockMvc so that the anchors
are easier to read. The standard integration has moved to a
Hamcrest Integration section  at the same level as HtmlUnit Integration,
and a new AssertJ Integration section has been created.

Closes gh-32454
2024-06-21 12:51:35 +02:00

22 lines
968 B
Plaintext

[[mockmvc-server-htmlunit]]
= HtmlUnit Integration
:page-section-summary-toc: 1
Spring provides integration between xref:testing/mockmvc/overview.adoc[MockMvc] and
https://htmlunit.sourceforge.io/[HtmlUnit]. This simplifies performing end-to-end testing
when using HTML-based views. This integration lets you:
* Easily test HTML pages by using tools such as
https://htmlunit.sourceforge.io/[HtmlUnit],
https://www.seleniumhq.org[WebDriver], and
https://www.gebish.org/manual/current/#spock-junit-testng[Geb] without the need to
deploy to a Servlet container.
* Test JavaScript within pages.
* Optionally, test using mock services to speed up testing.
* Share logic between in-container end-to-end tests and out-of-container integration tests.
NOTE: MockMvc works with templating technologies that do not rely on a Servlet Container
(for example, Thymeleaf, FreeMarker, and others), but it does not work with JSPs, since
they rely on the Servlet container.