RFR: 7904071: JTReg should report stats of test collections
Christian Stein
cstein at openjdk.org
Tue Sep 2 08:14:59 UTC 2025
On Mon, 1 Sep 2025 15:28:10 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:
>> Please review this change accumulating the count numbers of TestNG's and JUnit's text report files and prints them after a test run as follows:
>>
>>> `Framework-based tests: 188, TestNG: 104, JUnit: 84`
>>
>> Note that an internal, yet public, API of `SummaryReporter` was changed to be package-private now.
>
> src/share/classes/com/sun/javatest/regtest/report/RegressionReporter.java line 119:
>
>> 117: if (sumOfCounts > 0) {
>> 118: log.println(String.format("Framework-based tests: %d, TestNG: %d, JUnit: %d",
>> 119: sumOfCounts, countTestNG, countJUnit));
>
> I'd skip printing `sumOfCounts` and only print the individual testNG and JUnit counts; without looking at the code it's not clear to me that "Framework-based tests" is a sum of the two.
>
> While at it, any chance to print the number of skipped test cases in JUnit / testNG?
The sum of both (or more frameworks) is our interesting stat and also (almost) invariant for the conversion to JUnit Jupiter API. Happy to fine-tune the pattern to something more like
`Framework-based tests: 188 = 104 TestNG + 84 JUnit`
> While at it, any chance to print the number of skipped test cases in JUnit / testNG?
That information (and much more) is present in the respective `junit.txt` and `testng.txt` summary report files. I'd like to keep the output on the console concise - but linking those files would be an option; similar to what we do for the html report, for example.
-------------
PR Review Comment: https://git.openjdk.org/jtreg/pull/283#discussion_r2315279968
More information about the jtreg-dev
mailing list