use of de.dagere.peass.config.KiekerConfig in project peass by DaGeRe.
the class TestTreeReaderWrongConfig method getTree.
public CallTreeNode getTree() throws IOException, XmlPullParserException, InterruptedException, FileNotFoundException, ViewNotFoundException, AnalysisConfigurationException {
KiekerConfig wrongKiekerConfig = new KiekerConfig(true);
wrongKiekerConfig.setUseAggregation(true);
wrongKiekerConfig.setRecord(AllowedKiekerRecord.DURATION);
final MeasurementConfig config = new MeasurementConfig(1, new ExecutionConfig(15), wrongKiekerConfig);
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.KiekerConfig in project peass by DaGeRe.
the class ContinuousDependencyReaderIT method testBasicVersionReading.
@Order(1)
@Test
public void testBasicVersionReading() throws Exception {
builder.addVersion(new File("../dependency/src/test/resources/dependencyIT/normal_change"), "test 1");
VersionIteratorGit iterator = new VersionIteratorGit(TestConstants.CURRENT_FOLDER);
iterator.goToFirstCommit();
iterator.goToNextCommit();
ExecutionConfig executionConfig = new ExecutionConfig();
executionConfig.setVersion(iterator.getTag());
executionConfig.setVersionOld(iterator.getPrevious().getTag());
ContinuousDependencyReader reader = new ContinuousDependencyReader(DependencyTestConstants.DEFAULT_CONFIG_WITH_VIEWS, executionConfig, new KiekerConfig(true), new PeassFolders(TestConstants.CURRENT_FOLDER), resultsFolders, new EnvironmentVariables());
StaticTestSelection dependencies = reader.getDependencies(iterator, "");
final String lastTag = builder.getTags().get(builder.getTags().size() - 1);
checkVersion(dependencies, lastTag, 1);
ExecutionData executions = Constants.OBJECTMAPPER.readValue(resultsFolders.getTraceTestSelectionFile(), ExecutionData.class);
Assert.assertEquals(2, executions.getVersions().size());
System.out.println(executions.getVersions().keySet());
}
use of de.dagere.peass.config.KiekerConfig in project peass by DaGeRe.
the class ContinuousDependencyReaderIT method testEmptyVersion.
@Order(3)
@Test
public void testEmptyVersion() throws Exception {
final String prevTag = builder.getTags().get(builder.getTags().size() - 1);
GitUtils.goToTag(prevTag, TestConstants.CURRENT_FOLDER);
String newVersion = builder.addVersion(new File("../dependency/src/test/resources/dependencyIT/only_comment_change"), "test 2");
VersionIteratorGit iterator = new VersionIteratorGit(TestConstants.CURRENT_FOLDER);
ExecutionConfig executionConfig = new ExecutionConfig();
executionConfig.setVersion(newVersion);
executionConfig.setVersionOld(iterator.getPrevious().getTag());
ContinuousDependencyReader reader = new ContinuousDependencyReader(DependencyTestConstants.DEFAULT_CONFIG_WITH_VIEWS, executionConfig, new KiekerConfig(true), new PeassFolders(TestConstants.CURRENT_FOLDER), resultsFolders, new EnvironmentVariables());
RTSResult result = reader.getTests(iterator, "", newVersion, new MeasurementConfig(1));
Set<TestCase> tests = result.getTests();
Assert.assertEquals(tests.size(), 0);
}
use of de.dagere.peass.config.KiekerConfig in project peass by DaGeRe.
the class ContinuousDependencyReaderIT method testAnotherVersion.
@Order(2)
@Test
public void testAnotherVersion() throws Exception {
final String prevTag = builder.getTags().get(builder.getTags().size() - 1);
GitUtils.goToTag(prevTag, TestConstants.CURRENT_FOLDER);
String newVersion = builder.addVersion(new File("../dependency/src/test/resources/dependencyIT/basic_state"), "test 2");
VersionIteratorGit iterator = new VersionIteratorGit(TestConstants.CURRENT_FOLDER);
ExecutionConfig executionConfig = new ExecutionConfig();
executionConfig.setVersion(newVersion);
executionConfig.setVersionOld(iterator.getPrevious().getTag());
final ContinuousDependencyReader spiedReader = new ContinuousDependencyReader(DependencyTestConstants.DEFAULT_CONFIG_WITH_VIEWS, executionConfig, new KiekerConfig(true), new PeassFolders(TestConstants.CURRENT_FOLDER), resultsFolders, new EnvironmentVariables());
StaticTestSelection dependencies = spiedReader.getDependencies(iterator, "");
final String lastTag = builder.getTags().get(builder.getTags().size() - 1);
checkVersion(dependencies, lastTag, 2);
ExecutionData executions = Constants.OBJECTMAPPER.readValue(resultsFolders.getTraceTestSelectionFile(), ExecutionData.class);
Assert.assertEquals(3, executions.getVersions().size());
}
use of de.dagere.peass.config.KiekerConfig in project peass by DaGeRe.
the class DependenciesOnlyStartversionIT method testBasicVersionReading.
@Order(1)
@Test
public void testBasicVersionReading() throws Exception {
builder.addVersion(new File("../dependency/src/test/resources/dependencyIT/changed_class"), "test 1");
VersionIteratorGit iterator = new VersionIteratorGit(TestConstants.CURRENT_FOLDER);
iterator.goToFirstCommit();
iterator.goToNextCommit();
ExecutionConfig executionConfig = new ExecutionConfig();
executionConfig.setVersion(iterator.getTag());
executionConfig.setVersionOld(iterator.getPrevious().getTag());
ContinuousDependencyReader reader = new ContinuousDependencyReader(DependencyTestConstants.DEFAULT_CONFIG_NO_VIEWS, executionConfig, new KiekerConfig(true), new PeassFolders(TestConstants.CURRENT_FOLDER), ContinuousDependencyReaderIT.resultsFolders, new EnvironmentVariables());
dependencies = reader.getDependencies(iterator, "");
final String lastTag = builder.getTags().get(builder.getTags().size() - 1);
checkVersion(dependencies, lastTag, 1);
}
Aggregations