0

I follow the evosuite maven documentation to generate unit test cases for my project. Below is the command I've used:

mvn -DmemoryInMB=2000 -Dcores=2 evosuite:generate evosuite:export  test

The tool takes around 1 hour to generate test cases for my project (with 9700 lines of Java code). However when it proceed to mvn test phase, all test cases failed with the same message:

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec <<< FAILURE! - in com.xxx.yyy.util.Messages_ESTest
com.xxx.yyy.util.Messages_ESTest  Time elapsed: 0 sec  <<< ERROR!
java.lang.IllegalStateException: Trying to set up the sandbox while executing a test case
    at <evosuite>.<evosuite>(<evosuite>)
    at <evosuite>.<evosuite>(<evosuite>)
    at <evosuite>.<evosuite>(<evosuite>)

While running the generated test case in Intellij IDEA most of them can pass the test:

enter image description here

Any one got any idea?

Gelin Luo
  • 14,035
  • 27
  • 86
  • 139

1 Answers1

0

this is clearly a bug, which would be best to report on

https://github.com/EvoSuite/evosuite/issues

furthermore, currently in 1.0.3 the tests generated by EvoSuite do not work well with "mvn test". The fix is already in the SNAPSHOT though, and will be part of next release. However, the "Trying to set up the sandbox" might be a new bug as I haven't seen it before... :(

arcuri82
  • 885
  • 1
  • 8
  • 17