use of de.dagere.peass.dependency.KiekerResultManager 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.KiekerResultManager in project peass by DaGeRe.
the class TraceGeneratorStarter method runTests.
private KiekerResultManager runTests(final String newestVersion, final TestSet tests, final PeassFolders folders, final ExecutionConfig executionConfig) throws IOException, XmlPullParserException, InterruptedException, ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {
KiekerResultManager resultsManager = new KiekerResultManager(folders, executionConfig, new KiekerConfig(true), new EnvironmentVariables());
resultsManager.executeKoPeMeKiekerRun(tests, newestVersion, folders.getDependencyLogFolder());
return resultsManager;
}
use of de.dagere.peass.dependency.KiekerResultManager in project peass by DaGeRe.
the class TraceGeneratorStarter method call.
@Override
public Void call() throws Exception {
StaticTestSelection staticTestSelection = Constants.OBJECTMAPPER.readValue(staticSelectionFile, StaticTestSelection.class);
String newestVersion = staticTestSelection.getNewestVersion();
VersionStaticSelection version = staticTestSelection.getVersions().get(newestVersion);
TestSet tests = version.getTests();
ExecutionConfig executionConfig = executionMixin.getExecutionConfig();
NonIncludedTestRemover.removeNotIncluded(tests, executionConfig);
GitUtils.reset(projectFolder);
PeassFolders folders = new PeassFolders(projectFolder);
KiekerResultManager resultsManager = runTests(newestVersion, tests, folders, executionConfig);
LOG.info("Analyzing tests: {}", tests.getTests());
mapping = new ModuleClassMapping(folders.getProjectFolder(), resultsManager.getExecutor().getModules(), executionConfig);
for (TestCase testcase : tests.getTests()) {
writeTestcase(newestVersion, folders, resultsManager, testcase);
}
return null;
}
use of de.dagere.peass.dependency.KiekerResultManager in project peass by DaGeRe.
the class TraceGettingIT method executeTraceGetting.
private void executeTraceGetting(final File project, final String githash) throws IOException, ParseException, ViewNotFoundException, XmlPullParserException, InterruptedException, ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {
DependencyDetectorTestUtil.init(project);
PeassFolders folders = new PeassFolders(TestConstants.CURRENT_FOLDER);
final KiekerResultManager tracereader = new KiekerResultManager(folders, new ExecutionConfig(5), new KiekerConfig(true), new EnvironmentVariables());
final TestSet testset = new TestSet();
testset.addTest(new TestCase("viewtest.TestMe", "test", ""));
tracereader.getExecutor().loadClasses();
tracereader.executeKoPeMeKiekerRun(testset, "1", folders.getDependencyLogFolder());
LOG.debug("Trace-Analysis..");
final boolean worked = analyseTrace(new TestCase("viewtest.TestMe", "test", ""), VIEWS_FOLDER_TEST, new HashMap<>(), githash, tracereader.getXMLFileFolder(TestConstants.CURRENT_FOLDER));
Assert.assertEquals(true, worked);
tracereader.deleteTempFiles();
}
Aggregations