testImplementation 'org.springframework.security:spring-security-test:5.7.3'
build.gradle에 추가해주고 해결
참고 👇
https://stackoverflow.com/questions/46745923/why-cant-i-import-withmockuser-to-my-test
Why cant i import @WithMockUser to my test
I am trying to do an authentication test with @With Mock User but it is refusing to import to my test class in spring boot . This is the class configuration @WebAppConfiguration @AutoConfigureMock...
stackoverflow.com
https://mvnrepository.com/artifact/org.springframework.security/spring-security-test/5.7.3
반응형
'Test > Junit' 카테고리의 다른 글
[MockMvc] 테스트 시 redirect 여부 확인 (0) | 2022.09.17 |
---|---|
[MockMvc] Pageable (0) | 2022.09.17 |
[Error] Internal Error occurred. org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests (1) | 2022.09.12 |
JUnit5 (0) | 2022.01.27 |