use of de.dagere.peass.analysis.changes.ProjectChanges in project peass by DaGeRe.
the class TestChangeReader method testParameterizedUsage.
@Test
public void testParameterizedUsage() throws JAXBException, JsonProcessingException {
ChangeReader reader = new ChangeReader("demo-parameterized", new ExecutionData());
ProjectChanges changes = reader.readFile(TestAnalyseFullData.PARAM_DATA_FOLDER);
System.out.println(Constants.OBJECTMAPPER.writeValueAsString(changes));
List<Change> methodChanges = checkParameterizedResult(changes);
Assert.assertEquals(4232151.27, methodChanges.get(0).getOldTime(), 0.1);
}
use of de.dagere.peass.analysis.changes.ProjectChanges in project peass by DaGeRe.
the class ContinuousExecutorIT method checkChangesJson.
private void checkChangesJson() throws IOException, JsonParseException, JsonMappingException {
File changeFile = new File(fullPeassFolder, "changes.json");
ProjectChanges changes = Constants.OBJECTMAPPER.readValue(changeFile, ProjectChanges.class);
String changedTestClass = changes.getVersion("ff2ab99a0d24c90abe610fb318a17db6da473208").getTestcaseChanges().keySet().iterator().next();
TestCase tc = new TestCase(changedTestClass);
Assert.assertEquals("com.example.android_example.ExampleUnitTest", tc.getClazz());
}
use of de.dagere.peass.analysis.changes.ProjectChanges in project peass-ci-plugin by jenkinsci.
the class MeasureVersionBuilder method measure.
private void measure(final Run<?, ?> run, final LocalPeassProcessManager processManager, final Set<TestCase> tests) throws IOException, InterruptedException, JAXBException, JsonParseException, JsonMappingException, JsonGenerationException, Exception {
boolean worked = processManager.measure(tests);
if (!worked) {
run.setResult(Result.FAILURE);
return;
}
ProjectChanges changes = processManager.visualizeMeasurementResults(run);
if (executeRCA) {
final CauseSearcherConfig causeSearcherConfig = generateCauseSearchConfig();
boolean rcaWorked = processManager.rca(changes, causeSearcherConfig);
if (!rcaWorked) {
run.setResult(Result.FAILURE);
return;
}
processManager.visualizeRCAResults(run, changes);
}
}
Aggregations