use of de.dagere.peass.dependency.analysis.data.TestSet in project peass by DaGeRe.
the class ExecutionData method addEmptyVersion.
public void addEmptyVersion(final String version, final String predecessor) {
TestSet tests = new TestSet();
tests.setPredecessor(predecessor);
versions.put(version, tests);
}
use of de.dagere.peass.dependency.analysis.data.TestSet in project peass by DaGeRe.
the class ExecutionData method versionContainsTest.
@JsonIgnore
public boolean versionContainsTest(final String version, final TestCase currentIterationTest) {
final TestSet clazzExecutions = versions.get(version);
if (clazzExecutions != null) {
for (final Map.Entry<TestCase, Set<String>> clazz : clazzExecutions.entrySet()) {
final TestCase testclazz = clazz.getKey();
final Set<String> methods = clazz.getValue();
if (testclazz.getClazz().equals(currentIterationTest.getClazz()) && methods.contains(currentIterationTest.getMethod())) {
return true;
}
}
}
return false;
}
use of de.dagere.peass.dependency.analysis.data.TestSet in project peass by DaGeRe.
the class StaticTestSelection method toExecutionData.
@JsonIgnore
public ExecutionData toExecutionData() {
ExecutionData executionData = new ExecutionData();
for (Entry<String, VersionStaticSelection> entry : versions.entrySet()) {
TestSet tests = entry.getValue().getTests();
executionData.getVersions().put(entry.getKey(), tests);
}
return executionData;
}
use of de.dagere.peass.dependency.analysis.data.TestSet in project peass by DaGeRe.
the class TreeReader method executeMeasurements.
private void executeMeasurements(final TestCase testcase, final String version) throws IOException, XmlPullParserException, InterruptedException {
executor.loadClasses();
executeKoPeMeKiekerRun(new TestSet(testcase), version, folders.getTreeLogFolder());
}
use of de.dagere.peass.dependency.analysis.data.TestSet in project peass by DaGeRe.
the class JUnitTestTransformer method buildTestMethodSet.
@Override
public TestSet buildTestMethodSet(final TestSet testsToUpdate, final List<File> modules) {
final TestSet tests = new TestSet();
determineVersions(modules);
for (final TestCase clazzname : testsToUpdate.getClasses()) {
final Set<String> currentClazzMethods = testsToUpdate.getMethods(clazzname);
if (currentClazzMethods == null || currentClazzMethods.isEmpty()) {
final File moduleFolder = new File(projectFolder, clazzname.getModule());
final List<TestCase> methods = getTestMethodNames(moduleFolder, clazzname);
for (final TestCase test : methods) {
addTestIfIncluded(tests, test);
}
} else {
for (final String method : currentClazzMethods) {
TestCase test = new TestCase(clazzname.getClazz(), method, clazzname.getModule());
addTestIfIncluded(tests, test);
}
}
}
return tests;
}
Aggregations