EvoSuite / evosuite

EvoSuite - automated generation of JUnit test suites for Java classes
http://www.evosuite.org
GNU Lesser General Public License v3.0
841 stars 342 forks source link

can't generate test cases using evoSuite #295

Closed abdess99 closed 4 years ago

abdess99 commented 4 years ago

I created a basic class to try use evosuite for the first time. Here is the class: package calculator;

public class Calcule {

public int multiplie(int a, int b) {
    return a*b;
}

public double divise(int a, int  b) {
    if (b==0) {return 0;}
    else {
    return a/b;
}
}

}

I followed the instructions in the official site and I wrote this command: C:\Users\ghila\OneDrive\Documents\stage\evosuite\calculator>java -jar evosuite-1.0.6.jar -generateSuite -projectCP "bin" -class Calcule.class

But it didn't work and I had this result:

[MASTER] 22:11:46.862 [main] ERROR EvoSuite - Fatal crash on main EvoSuite process. Class using seed 1589227906858. Configuration id : null java.lang.IllegalArgumentException: The target -class should be a JVM qualifying name (e.g., org.foo.SomeClass) and not a bytecode file at org.evosuite.CommandLineParameters.validateInputOptionsAndParameters(CommandLineParameters.java:63) ~[evosuite-1.0.6.jar:1.0.6] at org.evosuite.EvoSuite.parseCommandLine(EvoSuite.java:204) ~[evosuite-1.0.6.jar:1.0.6] at org.evosuite.EvoSuite.main(EvoSuite.java:302) ~[evosuite-1.0.6.jar:1.0.6]

xie132339 commented 1 year ago

这个怎么解决了