Skip to content

Conversation

@michielgkalkman
Copy link

Hi all,

This is my fix for #537.

Appearently, it is possible to get a Description from a org.junit.runner.Runner with a non-existent classname (or any name actually). This resulted in a ClassNotFoundException when there were no child descriptions, or it resulted in no TestUnits if there were child Descriptions.

I think I fixed those issues. At least the other unit tests still work and my issue is solved :)

Thanks and regards,
Michiel

@hcoles
Copy link
Owner

hcoles commented Jun 3, 2020

Thanks @michielgkalkman, did you try the simpler solution of adding the PMD runner to the blacklist of runners that should not be split? Did that work?

@michielgkalkman
Copy link
Author

Somehow I got the impression that your suggestion was not to be the solution, but it turns out that blacklisting works!

However, it does have the disadvantages that 1) one explicitly needs to add a fully qualified classname (I would at least prefer a configuration option so you can exclude other test runners as well) and 2) the unit tests I provided still fail.

The solution in this pull request might be useful for other test runners. I intend to check out one of the blacklisted test runners and check why they go wrong and if this pull request somehow helps.

Anyway: there seems to be 3 options:

  1. add the PmdTestRunner to the blacklist and ignore the unit tests results
  2. Use my solution
  3. Use the whitelist solution

I know too little of pitest code to be able to say something useful about option 3. Does it have a big impact? If so, it might seem useful to select option 1 or 2 at first and prepare a future release to use option 3.

WDYT?

@michielgkalkman
Copy link
Author

I was not able to find a situation where removing an artifact from the blacklist resulted in problems. Does anyone have an example project which goes wrong after removing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants