The Spring boot application we are developing doesn’t need Tomcat Dependency as we are deploying the war file in JBOSS server.so we excluded dependency in gradle using the following configuration
compile.exclude module: ‘spring-boot-starter-tomcat’
But during the Build JUnit test cases are failing as we excluded the Tomcat dependency.
Is there any way to include the ‘spring-boot-starter-tomcat’ library only during the test cases execution?(I tried to include the library using testCompile() and testRunTime() feature but it is not working)