public class JUnitAnalyzer extends Object
| Constructor and Description |
|---|
JUnitAnalyzer() |
| Modifier and Type | Method and Description |
|---|---|
protected static File |
createNewTmpDir() |
static int |
handleTestsThatAreUnstable(List<TestCase> tests)
Compile and run all the test cases, and mark as "unstable" all the ones
that fail during execution (ie, unstable assertions).
|
static boolean |
isJavaCompilerAvailable()
Check if it is possible to use the Java compiler.
|
static void |
removeTestsThatDoNotCompile(List<TestCase> tests)
Try to compile each test separately, and remove the ones that cannot be
compiled
|
static boolean |
verifyCompilationAndExecution(List<TestCase> tests)
Deprecated.
not used anymore, as check are done in different methods now, and old "assert" was not really valid
|
public static void removeTestsThatDoNotCompile(List<TestCase> tests)
tests - public static int handleTestsThatAreUnstable(List<TestCase> tests)
If a test fail due to an exception not related to a JUnit assertion, then remove such test from the input list
tests - public static boolean isJavaCompilerAvailable()
protected static File createNewTmpDir()
public static boolean verifyCompilationAndExecution(List<TestCase> tests)
The output of EvoSuite is a set of test cases. For debugging and experiment, we usually would not write any JUnit to file. But we still want to see if test cases can compile and execute properly. As EvoSuite is supposed to only capture the current behavior of the SUT, all generated test cases should pass.
Here we compile to a tmp folder, load and execute the test cases, and then clean up (ie delete all generated files).
tests - Copyright © 2010–2017 EvoSuite. All rights reserved.