On Wed, 8 Feb 2023 09:32:49 GMT, Jaikiran Pai <j...@openjdk.org> wrote:

> I wonder if testng (and junit) can be configured to fail the test if no test 
> methods were present, to flag such mistakes.

JUnit's CLI tool has:

`--fail-if-no-tests     Fail and return exit status code 2 if no tests are 
found.`

We can add such a check into `jtreg`'s JUnit runner at
https://github.com/openjdk/jtreg/blob/524161b73dca250639ad3f00a42518e384276906/src/share/classes/com/sun/javatest/regtest/agent/JUnitRunner.java#L149-L151

-------------

PR: https://git.openjdk.org/jdk/pull/12426

Reply via email to