Closed codecholeric closed 5 months ago
I noticed that this junit.testFilter does not allow us to distinguish @ArchTests defined as fields and @ArchTests defined as methods, which could have the same member name, but that's probably not needed in practice.
Yes, I was aware of that, but as you wrote, I doubt that will really be a problem in practice. If it is, we can still ponder about making this more powerful. But, let's see first if there are really requirements for this...
Currently there is no convenient way to execute a single
@ArchTest
rule of a test running with JUnit 4 or 5 support. As a simple mitigation we now provide the possibility to filter a single test viaarchunit.properties
/ system property. This change allows to e.g. passto a test run, which will then filter the tests and only run the
@Archtest
fields or methods with the given name(s).For now we don't support any wildcards or narrowing the match down by surrounding class name to see if this feature is even missed by users. Basic filtering for classes or packages should already be supported by the respective test launcher (i.e. both JUnit 4 and 5 support should respect filter requests for classes or packages already).
Issue: #641