use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class TestBenchmarkDetection method testMultimoduleBenchmarkDetection.
@Test
public void testMultimoduleBenchmarkDetection() throws FileNotFoundException, IOException, XmlPullParserException {
JmhTestTransformer jmhTransformer = new JmhTestTransformer(JmhTestConstants.MULTIMODULE_VERSION, JMH_CONFIG);
ProjectModules modules = new ProjectModules(Arrays.asList(new File[] { new File(JmhTestConstants.MULTIMODULE_VERSION, "base-module"), new File(JmhTestConstants.MULTIMODULE_VERSION, "using-module") }));
ModuleClassMapping mapping = new ModuleClassMapping(JmhTestConstants.MULTIMODULE_VERSION, modules, new ExecutionConfig());
TestSet tests = jmhTransformer.findModuleTests(mapping, null, modules);
Iterator<TestCase> iterator = tests.getTests().iterator();
TestCase test = iterator.next();
Assert.assertEquals("de.dagere.peass.ExampleBenchmarkBasic#testMethod", test.getExecutable());
TestCase testUsing = iterator.next();
Assert.assertEquals("de.dagere.peass.ExampleBenchmarkUsing#testMethod", testUsing.getExecutable());
}
use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class TestTreeFilter method getTree.
public CallTreeNode getTree() throws IOException, XmlPullParserException, InterruptedException, FileNotFoundException, ViewNotFoundException, AnalysisConfigurationException {
final MeasurementConfig config = new MeasurementConfig(1, new ExecutionConfig(15), new KiekerConfig(true));
config.getStatisticsConfig().setOutlierFactor(18);
TreeReader executor = TreeReaderFactory.createTestTreeReader(projectFolder, config, new EnvironmentVariables());
TestCase test = new TestCase("defaultpackage.TestMe", "testMe");
// executor.executeKoPeMeKiekerRun(new TestSet(test), "1");
CallTreeNode node = executor.getTree(test, "1");
return node;
}
use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class TraceViewGenerator method generateViews.
public boolean generateViews(final ResultsFolders resultsFolders, final TestSet examinedTests) throws IOException, XmlPullParserException, ParseException, ViewNotFoundException, InterruptedException {
LOG.debug("Generating views for {}", version);
boolean allWorked = true;
GitUtils.reset(folders.getProjectFolder());
ProjectModules modules = dependencyManager.getExecutor().getModules();
ExecutionConfig executionConfig = dependencyManager.getTestTransformer().getConfig().getExecutionConfig();
ModuleClassMapping mapping = new ModuleClassMapping(folders.getProjectFolder(), modules, executionConfig);
List<File> classpathFolders = getClasspathFolders(modules);
for (TestCase testcase : examinedTests.getTests()) {
final OneTraceGenerator oneViewGenerator = new OneTraceGenerator(resultsFolders, folders, testcase, traceFileMapping, version, classpathFolders, mapping, kiekerConfig);
final boolean workedLocal = oneViewGenerator.generateTrace(version);
allWorked &= workedLocal;
}
return allWorked;
}
use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class TraceViewGenerator method getClasspathFolders.
private List<File> getClasspathFolders(final ProjectModules modules) {
ExecutionConfig executionConfig = dependencyManager.getTestTransformer().getConfig().getExecutionConfig();
final List<File> files = new LinkedList<>();
for (int i = 0; i < modules.getModules().size(); i++) {
final File module = modules.getModules().get(i);
for (String clazzPath : executionConfig.getClazzFolders()) {
files.add(new File(module, clazzPath));
}
for (String testClazzPath : executionConfig.getTestClazzFolders()) {
files.add(new File(module, testClazzPath));
}
}
return files;
}
use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class PropertyReadHelper method main.
/**
* Just for local debugging purposes - no public use intended
*
* @param args
* @throws IOException
*/
public static void main(final String[] args) throws IOException {
final ChangedEntity ce = new ChangedEntity("org.apache.commons.fileupload.StreamingTest", "");
final Change change = new Change();
change.setChangePercent(-8.0);
change.setMethod("testFILEUPLOAD135");
final File projectFolder2 = new File("../../projekte/commons-fileupload");
final File viewFolder2 = new File("/home/reichelt/daten3/diss/repos/preprocessing/4/commons-fileupload/views_commons-fileupload/");
ExecutionConfig demoConfig = new ExecutionConfig();
demoConfig.setVersion("96f8f56556a8592bfed25c82acedeffc4872ac1f");
demoConfig.setVersionOld("09d16c");
final PropertyReadHelper propertyReadHelper = new PropertyReadHelper(demoConfig, ce, change, projectFolder2, viewFolder2, new File("/tmp/"), null);
propertyReadHelper.read();
}
Aggregations