Back-End/Issues

[GitHub Actions] ApplicationTests > contextLoads() FAILED

yeonx 2023. 9. 12. 20:17
728x90

ERROR

StudywithsolApplicationTests > contextLoads() FAILED
37 java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:98
38 Caused by: org.yaml.snakeyaml.constructor.ConstructorException at SafeConstructor.java:574

 

해결 -> 3번으로 해결

1. @SpringBootTest어노테이션에 class 추가

@SpringBootTest(classes = StudywithsolApplicationTests.class)
class StudywithsolApplicationTests {

   @Test
   void contextLoads() {
   }

}

2. --debug 추가

run: ./gradlew --debug build

3. build.gradle에 해당 내용 추가

tasks.test {
	testLogging {
		showExceptions = true
		exceptionFormat "full"
		showStackTraces true
	}
}