TNG / junit-dataprovider

A TestNG like dataprovider runner for JUnit with many additional features
Apache License 2.0
246 stars 164 forks source link

DataProviderFilter throws IllegalArgumentException if using maven with categories filter #16

Closed aaschmid closed 10 years ago

aaschmid commented 10 years ago

A maven project using a JUnit data provider which is used with

<plugin>
      <artifactId>maven-surefire-plugin</artifactId>
      <version>2.11</version>
      <configuration>
        <groups>com.mycompany.SlowTests</groups>
      </configuration>
</plugin>

fails with following error/stacktrace:

[ERROR] java.lang.IllegalArgumentException: Filter class org.apache.maven.surefire.common.junit48.FilterFactory$GroupMatcherCategoryFilter with description *de.maxdome.commons.testsupport.category.Unit is not supported by DataProviderFilter. [ERROR] at com.tngtech.java.junit.dataprovider.DataProviderFilter.(DataProviderFilter.java:44) [ERROR] at com.tngtech.java.junit.dataprovider.DataProviderRunner.filter(DataProviderRunner.java:43) [ERROR] at org.junit.runner.manipulation.Filter.apply(Filter.java:97) [ERROR] at org.junit.runners.ParentRunner.filter(ParentRunner.java:328) [ERROR] at org.junit.runner.manipulation.Filter.apply(Filter.java:97) [ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper$FilteringRequest.(JUnitCoreWrapper.java:56) [ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createReqestAndRun(JUnitCoreWrapper.java:131) [ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:111) [ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:84) [ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:135) [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200) [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)

aaschmid commented 10 years ago

https://github.com/TNG/junit-dataprovider/issues/14 fixed this just for internal Categoriesrunner but not for the external defined ones.