When executing gradle build command in local system for xxxx-app, the build is successful. But When I execute the build through Jenkins job, the build gets fails when executing the Spring boot application Tests as shown below.
:xxxx-app:processTestResources UP-TO-DATE
:xxxx-app:testClasses
:xxxx-app:test
com.xxxx.yyyy.XXXXApplicationTests > contextLoads FAILED
java.lang.IllegalStateException
Caused by: org.springframework.beans.factory.BeanCreationException
Caused by: org.springframework.beans.factory.BeanCreationException
Caused by: java.lang.IllegalArgumentException
1 test completed, 1 failed
:xxxx-app:test FAILED
FAILURE: Build failed with an exception.
I believe this is something to do with test dependencies in build.gradle, But not sure the same is getting successful in local system. I am using below dependency,
testCompile('org.springframework.boot:spring-boot-starter-test')
Can some one help on this issue due to this I could not proceed further in Jenkins job?