Commit d91c71b5 authored by Madhura Bhave's avatar Madhura Bhave

Deprecate secure flag on @WebMvcTest

Closes gh-14227
parent 174f53e1
...@@ -89,7 +89,9 @@ public @interface AutoConfigureMockMvc { ...@@ -89,7 +89,9 @@ public @interface AutoConfigureMockMvc {
* If Spring Security's {@link MockMvc} support should be auto-configured when it is * If Spring Security's {@link MockMvc} support should be auto-configured when it is
* on the classpath. Defaults to {@code true}. * on the classpath. Defaults to {@code true}.
* @return if Spring Security's MockMvc support is auto-configured * @return if Spring Security's MockMvc support is auto-configured
* @deprecated since 2.1.0 in favor of Spring Security's testing support
*/ */
@Deprecated
boolean secure() default true; boolean secure() default true;
} }
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
package org.springframework.boot.test.autoconfigure.web.servlet; package org.springframework.boot.test.autoconfigure.web.servlet;
import java.util.concurrent.Executors;
import com.gargoylesoftware.htmlunit.BrowserVersion; import com.gargoylesoftware.htmlunit.BrowserVersion;
import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebDriver;
import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.openqa.selenium.htmlunit.HtmlUnitDriver;
...@@ -29,8 +31,10 @@ import org.springframework.boot.test.web.htmlunit.webdriver.LocalHostWebConnecti ...@@ -29,8 +31,10 @@ import org.springframework.boot.test.web.htmlunit.webdriver.LocalHostWebConnecti
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
import org.springframework.security.concurrent.DelegatingSecurityContextExecutor;
import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.htmlunit.webdriver.MockMvcHtmlUnitDriverBuilder; import org.springframework.test.web.servlet.htmlunit.webdriver.MockMvcHtmlUnitDriverBuilder;
import org.springframework.util.ClassUtils;
/** /**
* Auto-configuration for Selenium {@link WebDriver} MockMVC integration. * Auto-configuration for Selenium {@link WebDriver} MockMVC integration.
...@@ -46,6 +50,8 @@ public class MockMvcWebDriverAutoConfiguration { ...@@ -46,6 +50,8 @@ public class MockMvcWebDriverAutoConfiguration {
private final Environment environment; private final Environment environment;
private static final String SECURITY_CONTEXT_EXECUTOR = "org.springframework.security.concurrent.DelegatingSecurityContextExecutor";
MockMvcWebDriverAutoConfiguration(Environment environment) { MockMvcWebDriverAutoConfiguration(Environment environment) {
this.environment = environment; this.environment = environment;
} }
...@@ -63,7 +69,13 @@ public class MockMvcWebDriverAutoConfiguration { ...@@ -63,7 +69,13 @@ public class MockMvcWebDriverAutoConfiguration {
@ConditionalOnMissingBean(WebDriver.class) @ConditionalOnMissingBean(WebDriver.class)
@ConditionalOnBean(MockMvcHtmlUnitDriverBuilder.class) @ConditionalOnBean(MockMvcHtmlUnitDriverBuilder.class)
public HtmlUnitDriver htmlUnitDriver(MockMvcHtmlUnitDriverBuilder builder) { public HtmlUnitDriver htmlUnitDriver(MockMvcHtmlUnitDriverBuilder builder) {
return builder.build(); HtmlUnitDriver driver = builder.build();
if (ClassUtils.isPresent(SECURITY_CONTEXT_EXECUTOR,
getClass().getClassLoader())) {
driver.setExecutor(new DelegatingSecurityContextExecutor(
Executors.newSingleThreadExecutor()));
}
return driver;
} }
} }
...@@ -143,7 +143,9 @@ public @interface WebMvcTest { ...@@ -143,7 +143,9 @@ public @interface WebMvcTest {
* If Spring Security's {@link MockMvc} support should be auto-configured when it is * If Spring Security's {@link MockMvc} support should be auto-configured when it is
* on the classpath. Defaults to {@code true}. * on the classpath. Defaults to {@code true}.
* @return if Spring Security's MockMvc support is auto-configured * @return if Spring Security's MockMvc support is auto-configured
* @deprecated since 2.1.0 in favor of Spring Security's testing support
*/ */
@Deprecated
@AliasFor(annotation = AutoConfigureMockMvc.class) @AliasFor(annotation = AutoConfigureMockMvc.class)
boolean secure() default true; boolean secure() default true;
......
...@@ -49,7 +49,7 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder ...@@ -49,7 +49,7 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
* @author Eddú Meléndez * @author Eddú Meléndez
*/ */
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@WebMvcTest(controllers = RestDocsTestController.class, secure = false) @WebMvcTest(controllers = RestDocsTestController.class)
@AutoConfigureRestDocs @AutoConfigureRestDocs
public class MockMvcRestDocsAutoConfigurationAdvancedConfigurationIntegrationTests { public class MockMvcRestDocsAutoConfigurationAdvancedConfigurationIntegrationTests {
......
...@@ -26,6 +26,7 @@ import org.junit.runner.RunWith; ...@@ -26,6 +26,7 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.web.servlet.error.ErrorAttributes; import org.springframework.boot.web.servlet.error.ErrorAttributes;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
...@@ -42,7 +43,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. ...@@ -42,7 +43,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* @author Stephane Nicoll * @author Stephane Nicoll
*/ */
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@WebMvcTest(secure = false) @WebMvcTest
@WithMockUser
public class WebMvcTestAllControllersIntegrationTests { public class WebMvcTestAllControllersIntegrationTests {
@Rule @Rule
......
...@@ -23,6 +23,7 @@ import org.junit.runner.RunWith; ...@@ -23,6 +23,7 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
...@@ -36,7 +37,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. ...@@ -36,7 +37,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* @author Stephane Nicoll * @author Stephane Nicoll
*/ */
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@WebMvcTest(controllers = ExampleController2.class, secure = false) @WebMvcTest(controllers = ExampleController2.class)
@WithMockUser
public class WebMvcTestConverterIntegrationTests { public class WebMvcTestConverterIntegrationTests {
@Autowired @Autowired
......
...@@ -21,6 +21,7 @@ import org.junit.runner.RunWith; ...@@ -21,6 +21,7 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
...@@ -36,7 +37,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. ...@@ -36,7 +37,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* @author Stephane Nicoll * @author Stephane Nicoll
*/ */
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@WebMvcTest(secure = false) @WebMvcTest
@WithMockUser
@TestPropertySource(properties = { "spring.mvc.throw-exception-if-no-handler-found=true", @TestPropertySource(properties = { "spring.mvc.throw-exception-if-no-handler-found=true",
"spring.mvc.static-path-pattern=/static/**" }) "spring.mvc.static-path-pattern=/static/**" })
public class WebMvcTestCustomDispatcherServletIntegrationTests { public class WebMvcTestCustomDispatcherServletIntegrationTests {
......
...@@ -22,6 +22,7 @@ import org.junit.runner.RunWith; ...@@ -22,6 +22,7 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
...@@ -34,7 +35,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. ...@@ -34,7 +35,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* @author Andy Wilkinson * @author Andy Wilkinson
*/ */
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@WebMvcTest(secure = false) @WebMvcTest
@WithMockUser
public class WebMvcTestHateoasIntegrationTests { public class WebMvcTestHateoasIntegrationTests {
@Autowired @Autowired
......
...@@ -25,6 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -25,6 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.MessageSource; import org.springframework.context.MessageSource;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
...@@ -36,7 +37,8 @@ import static org.assertj.core.api.Assertions.assertThat; ...@@ -36,7 +37,8 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Andy Wilkinson * @author Andy Wilkinson
*/ */
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@WebMvcTest(secure = false) @WebMvcTest
@WithMockUser
@TestPropertySource(properties = "spring.messages.basename=web-test-messages") @TestPropertySource(properties = "spring.messages.basename=web-test-messages")
public class WebMvcTestMessageSourceIntegrationTests { public class WebMvcTestMessageSourceIntegrationTests {
......
...@@ -21,6 +21,7 @@ import org.junit.runner.RunWith; ...@@ -21,6 +21,7 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
...@@ -34,7 +35,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. ...@@ -34,7 +35,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* @author Phillip Webb * @author Phillip Webb
*/ */
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@WebMvcTest(controllers = ExampleController2.class, secure = false) @WebMvcTest(controllers = ExampleController2.class)
@WithMockUser
public class WebMvcTestOneControllerIntegrationTests { public class WebMvcTestOneControllerIntegrationTests {
@Autowired @Autowired
......
...@@ -21,6 +21,7 @@ import org.junit.runner.RunWith; ...@@ -21,6 +21,7 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
...@@ -34,7 +35,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. ...@@ -34,7 +35,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* @author Stephane Nicoll * @author Stephane Nicoll
*/ */
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@WebMvcTest(secure = false) @WebMvcTest
@WithMockUser
public class WebMvcTestPageableIntegrationTests { public class WebMvcTestPageableIntegrationTests {
@Autowired @Autowired
......
...@@ -24,6 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -24,6 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.test.rule.OutputCapture; import org.springframework.boot.test.rule.OutputCapture;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
...@@ -39,7 +40,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. ...@@ -39,7 +40,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@WebMvcTest @WebMvcTest
@AutoConfigureMockMvc(secure = false, printOnlyOnFailure = false) @WithMockUser
@AutoConfigureMockMvc(printOnlyOnFailure = false)
public class WebMvcTestPrintAlwaysIntegrationTests { public class WebMvcTestPrintAlwaysIntegrationTests {
@Rule @Rule
......
...@@ -22,6 +22,7 @@ import org.junit.runner.RunWith; ...@@ -22,6 +22,7 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
...@@ -35,7 +36,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. ...@@ -35,7 +36,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
@RunWith(WebMvcTestPrintDefaultRunner.class) @RunWith(WebMvcTestPrintDefaultRunner.class)
@WebMvcTest @WebMvcTest
@AutoConfigureMockMvc(secure = false) @WithMockUser
@AutoConfigureMockMvc
public class WebMvcTestPrintDefaultIntegrationTests { public class WebMvcTestPrintDefaultIntegrationTests {
@Autowired @Autowired
......
...@@ -23,6 +23,7 @@ import org.junit.runner.RunWith; ...@@ -23,6 +23,7 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.test.rule.OutputCapture; import org.springframework.boot.test.rule.OutputCapture;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
...@@ -38,7 +39,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. ...@@ -38,7 +39,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* @author Phillip Webb * @author Phillip Webb
*/ */
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@WebMvcTest(secure = false) @WebMvcTest
@WithMockUser
@TestPropertySource(properties = "spring.test.mockmvc.print=NONE") @TestPropertySource(properties = "spring.test.mockmvc.print=NONE")
public class WebMvcTestPrintDefaultOverrideIntegrationTests { public class WebMvcTestPrintDefaultOverrideIntegrationTests {
......
...@@ -25,6 +25,7 @@ import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMock ...@@ -25,6 +25,7 @@ import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMock
import org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrint; import org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrint;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.test.rule.OutputCapture; import org.springframework.boot.test.rule.OutputCapture;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
...@@ -40,7 +41,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. ...@@ -40,7 +41,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/ */
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@WebMvcTest @WebMvcTest
@AutoConfigureMockMvc(secure = false, print = MockMvcPrint.NONE) @WithMockUser
@AutoConfigureMockMvc(print = MockMvcPrint.NONE)
public class WebMvcTestPrintOverrideIntegrationTests { public class WebMvcTestPrintOverrideIntegrationTests {
@Rule @Rule
......
...@@ -23,6 +23,7 @@ import org.junit.runner.RunWith; ...@@ -23,6 +23,7 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
...@@ -33,7 +34,8 @@ import static org.assertj.core.api.Assertions.assertThat; ...@@ -33,7 +34,8 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Phillip Webb * @author Phillip Webb
*/ */
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@WebMvcTest(secure = false) @WebMvcTest
@WithMockUser
public class WebMvcTestWebClientIntegrationTests { public class WebMvcTestWebClientIntegrationTests {
@Autowired @Autowired
......
...@@ -41,7 +41,7 @@ import static org.assertj.core.api.Assertions.assertThat; ...@@ -41,7 +41,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Phillip Webb * @author Phillip Webb
*/ */
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@WebMvcTest(secure = false) @WebMvcTest
@FixMethodOrder(MethodSorters.NAME_ASCENDING) @FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class WebMvcTestWebDriverCustomScopeIntegrationTests { public class WebMvcTestWebDriverCustomScopeIntegrationTests {
......
...@@ -27,6 +27,7 @@ import org.openqa.selenium.WebElement; ...@@ -27,6 +27,7 @@ import org.openqa.selenium.WebElement;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.util.ReflectionTestUtils; import org.springframework.test.util.ReflectionTestUtils;
...@@ -39,7 +40,8 @@ import static org.junit.Assert.fail; ...@@ -39,7 +40,8 @@ import static org.junit.Assert.fail;
* @author Phillip Webb * @author Phillip Webb
*/ */
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@WebMvcTest(secure = false) @WebMvcTest
@WithMockUser
@FixMethodOrder(MethodSorters.NAME_ASCENDING) @FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class WebMvcTestWebDriverIntegrationTests { public class WebMvcTestWebDriverIntegrationTests {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment