I'm generating unit tests with EvoSuite and would like to get as close to 100% code coverage from the resulting unit tests as possible. What are the best command line options/parameters to set to accomplish this?
Asked
Active
Viewed 839 times
1 Answers
1
EvoSuite comes with its parameters already tuned. if you want to improve coverage further, you d need to increase the allotted time for test generation (eg by using -Dsearch_budget parameter), although that cannot guarantee 100% coverage. For more info, see http://www.evosuite.org/documentation/commandline/

arcuri82
- 885
- 1
- 8
- 17
-
That seemed to work well. The default was 60 and I put 600 and went from 50% to 60% coverage. Adding more time didn't help. I see a lot of WARN and MASTER messages in the output. Would finding a solution to them increase code coverage %? – user3057770 Mar 30 '16 at 20:05
-
For example.. [MASTER] 15:22:09.746 [logback-1] WARN TestChromosome - Functional mock problem: org.evosuite.ga.ConstructionFailedException: Failed to add constructor for java.awt.FileDialog due to org.evosuite.ga.ConstructionFailedException: Failed to add constructor for javax.swing.JDialog due to org.evosuite.ga.ConstructionFailedException: Failed to add constructor for java.awt.FileDialog due to org.evosuite.ga.ConstructionFailedException: Failed to add constructor for javax.swing.JDialog due to org.evosuite.ga.ConstructionFailedException: Max recursion depth reached – user3057770 Mar 30 '16 at 20:06
-
and.. [MASTER] 15:17:48.732 [logback-1] WARN TestChromosome - Functional mock problem: org.evosuite.ga.ConstructionFailedException: Error: VariableReference: Statement 14, type java.util.Hashtable
is not assignable to java.util.Map – user3057770 Mar 30 '16 at 20:07 -
and.. [MASTER] 15:17:25.415 [logback-2] ERROR TestCluster - Failed to check cache for java.util.Set
: Type points to itself – user3057770 Mar 30 '16 at 20:09