TNG / junit-dataprovider

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

Runner is incompatible with categories #14

Closed aburmeis closed 10 years ago

aburmeis commented 10 years ago

A test using a data provider (annotated with @RunWith(DataProviderRunner.class)) fails on initialization with an IllegalArgumentException when JUinit categories are used in the project (not necessary in the test class).

Simply declare an interface and add the category excluded in your suite. The runner will fail which the category filter passed:

java.lang.IllegalArgumentException: Filter description NOT (interface com.tui.test.System OR interface com.tui.test.Integration) is not suppored by DataProviderFilter. at com.tngtech.java.junit.dataprovider.DataProviderFilter.(DataProviderFilter.java:45) at com.tngtech.java.junit.dataprovider.DataProviderRunner.filter(DataProviderRunner.java:42) at org.junit.runner.manipulation.Filter.apply(Filter.java:97) at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:32) at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:80) at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:49) at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:69) at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:50)

aaschmid commented 10 years ago

Thanks for reporting this.