MockMvc
An Extension for Spring MockMvc tests to enable meaningful testing of controllers that produces HTML.
Setup
<dependency>
<groupId>it.skrape</groupId>
<artifactId>skrapeit-core</artifactId>
<version>LATEST</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>it.skrape</groupId>
<artifactId>skrapeit-mockmvc</artifactId>
<version>LATEST</version>
<scope>test</scope>
</dependency>
How to Use
The skrape{it} MockMvc-extension will extend MockMvc's ResultActions
with an andExpectHtml{}
lambda function. The scope of the lambda will give you a parsed response body (deserialized to a Doc
) and enables you to make comfortable assumptions about the content, properties and structure of the document.

Last updated
Was this helpful?