It is probably an error if TestNG cannot find any tests within a singleton jtreg TestNG test (i.e. @run testng TESTCLASS)
jtreg should detect and report that.
---
For classes in a directory of TestNG tests, it is not practical for jtreg to determine from the source code which classes may contain tests, and which classes are merely support classes for the test classes. The lexical presence or absence of annotations is not enough by itself for jtreg to make the determination. Therefore, jtreg treats every class as possibly containing tests, which means that you will get “Total tests run: 0, Failures: 0, Skips: 0 " when trying to find tests in support classes. When we designed the jtreg/TestNG feature, some folk were adamant that there should be no special jtreg tagging on test files, as that would be too onerous on test developers. Therefore we have to live with the risks that tests may not be detected correctly.
jtreg should detect and report that.
---
For classes in a directory of TestNG tests, it is not practical for jtreg to determine from the source code which classes may contain tests, and which classes are merely support classes for the test classes. The lexical presence or absence of annotations is not enough by itself for jtreg to make the determination. Therefore, jtreg treats every class as possibly containing tests, which means that you will get “Total tests run: 0, Failures: 0, Skips: 0 " when trying to find tests in support classes. When we designed the jtreg/TestNG feature, some folk were adamant that there should be no special jtreg tagging on test files, as that would be too onerous on test developers. Therefore we have to live with the risks that tests may not be detected correctly.