Possible to suppress toString() on TestNG test method parameters?


(Mark Petrovic) #1

We’re using TestNG DataProviders under Gradlle 1.10. When the TestNG test methods that use these DataProviders are called, the new incubating Gradle feature whereby toString() is called on each test method argument kicks in. Some of these objects have rather large overridden toString() representations, and it’s causing large amounts of console chatter.

Is there a way to turn this toString() off? I tried disabling HTML test reports, but that seemed heavy handed, and didn’t work anyway.

Thanks.


(Luke Daley) #2

There’s currently no way to turn this off atm.


(Mark Petrovic) #3

Got it.

Can I file an issue to have this configurable? Jira says to use the Forums for this, but I don’t know how to affect that from here.


(Luke Daley) #4

Raised as GRADLE-2998.


(Mark Petrovic) #5

Thanks.

I could possibly help fix this. By which I mean if it does not involve deep knowledge of Gradle internals. If you think I could help, where should I start looking? And how should I approach the solution?


(Luke Daley) #6

We want to do this at the display level, so when the feedback is displayed.

A good place to start would be looking at how the console logging is done in the Test task.