use of de.dagere.kopeme.generated.TestcaseType in project peass by DaGeRe.
the class MissingExecutionFinder method removeXMLExecutions.
private void removeXMLExecutions(final File folder) throws JAXBException {
for (final File measurementFile : folder.listFiles()) {
if (measurementFile.getName().endsWith(".xml")) {
LOG.info("File:" + measurementFile);
final Kopemedata data = new XMLDataLoader(measurementFile).getFullData();
for (final TestcaseType testcase : data.getTestcases().getTestcase()) {
final String testmethod = testcase.getName();
for (final Chunk c : testcase.getDatacollector().get(0).getChunk()) {
final String version = findVersion(c);
LOG.debug("Removing {}", version);
final TestSet versionsTests = tests.getVersions().get(version);
if (versionsTests != null) {
removeTestFromTestSet(data.getTestcases().getClazz(), testmethod, versionsTests);
}
}
}
}
}
}
use of de.dagere.kopeme.generated.TestcaseType in project peass by DaGeRe.
the class CopyFromFull method checkFileMerging.
public static void checkFileMerging(final File goal, final ExecutionData tests, final File source) throws JAXBException {
Kopemedata kopemeData = XMLDataLoader.loadData(source);
Testcases testcase = kopemeData.getTestcases();
TestcaseType testcaseType = testcase.getTestcase().get(0);
String clazz = testcase.getClazz();
String method = testcaseType.getName();
TestCase testcase2 = new TestCase(testcase);
List<Chunk> chunks = testcaseType.getDatacollector().get(0).getChunk();
if (!goal.exists()) {
goal.mkdirs();
}
for (Chunk chunk : chunks) {
checkChunkMerging(goal, tests, testcase2, chunk);
}
}
use of de.dagere.kopeme.generated.TestcaseType in project peass by DaGeRe.
the class TestSummaryFileSaving method testSummaryFileSaving.
@Test
public void testSummaryFileSaving() throws JAXBException {
DummyKoPeMeDataCreator.initDummyTestfile(testFolder, TestResult.BOUNDARY_SAVE_FILE / 2, testcase);
final XMLDataLoader loader = new XMLDataLoader(oneResultFile);
loader.readFulldataValues();
Kopemedata oneRunFullData = loader.getFullData();
TestcaseType oneRunData = oneRunFullData.getTestcases().getTestcase().get(0);
final File resultFile = new File(testFolder, "result.xml");
MultipleVMTestUtil.saveSummaryData(resultFile, oneResultFile, oneRunData.getDatacollector().get(0).getResult().get(0), testcase, "1", 0, TimeDataCollector.class.getName());
Assert.assertTrue(resultFile.exists());
}
use of de.dagere.kopeme.generated.TestcaseType in project peass by DaGeRe.
the class MeasurementFileFinder method getDataCollector.
public static Datacollector getDataCollector(final String method, final List<TestcaseType> testcaseList) {
Datacollector datacollector = null;
for (final TestcaseType testcase : testcaseList) {
if (testcase.getName().equals(method)) {
datacollector = testcase.getDatacollector().get(0);
}
}
if (datacollector == null) {
final TestcaseType testcase = new TestcaseType();
testcaseList.add(testcase);
testcase.setName(method);
datacollector = new Datacollector();
testcase.getDatacollector().add(datacollector);
}
return datacollector;
}
use of de.dagere.kopeme.generated.TestcaseType in project peass by DaGeRe.
the class MultipleVMTestUtil method initKopemeData.
public static Kopemedata initKopemeData(final File summaryResultFile, final TestCase testcase) throws JAXBException {
final XMLDataLoader fullDataLoader = new XMLDataLoader(summaryResultFile);
final Kopemedata fullResultData = fullDataLoader.getFullData();
if (fullResultData.getTestcases().getTestcase().size() == 0) {
fullResultData.getTestcases().setClazz(testcase.getClazz());
fullResultData.getTestcases().getTestcase().add(new TestcaseType());
fullResultData.getTestcases().getTestcase().get(0).setName(testcase.getMethod());
}
return fullResultData;
}
Aggregations