use of de.dagere.peass.dependency.statistics.DependencyStatistics in project peass by DaGeRe.
the class RegressionTestSelectionSummarizer method getSimpleTable.
private void getSimpleTable(final File folder) throws IOException, JsonParseException, JsonMappingException, JAXBException {
System.out.println("Project & Versions & Tests & SIC & TIC\\");
for (final File xmlFile : FileUtils.listFiles(folder, new WildcardFileFilter(ResultsFolders.STATIC_SELECTION_PREFIX + "*.json"), TrueFileFilter.INSTANCE)) {
final String projektName = xmlFile.getName().replace(ResultsFolders.STATIC_SELECTION_PREFIX, "").replace(".xml", "");
final File executeFile = new File(xmlFile.getParentFile(), "views_" + projektName + "/execute" + projektName + ".json");
if (xmlFile.exists() && executeFile.exists()) {
final ExecutionData changedTests = Constants.OBJECTMAPPER.readValue(executeFile, ExecutionData.class);
final DependencyStatistics statistics = DependencyStatisticAnalyzer.getChangeStatistics(xmlFile, changedTests);
final double percent = 10000d * statistics.getChangedTraceTests() / statistics.getOverallRunTests();
System.out.println(percent);
System.out.println(projektName + " & " + statistics.getSize() + " & " + statistics.getOverallRunTests() + " & " + statistics.getPruningRunTests() + " & " + statistics.getChangedTraceTests() + " & " + Math.round(percent) / 100d + " %\\");
}
}
}
use of de.dagere.peass.dependency.statistics.DependencyStatistics in project peass by DaGeRe.
the class RegressionTestSelectionSummarizer method getExtendedTable.
private void getExtendedTable(final File folder) throws IOException, JsonParseException, JsonMappingException, JAXBException {
System.out.println("Project;Versions;Normal-Tests;SIC;TIC; Tests once changed; Tests multiple times changed");
for (final File xmlFile : FileUtils.listFiles(folder, new WildcardFileFilter(ResultsFolders.STATIC_SELECTION_PREFIX + "*.json"), TrueFileFilter.INSTANCE)) {
final String projektName = xmlFile.getName().replace(ResultsFolders.STATIC_SELECTION_PREFIX, "").replace(".xml", "");
final File executeFile = new File(xmlFile.getParentFile(), "views_" + projektName + "/execute" + projektName + ".json");
if (xmlFile.exists() && executeFile.exists()) {
final ExecutionData changedTests = Constants.OBJECTMAPPER.readValue(executeFile, ExecutionData.class);
final DependencyStatistics statistics = DependencyStatisticAnalyzer.getChangeStatistics(xmlFile, changedTests);
System.out.println(projektName + ";" + statistics.getSize() + ";" + statistics.getOverallRunTests() + ";" + statistics.getPruningRunTests() + ";" + statistics.getChangedTraceTests() + ";" + statistics.getOnceChangedTests().size() + ";" + statistics.getMultipleChangedTest().size());
}
}
}
Aggregations