From Sherman via email:
There is a "complain" that the JTreg report includes "long" stacktrace
for exception from tests that test "@expectedException". It makes
the reading of the report a littler harder, if it includes both successful
tests with expected exceptions and failed tests with the exceptions.
I would assume people only be interested to see the throwable from
the failed ones. I took a quick scan at the related jtreg source,
TestNGAction.RegressionListener.report() currently has the implementation
as
void report(InfoKind k, ITestResult itr) {
System.out.println(k.toString().toLowerCase()
+ " " + itr.getMethod().getConstructorOrMethod()
+ ": " + statusToString(itr.getStatus()));
Throwable t = itr.getThrowable();
if (t != null) {
t.printStackTrace(System.out);
}
}
Is it possible to only print the t.printStackTrace if the itr.getStatus()
is not SUCCESS? or make it configurable?
There is a "complain" that the JTreg report includes "long" stacktrace
for exception from tests that test "@expectedException". It makes
the reading of the report a littler harder, if it includes both successful
tests with expected exceptions and failed tests with the exceptions.
I would assume people only be interested to see the throwable from
the failed ones. I took a quick scan at the related jtreg source,
TestNGAction.RegressionListener.report() currently has the implementation
as
void report(InfoKind k, ITestResult itr) {
System.out.println(k.toString().toLowerCase()
+ " " + itr.getMethod().getConstructorOrMethod()
+ ": " + statusToString(itr.getStatus()));
Throwable t = itr.getThrowable();
if (t != null) {
t.printStackTrace(System.out);
}
}
Is it possible to only print the t.printStackTrace if the itr.getStatus()
is not SUCCESS? or make it configurable?
- relates to
-
CODETOOLS-7900039 TestNG Expected exception stack traces in reports are misleading
-
- Resolved
-