Junit5: Tests in default package do not get picked up via classpath scanning

Created on 15 Aug 2016  路  4Comments  路  Source: junit-team/junit5

I know it's bad practice, and I don't know (docs don't seem to mention) if it is intended.. but I just tried junit5 for the first time in a little demo project using the java default package. It took some time to realize, but tests only seem to be picked up by the gradle test plugin, if I move them out of the default package namespace.

I could create a sample github project from it, or you tell me this is known and intended as such. :)

Regards,
Oliver

Jupiter Platform discovery bug

All 4 comments

Not picking up classes in the default package is not intended. Please provide a sample project so we can investigate. Thanks!

A sample project shouldn't actually be necessary.

I just confirmed that it is a _bug_ by moving the AssertionsDemo class in the documentation project to the root of the classpath and then running gradle -a :documentation:clean :documentation:test. Before moving the test class, there were 79 tests found; afterwards there were only 73 tests found.

_in progress_

Fixed in master in commit 63c9ff4e4227a336da82350c12f446174411439d.

Was this page helpful?
0 / 5 - 0 ratings