In the flows we discussed, we looked at using real unit tests--ones that only load up the specific controllers that are being tested.
Another possibility is to load up the entire Spring context. However, this would be more of an integration test as we would load up the entire context. The following code shows you how to do a complete launch of a Spring context, launching all controllers:
@RunWith(SpringRunner.class) @WebAppConfiguration @ContextConfiguration("file:src/main/webapp/ WEB-INF/user-web-context.xml") public class BasicControllerSpringConfigurationIT { private MockMvc mockMvc; @Autowired private WebApplicationContext wac; @Before public void setup() { this.mockMvc = MockMvcBuilders.webAppContextSetup ...