use of org.evosuite.junit.writer.TestSuiteWriter in project evosuite by EvoSuite.
the class RegressionSuiteSerializer method storeRegressionArchive.
/**
* Keep the coverage-based archive of the generated tests for disposable testing
*/
public static void storeRegressionArchive() {
TestSuiteChromosome testArchive = getAppendedRegressionSuiteArchive();
// Save the actual unit test suite archive
TestSuiteWriter suiteWriter = new TestSuiteWriter();
suiteWriter.insertTests(testArchive.getTests());
String name = TARGET_CLASS.substring(TARGET_CLASS.lastIndexOf(".") + 1);
String testDir = Properties.TEST_DIR;
LoggingUtils.getEvoLogger().info("* Writing Archive JUnit test case '" + (name + JUNIT_ARCHIVE_SUFFIX) + "' to " + testDir);
suiteWriter.writeTestSuite(name + JUNIT_ARCHIVE_SUFFIX, testDir, testArchive.getLastExecutionResults());
// Serialise the test suite archive
TestSuiteSerialization.saveTests(testArchive, new File(REGRESSION_ARCHIVE_FILE));
}
Aggregations