1

I have configured the maven-failsafe-plugin for excluding/including some testcategories:

<plugins>
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.18.1</version>
        <configuration>
            <groups>my.company.SomeImportantCategory</groups>
        </configuration>
    </plugin>
</plugins>

Now I have a parameterized test which is NOT annotated with SomeImportantCategory:

@RunWith(Parameterized.class)
@Category(AnotherCategory.class)
public class SomeTestIT {

    @Parameters(name = "{0}")
    public static Collection<TestData[]> setUp() throws Exception {
        // Loading Some Excel-Sheets. I'm using github.com/fhm84/jexunit
        return doSomethingVeryTimeConsuming("with/this/excel-file.xls");
    }
}

Now I run the integration-tests with this profile. Maven does execute the setUp-Method for collecting test-cases.

Do you know how to skip this? It would be ok for me to access the setUp-Method and do some Java-magic like reading out the included/excluded Groups (how?!?) and skipping doSomethingVeryTimeConsuming using reflection.

Rokko_11
  • 837
  • 2
  • 10
  • 24
  • Have you checked to use the most recent version of maven-failsafe-plugin? See https://maven.apache.org/surefire/maven-failsafe-plugin/ – khmarbaise Dec 16 '16 at 10:15
  • Yes, I tried 2.19.1, but there I had problems with our include/exclude-Patterns. We decided to stay on 2.18.1 – Rokko_11 Dec 16 '16 at 10:43
  • Can you show the full pom file which shows the whole configuration for maven-failsafe-plugin etc. – khmarbaise Dec 16 '16 at 11:43

0 Answers0