Questions tagged [evosuite]

EvoSuite is a Java tool used to automatically generate JUnit test cases.

EvoSuite is a tool that automatically generates test cases with assertions for classes written in Java code. To achieve this, EvoSuite applies a hybrid approach that generates and optimizes whole test suites towards satisfying a coverage criterion. For the produced test suites, EvoSuite suggests possible oracles by adding small and effective sets of assertions that concisely summarize the current behavior; these assertions allow the developer to detect deviations from expected behavior, and to capture the current behavior in order to protect against future defects breaking this behaviour.

The tool is available as a maven, Eclipse, or IntelliJ plugin, from the EvoSuite web site

More information:

  • Gordon Fraser and Andrea Arcuri. EvoSuite: automatic test suite generation for object-oriented software. Proceedings of the 19th ACM SIGSOFT symposium and the 13th European conference on Foundations of software engineering. ACM, 2011. (pdf).
60 questions
0
votes
0 answers

Can we generate a test suite for the entire jar with Evosuite?

I want to generate a test suite for a whole jar with Evosuite. When I use for example the following command : $EVOSUITE0 -target commons-cli-1.5.0.jar --generateSuite -generateRandom --continuous=execute -Dctg_time=21 or the following…
0
votes
0 answers

How to turn a test method into evosuite test case suite

I am working on generating test case for Java unit (i.e. method). My output is in form of a Java test method, just like public void testToInt() { assertEquals(0, NumberUtils.toInt("0")); assertEquals(1, NumberUtils.toInt("1")); …
Herb
  • 91
  • 1
  • 5
0
votes
0 answers

Evosuite is not considering coverage in dependency classes

I am trying to use Evosuite to generate tests for a single entry point in a project. It is only considering coverage in the entry point class. Minimal example: public final class A { private A() {} public static void test(int a) { if…
0
votes
1 answer

Maven Test with Evosuite-generated Test Cases

I am using Evosuite to generate test cases for my app via Maven and I've followed all of the steps that are outlined in the Evosuite documentation. I see that all of the test classes have been generated and the export copy the classes to the test…
Stan
  • 1
  • 1
0
votes
1 answer

Surefire throws SurefireReflectionException while class is on classpath

I'm trying to run unit tests generated by evosuite but the maven-surefire-plugin is throwing a classnotfound error while the "missing" class appears to be in the classpath. When I try to run the tests the debug log shows that evosuite is on the…
0
votes
1 answer

I am not able to add evosuite plugin to my eclipse

I installed eclipse Luna downloaded evosuite jar from https://www.evosuite.org/update/ Added this jar to my project project-->build path-->configure build path-->Libraries-->Add external jars 4)Eclipse -->help-->InstallNew…
0
votes
1 answer

Evosuite Plugin Issue with Java 11

I'm facing issues with Evosuite maven plugin (version 1.0.6) when upgrading from Java 8 to Java 11. While running maven build, evosuite test class failed with the error java.lang.ClassNotFoundException Caused by: java.lang.IllegalArgumentException…
Shihad Salam
  • 79
  • 2
  • 11
0
votes
0 answers

Missing Artifact ID when adding Evosuite plugin into Maven project in Visual Studio code

I used the command palette to add the following dependencies into my pom.xml file: org.jboss.maven.surefire.modular maven-surefire-plugin
0
votes
0 answers

How to configure properties for evosuite maven plugin in the pom file?

I need to set a property for evosuite through maven. The property is assertion_strategy and I want to set it to all I tried to pass it through the maven commandm didn't work. I also tried to set it through the pom, but I guess I'm not using the…
Rotem Barak
  • 154
  • 1
  • 9
0
votes
0 answers

How to get more (all) corner cases while Evosuite test generation?

My sample target code to cover by tests looks like this : public class Calculator { public int div(final int a, final int b) { if (b > 3) { return a/(b-5); } else { return a/(b-1); } } } I'm expecting tests with…
0
votes
1 answer

How can I fix the NoClassDefFoundError error that occurs when using evosuite to generate test cases?

I got this error when I used evosuite to generate test cases with my android project. In the beginning, there was such an error:“can not find this class:android.support.v7.widget.Toolbar” I solved this problem by adding Android's jar…
PX Cheng
  • 101
  • 1
  • 6
0
votes
1 answer

Allow Evosuite to write files during test generation

Im currently trying to get Evosuite to work with JNA. Consider the following basic example: import com.sun.jna.ptr.IntByReference; public class Example { public static int foo(int x) { IntByReference c = new IntByReference(x); …
leon-w
  • 93
  • 1
  • 6
0
votes
0 answers

How do I resolve oracle jdbc proxy class error in Evosuite generated tests?

I've written a JDBC driver and I'm trying to use Evosuite to generate the tests for it. I'm using the following command line: mvn -Dcores=5 -DmemoryInMB=5000 -Dmock_if_no_generator=false -DextraArgs=' -Dmock_if_no_generator=false…
0
votes
1 answer

EvoSuite is not generating any tests

I installed the "EvoSuite" plugin for automatic JUnit test generation in IntelliJ and I tried some example codes / projects. Non of these projects would make EvoSuite to generate any tests at all. Only a default test is being generated with an empty…
0
votes
1 answer

Exception while running EvoSuite tests related to Security manager

I'm trying to run EvoSuite tests with this tutorial. I'm able to generate test classes and compile them using java 8. However, when try to run it using the below command, an exception is thrown. java -cp…
Aarati
  • 321
  • 1
  • 10