Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find Snapshot version 1.0.7 and issues running EvoSuite 1.1.0 on Java 8 and 15 #455

Open
Juvemanu opened this issue May 31, 2023 · 1 comment

Comments

@Juvemanu
Copy link

Juvemanu commented May 31, 2023

Context

Please provide below a detailed introduction to the issue itself, and describe what you were doing when the issue happened. Or, what do you want to achieve?

My initial goal is to generate tests with Evosuite 1.0.6 for specific methods. However, there seems to be a bug in this version as the 'target_method' argument and its derivatives are not working as expected, which is reported in #264. It has been suggested to try the snapshot 1.0.7 in #261 , but I have been unable to find this version. I've tried unsuccessfully to set it in the of the pom file and also tried to get its Docker image from [Docker hub] [https://hub.docker.com/r/evosuite/evosuite]

Having no luck with the previous versions, I tried to run Evosuite version 1.1.0 in every way possible: through the plugin (which I could not find), jar, and Docker. I tried this with Java 8 (jdk1.8.0_202) and Java 15 (jdk-15.0.2). However, test generation fails without even trying to execute for specific methods with both versions of Java.

Steps to Reproduce

For example, with Java 15, it tells me that there is no tools.jar, which makes sense since it was removed after Java 9:

  1. Set the JAVA_HOME environment variable:
    echo %JAVA_HOME%
    C:\Program Files\Java\jdk-15.0.2

  2. Execute EvoSuite:
    java -jar evosuite-1.1.0.jar -class tutorial.LinkedList -projectCP target/classes

This results in a "Fatal crash on main EvoSuite process" with a "RuntimeException: Did not manage to automatically find tools.jar".

The steps are similar with Java 8, but the error output is different. See below for the detailed error output.

EvoSuite Arguments

The EvoSuite command I executed is:
java -jar evosuite-1.1.0.jar -class tutorial.LinkedList -projectCP target/classes

Current Result

With both Java 8 and Java 15, test generation fails, with different error outputs for each. I'll provide more details below.

  1. Java 15: Fatal crash on the main EvoSuite process. RuntimeException: Did not manage to automatically find tools.jar. This is understandable since tools.jar was removed after Java 9.

[MASTER] 19:43:17.872 [main] ERROR EvoSuite - Fatal crash on main EvoSuite process. Class using seed 1685382197867. Configuration id : null java.lang.RuntimeException: Did not manage to automatically find tools.jar. Use -Dtools_jar_location=<path> property at org.evosuite.runtime.agent.ToolsJarLocator.getLoaderForToolsJar(ToolsJarLocator.java:116) at org.evosuite.classpath.ClassPathHacker.initializeToolJar(ClassPathHacker.java:69) at org.evosuite.EvoSuite.parseCommandLine(EvoSuite.java:191) at org.evosuite.EvoSuite.main(EvoSuite.java:115)

  1. Java 8: The test generation starts and finishes without apparent problems. However, during the "Compiling and checking tests" phase, an IllegalStateException error occurs related to the attachment using ByteBuddyAgent$AttachmentProvider$Compound.

[MASTER] 20:50:45.904 [logback-2] ERROR AgentLoader - Exception class java.lang.IllegalStateException: Error during attachment using: org.evosuite.shaded.net.bytebuddy.agent.ByteBuddyA gent$AttachmentProvider$Compound@33bbbd34 , cause class java.lang.reflect.InvocationTargetException null java.lang.IllegalStateException: Error during attachment using: org.evosuite.shaded.net.bytebuddy.agent.ByteBuddyAgent$AttachmentProvider$Compound@33bbbd34 at org.evosuite.shaded.net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:613) at org.evosuite.shaded.net.bytebuddy.agent.ByteBuddyAgent.attach(ByteBuddyAgent.java:273) at org.evosuite.shaded.net.bytebuddy.agent.ByteBuddyAgent.attach(ByteBuddyAgent.java:238)

Additional info

I have used the classes from the official tutorial part 2.

I can provide more detailed error outputs if required.

@reply2techie
Copy link

Let me know if you find an answer. I have a similar issue and Evosuite seems to have stopped rolling out new versions to support jdk 17 and similar upgrades.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants