Search in sources :

Example 66 with ExecutionConfig

use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.

the class TestNonIncludedTestRemover method testWithSetExclude.

@Test
public void testWithSetExclude() {
    Set<TestCase> tests = new HashSet<TestCase>();
    tests.add(new TestCase("TestA", "method1"));
    tests.add(new TestCase("TestA", "method2"));
    tests.add(new TestCase("TestB", "method3"));
    tests.add(new TestCase("TestC", null));
    tests.add(new TestCase("TestD", null));
    ExecutionConfig executionConfig = new ExecutionConfig(Arrays.asList(new String[] { "TestA#*", "TestC" }), "test");
    executionConfig.setExcludes(Arrays.asList(new String[] { "TestA#method2" }));
    NonIncludedTestRemover.removeNotIncluded(tests, executionConfig);
    Assert.assertEquals(2, tests.size());
}
Also used : TestCase(de.dagere.peass.dependency.analysis.data.TestCase) ExecutionConfig(de.dagere.peass.config.ExecutionConfig) HashSet(java.util.HashSet) Test(org.junit.jupiter.api.Test)

Example 67 with ExecutionConfig

use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.

the class TestNonIncludedTestRemover method testWithSet.

@Test
public void testWithSet() {
    Set<TestCase> tests = new HashSet<TestCase>();
    tests.add(new TestCase("TestA", "method1"));
    tests.add(new TestCase("TestA", "method2"));
    tests.add(new TestCase("TestB", "method3"));
    tests.add(new TestCase("TestC", null));
    tests.add(new TestCase("TestD", null));
    NonIncludedTestRemover.removeNotIncluded(tests, new ExecutionConfig(Arrays.asList(new String[] { "TestA#method1", "TestC" }), "test"));
    Assert.assertEquals(2, tests.size());
}
Also used : TestCase(de.dagere.peass.dependency.analysis.data.TestCase) ExecutionConfig(de.dagere.peass.config.ExecutionConfig) HashSet(java.util.HashSet) Test(org.junit.jupiter.api.Test)

Example 68 with ExecutionConfig

use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.

the class TestGetModules method testOtherPl1.

@Test
public void testOtherPl1() {
    File pomFile = new File("src/test/resources/maven-multimodule-pl-example/basic_state/pom.xml");
    ExecutionConfig config = new ExecutionConfig();
    config.setPl("de.peass:inner-module-1");
    ProjectModules modules = MavenPomUtil.getModules(pomFile, config);
    Assert.assertEquals(2, modules.getModules().size());
}
Also used : ProjectModules(de.dagere.peass.execution.utils.ProjectModules) ExecutionConfig(de.dagere.peass.config.ExecutionConfig) File(java.io.File) Test(org.junit.jupiter.api.Test)

Example 69 with ExecutionConfig

use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.

the class TestGetModules method testOtherPl2.

@Test
public void testOtherPl2() {
    File pomFile = new File("src/test/resources/maven-multimodule-pl-example/basic_state/pom.xml");
    ExecutionConfig config = new ExecutionConfig();
    config.setPl("de.peass:inner-module-test2");
    ProjectModules modules = MavenPomUtil.getModules(pomFile, config);
    Assert.assertEquals(3, modules.getModules().size());
}
Also used : ProjectModules(de.dagere.peass.execution.utils.ProjectModules) ExecutionConfig(de.dagere.peass.config.ExecutionConfig) File(java.io.File) Test(org.junit.jupiter.api.Test)

Example 70 with ExecutionConfig

use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.

the class TestGetModules method testPeassWithPl.

@Test
public void testPeassWithPl() {
    File pomFile = new File("../pom.xml");
    ExecutionConfig config = new ExecutionConfig();
    config.setPl("measurement");
    ProjectModules modules = MavenPomUtil.getModules(pomFile, config);
    Assert.assertEquals(2, modules.getModules().size());
}
Also used : ProjectModules(de.dagere.peass.execution.utils.ProjectModules) ExecutionConfig(de.dagere.peass.config.ExecutionConfig) File(java.io.File) Test(org.junit.jupiter.api.Test)

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