use of de.dagere.peass.dependency.analysis.ModuleClassMapping in project peass by DaGeRe.
the class ContinuousExecutor method analyzeMeasurements.
private void analyzeMeasurements(final File measurementFolder) throws InterruptedException, IOException, JsonGenerationException, JsonMappingException, XmlPullParserException {
final ProjectStatistics statistics = new ProjectStatistics();
TestTransformer testTransformer = ExecutorCreator.createTestTransformer(folders, measurementConfig.getExecutionConfig(), measurementConfig);
TestExecutor executor = ExecutorCreator.createExecutor(folders, testTransformer, env);
ModuleClassMapping mapping = new ModuleClassMapping(folders.getProjectFolder(), executor.getModules(), measurementConfig.getExecutionConfig());
final AnalyseFullData afd = new AnalyseFullData(resultsFolders.getChangeFile(), statistics, mapping, measurementConfig.getStatisticsConfig());
afd.analyseFolder(measurementFolder);
Constants.OBJECTMAPPER.writeValue(resultsFolders.getStatisticsFile(), statistics);
}
use of de.dagere.peass.dependency.analysis.ModuleClassMapping in project peass by DaGeRe.
the class TreeReader method readTree.
private CallTreeNode readTree(final TestCase testcase, final File kiekerTraceFolder) throws AnalysisConfigurationException, IOException, XmlPullParserException {
final ModuleClassMapping mapping = new ModuleClassMapping(folders.getProjectFolder(), executor.getModules(), realConfig.getExecutionConfig());
TreeStage stage = KiekerDurationReader.executeTreeStage(kiekerTraceFolder, testcase, ignoreEOIs, realConfig, mapping);
CallTreeNode root = stage.getRoot();
if (root == null) {
throw new RuntimeException("An error occured - root node of " + testcase + " could not be identified!");
}
return root;
}
use of de.dagere.peass.dependency.analysis.ModuleClassMapping in project peass by DaGeRe.
the class TestPeassFilter method testExecution.
@Test
public void testExecution() throws ViewNotFoundException, IOException, XmlPullParserException, InterruptedException, ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {
Assume.assumeFalse(EnvironmentVariables.isWindows());
PeassFolders folders = new PeassFolders(CURRENT);
final KiekerResultManager manager = new KiekerResultManager(folders, new ExecutionConfig(5), new KiekerConfig(true), new EnvironmentVariables());
final TestSet testset = new TestSet();
final TestCase testcase = new TestCase("defaultpackage.TestMe", "testMe", "");
testset.addTest(testcase);
final ModuleClassMapping mapping = new ModuleClassMapping(manager.getExecutor());
final List<TraceElement> referenceTrace = regenerateTrace(manager, testset, testcase, mapping, 0);
for (int i = 1; i <= 3; i++) {
final List<TraceElement> compareTrace = regenerateTrace(manager, testset, testcase, mapping, i);
checkRegeneratedTrace(referenceTrace, compareTrace);
}
}
use of de.dagere.peass.dependency.analysis.ModuleClassMapping in project peass by DaGeRe.
the class TraceChangeHandler method analyzeTests.
private void analyzeTests(final VersionStaticSelection newVersionInfo, final TestSet testsToRun) throws IOException, XmlPullParserException, InterruptedException, JsonGenerationException, JsonMappingException {
final ModuleClassMapping mapping = new ModuleClassMapping(dependencyManager.getExecutor());
dependencyManager.runTraceTests(testsToRun, version);
handleDependencyChanges(newVersionInfo, testsToRun, mapping);
}
use of de.dagere.peass.dependency.analysis.ModuleClassMapping in project peass by DaGeRe.
the class TestBenchmarkDetection method testBenchmarkDetectionInnerClass.
@Test
public void testBenchmarkDetectionInnerClass() throws FileNotFoundException, IOException, XmlPullParserException {
JmhTestTransformer jmhTransformer = new JmhTestTransformer(JmhTestConstants.INNER_CLASS_VERSION, JMH_CONFIG);
ProjectModules modules = new ProjectModules(JmhTestConstants.INNER_CLASS_VERSION);
TestSet tests = jmhTransformer.findModuleTests(new ModuleClassMapping(JmhTestConstants.INNER_CLASS_VERSION, modules, new ExecutionConfig()), null, modules);
Assert.assertEquals(tests.getTests().size(), 1);
TestCase test = tests.getTests().iterator().next();
Assert.assertEquals("de.dagere.peass.ExampleBenchmark#testMethod", test.getExecutable());
}
Aggregations