-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filters doesn't work #6
Comments
From initial research it seems that solution for eclipse would break support in IntelliJ Idea. Currently when describing a test, we return description for whole method. So when Idea is asked to run test which is parametrized (e.g. "myTest"), it asks for description of each test separately. Currently it delegates to |
Here is another workaround I found to get this working in Eclipse, so that you can run individual parametrized tests: Window | Preferences, Java -> Installed JREs. Pick your default JRE and click Edit. In Default VM arguments, add This makes the parametrized test appear as one item in the JUnit view. It works, but the downside is you cannot see the parameters. |
so... Eclipse user cannot use JUnitParams..... |
Hi!
I am also doing JUnit extension/runner and I discovered your nice lib so I wanted to test my stuff with yours.
But filters doesn't seems to work as it should. Also the rule for test name seems to be broken. I file another issue for that. JUnits own parameter support works with filters.
I have some small test that you can run.
Here is the test (sorry I used your package name):
And here is the sample test that uses the runner:
The error I got is like this:
If you happen to use Eclipse then you can see that filters doesn't work to.
First select any test class that uses the runner and do "Run as JUnit". It will run fine. But when you want to just re-run one of the parameterized tests (one of the "children") then it will not work. (in the JUnit runner view)
I actually tried to see if I could fix it but alas I got a bit confused about the concepts in JUnit4 ;-)
I suspect that the root cause is that the JUnitParamsRunner extends BlockJUnit4ClassRunner which in turn is a runner for FrameworkMethod(s). In JUnitParamsRunner instance for the above test there will only be one (1) FrameworkMethod,
isAdult(junitparams.TestSampleJunit4JUnitParams)
but the filter is for[0] Person of age: 13, false (isAdult)(junitparams.TestSampleJunit4JUnitParams)
.First I thought that you faked one FrameworkMethod for each combination of method and parameters but then I saw that was nto the case. But maybe that could be a solution.
Cheers
Lucas
The text was updated successfully, but these errors were encountered: