例如,我有一个参数化的JUnit 5测试
@EnumSource(Mode.class)
@ParameterizedTest void shouldRunWithMode(Mode mode) {
...
我想从Maven中排除列举的一种情况,如here所述:
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<configuration>
<test>!testpackage.SomeTest#shouldRunWithMode[3 three]</test>
</configuration>
</plugin>
没有!
的同一事物将表示包含,即仅执行此测试。
我玩过排除表达式和方括号,但没有找到使之起作用的组合。
一个演示项目是on GitHub。
我研究了代码,发现没有代码。显然只有JUnit 4支持它。
我将其报告为错误SUREFIRE-1753