Closed RSoodAMAT closed 3 years ago
You need to tell EvoSuite where to find all the dependencies -- EvoSuite assumes that all dependences are already on the classpath. This means that either you need to provide a full classpath (including all jar dependencies) to the -projectCP
option, or use $EVOSUITE -setup
to tell it where to find the dependencies (or use the Maven plugin to automatically). According to your example command line, you are only passing in the classpath of the application classes, not its dependencies.
Context
We have created a spring boot jdk project. We are using log4j library to record logs. While generating test case for the class , exception is being raised .
It is a gradle project .
Steps to Reproduce
Please break down here below all the needed steps to reproduce the issue. [If possible, please upload an example of the project you are generating tests for.]
$EVOSUITE -class com.poc.controller.RecipeController -projectCP build/classes/java/main
EvoSuite Arguments
$EVOSUITE -class com.poc.controller.RecipeController -projectCP build/classes/java/main
Current Result
Expected result
Should be able to resolve third party dependencies and generate test scenario.
Additional info
Please add any information of interest here below