Search in sources :

Example 1 with XMLDataStorer

use of de.dagere.kopeme.datastorage.XMLDataStorer in project peass by DaGeRe.

the class MavenTestExecutorMocker method writeValue.

public static synchronized void writeValue(final PeassFolders folders, final int average) throws JAXBException {
    final File measurementFile = new File(folders.getTempMeasurementFolder(), "de.peass.MyTest");
    measurementFile.mkdirs();
    final XMLDataStorer storer = new XMLDataStorer(measurementFile, "de.peass.MyTest", "test");
    Result result = buildResult(average);
    buildFulldata(average, result);
    System.out.println("Measurement file exists: " + measurementFile.exists());
    storer.storeValue(result, "de.peass.MyTest", TimeDataCollector.class.getName());
    System.out.println("Storing success");
}
Also used : TimeDataCollector(de.dagere.kopeme.datacollection.TimeDataCollector) XMLDataStorer(de.dagere.kopeme.datastorage.XMLDataStorer) File(java.io.File) Result(de.dagere.kopeme.generated.Result)

Example 2 with XMLDataStorer

use of de.dagere.kopeme.datastorage.XMLDataStorer in project peass by DaGeRe.

the class DummyKoPeMeDataCreator method initDummyTestfile.

public static void initDummyTestfile(final File methodFolder, final int iterations, final TestCase testcase) throws JAXBException {
    XMLDataStorer storer = new XMLDataStorer(methodFolder, testcase.getClazz(), testcase.getMethod());
    final Result result = new Result();
    result.setValue(15);
    result.setIterations(iterations);
    initDummyFulldata(result, iterations);
    storer.storeValue(result, testcase.getExecutable(), TimeDataCollector.class.getName());
}
Also used : TimeDataCollector(de.dagere.kopeme.datacollection.TimeDataCollector) XMLDataStorer(de.dagere.kopeme.datastorage.XMLDataStorer) TestResult(de.dagere.kopeme.datacollection.TestResult) Result(de.dagere.kopeme.generated.Result)

Aggregations

TimeDataCollector (de.dagere.kopeme.datacollection.TimeDataCollector)2 XMLDataStorer (de.dagere.kopeme.datastorage.XMLDataStorer)2 Result (de.dagere.kopeme.generated.Result)2 TestResult (de.dagere.kopeme.datacollection.TestResult)1 File (java.io.File)1