Open micskeiz opened 3 years ago
I had the same problem. Any solution?
I think this issue was fixed with aa606bb8bf4924a5696bbce4cf332f7d89e5bd60, but i am not sure.
If this is still relevant i was not able to reproduce the Bug. Can anyone confirm that this is fixed?
Context
ClassNotFoundException
for the CUTs of the tutorialProjectAnalyzer
to check classes.target
parameter is correctly passed toContinuous
, it tries to useClassPathHacker
to add files in the target classes to the actual classpath (which is currently EvoSuite's classpath and not the target's), but it failes because in Java 9+ the default classloader is not anURLClassLoader
.ProjectAnalyzer
will fail duringClass<?> clazz = Class.forName(className);
.Relevant part of the log:
(I have added a few log messages during debug to the source, thus some of the line numbers changed.)
TestGeneration.executeTestGeneration
) skipsProjectAnalyzer
. It also tries to useClassPathHacker
(which fails also in this mode), but usesResourceList
to get the class. This suceed, because it uses the SUT class loader fromTestGenerationContext
.Maybe
ProjectAnalyzer
could also rely onResourceList
to get the classes and check whether they are tests. (For this, a Class instance is required, but perhaphs the output ofgetClassAsStream
can be converted (like inInstrumentingClassLoader
).Steps to Reproduce
mvn install
(as currently 1.1.0 is not yet on Maven Central)mvn evosuite:generate
EvoSuite Arguments
Please provide the whole EvoSuite commmand you executed (if relevant)
mvn evosuite:generate
it translates to:
Current Result
Please describe here below the current result you got (if relevant)
[main] ERROR ProjectAnalyzer - java.lang.ClassNotFoundException: tutorial.LinkedListIterator
Expected result
Please describe here below what should be the expected behaviour (if relevant)
Additional info
Please add any information of interest here below