Search in sources :

Example 71 with ExecutionConfig

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")));
}
Also used : TestCase(de.dagere.peass.dependency.analysis.data.TestCase) VersionStaticSelection(de.dagere.peass.dependency.persistence.VersionStaticSelection) ChangedEntity(de.dagere.peass.dependency.analysis.data.ChangedEntity) ExecutionConfig(de.dagere.peass.config.ExecutionConfig) TestSet(de.dagere.peass.dependency.analysis.data.TestSet) Test(org.junit.jupiter.api.Test)

Example 72 with ExecutionConfig

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"))));
}
Also used : TestCase(de.dagere.peass.dependency.analysis.data.TestCase) VersionStaticSelection(de.dagere.peass.dependency.persistence.VersionStaticSelection) ChangedEntity(de.dagere.peass.dependency.analysis.data.ChangedEntity) ExecutionConfig(de.dagere.peass.config.ExecutionConfig) TestSet(de.dagere.peass.dependency.analysis.data.TestSet) Test(org.junit.jupiter.api.Test)

Example 73 with ExecutionConfig

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"))));
}
Also used : TestCase(de.dagere.peass.dependency.analysis.data.TestCase) VersionStaticSelection(de.dagere.peass.dependency.persistence.VersionStaticSelection) ChangedEntity(de.dagere.peass.dependency.analysis.data.ChangedEntity) ExecutionConfig(de.dagere.peass.config.ExecutionConfig) TestSet(de.dagere.peass.dependency.analysis.data.TestSet) Test(org.junit.jupiter.api.Test)

Example 74 with ExecutionConfig

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;
}
Also used : ExecutionConfig(de.dagere.peass.config.ExecutionConfig)

Aggregations

ExecutionConfig (de.dagere.peass.config.ExecutionConfig)74 Test (org.junit.jupiter.api.Test)49 File (java.io.File)40 PeassFolders (de.dagere.peass.folders.PeassFolders)29 TestCase (de.dagere.peass.dependency.analysis.data.TestCase)23 KiekerConfig (de.dagere.peass.config.KiekerConfig)21 EnvironmentVariables (de.dagere.peass.execution.utils.EnvironmentVariables)20 ChangedEntity (de.dagere.peass.dependency.analysis.data.ChangedEntity)14 StaticTestSelection (de.dagere.peass.dependency.persistence.StaticTestSelection)14 FakeFileIterator (de.dagere.peass.dependencytests.helper.FakeFileIterator)13 TestSet (de.dagere.peass.dependency.analysis.data.TestSet)12 ProjectModules (de.dagere.peass.execution.utils.ProjectModules)12 DependencyReader (de.dagere.peass.dependency.reader.DependencyReader)11 VersionIteratorGit (de.dagere.peass.vcs.VersionIteratorGit)11 GitUtils (de.dagere.peass.vcs.GitUtils)10 ResultsFolders (de.dagere.peass.folders.ResultsFolders)9 ModuleClassMapping (de.dagere.peass.dependency.analysis.ModuleClassMapping)7 VersionIterator (de.dagere.peass.vcs.VersionIterator)7 HashSet (java.util.HashSet)7 ChangeManager (de.dagere.peass.dependency.ChangeManager)6