use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class TestTraceChangeHandler method testAdding.
@Test
public void testAdding() {
ExecutionConfig emptyConfig = new ExecutionConfig();
VersionStaticSelection versionInfo = new VersionStaticSelection();
ChangedEntity onlyChange = new ChangedEntity("de.dagere.peass.TestA", "testModule", "testA");
versionInfo.getChangedClazzes().put(onlyChange, new TestSet());
TestSet test = getTestSet(emptyConfig, versionInfo);
MatcherAssert.assertThat(test.getTests(), IsIterableContaining.hasItem(new TestCase("de.dagere.peass.TestA", null, "testModule")));
}
use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class TestTraceChangeHandler method testAddingWithMethodIncludes.
@Test
public void testAddingWithMethodIncludes() {
ExecutionConfig executionConfigWithBasicInclude = new ExecutionConfig();
executionConfigWithBasicInclude.getIncludes().add("*MySpecialTestcase#myMethod");
VersionStaticSelection versionInfo = new VersionStaticSelection();
ChangedEntity testA = new ChangedEntity("de.dagere.peass.TestA", "testModule", "testA");
versionInfo.getChangedClazzes().put(testA, new TestSet());
ChangedEntity myIntegrationTest = new ChangedEntity("de.dagere.peass.MySpecialTestcase", "testModule", "myMethod");
versionInfo.getChangedClazzes().put(myIntegrationTest, new TestSet());
TestSet test = getTestSet(executionConfigWithBasicInclude, versionInfo);
MatcherAssert.assertThat(test.getTests(), IsIterableContaining.hasItem(new TestCase("de.dagere.peass.MySpecialTestcase", null, "testModule")));
MatcherAssert.assertThat(test.getTests(), Matchers.not(IsIterableContaining.hasItem(new TestCase("de.dagere.peass.TestA", null, "testModule"))));
}
use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class TestTraceChangeHandler method testAddingWithIncludes.
@Test
public void testAddingWithIncludes() {
ExecutionConfig executionConfigWithBasicInclude = new ExecutionConfig();
executionConfigWithBasicInclude.getIncludes().add("*Test*");
VersionStaticSelection versionInfo = new VersionStaticSelection();
ChangedEntity testA = new ChangedEntity("de.dagere.peass.TestA", "testModule", "testA");
versionInfo.getChangedClazzes().put(testA, new TestSet());
ChangedEntity myIntegrationTest = new ChangedEntity("de.dagere.peass.MyIntegrationT", "testModule", "testA");
versionInfo.getChangedClazzes().put(myIntegrationTest, new TestSet());
TestSet test = getTestSet(executionConfigWithBasicInclude, versionInfo);
MatcherAssert.assertThat(test.getTests(), IsIterableContaining.hasItem(new TestCase("de.dagere.pass.TestA", null, "testModule")));
MatcherAssert.assertThat(test.getTests(), Matchers.not(IsIterableContaining.hasItem(new TestCase("de.dagere.peass.MyIntegrationT", null, "testModule"))));
}
use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class KoPeMeExecutor method getTestGoal.
protected String getTestGoal() {
String testGoal;
ExecutionConfig executionConfig = testTransformer.getConfig().getExecutionConfig();
if (isAndroid) {
testGoal = executionConfig.getTestGoal() != null ? executionConfig.getTestGoal() : "testRelease";
} else {
testGoal = executionConfig.getTestGoal() != null ? executionConfig.getTestGoal() : "test";
}
return testGoal;
}
Aggregations