Preview Spring Security Test: HtmlUnit

Updated March 31 2015
This blog is outdated and no longer maintained. Please refer to the Test Section of the reference documentation for updated documentation.

In my previous blog we explored how we can use the testing support with Spring MVC Test. We will now see how the same support works with Spring Test MVC HtmlUnit.

Minimum Versions
The Spring Security testing support does not work with spring-test-mvc-htmlunit-1.0.0.M1.jar. Instead, you just use the latest snapshot. This is due to some slight modifications to allow Spring Security and the MockMvcHtmlUnitDriver to work together.
Read more...

Preview Spring Security Test: Web Security

Updated March 31 2015
This blog is outdated and no longer maintained. Please refer to the Test Section of the reference documentation for updated documentation.

In my previous blog we demonstrated how the new Spring Security testing support can ease testing method based security. In this blog we will explore how we can use the testing support with Spring MVC Test.

Setting Up MockMvc and Spring Security

In order to use Spring Security with Spring MVC Test it is necessary to add the Spring Security FilterChainProxy as a Filter. For example:

Read more...