Gradle

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
To raise new issues or bugs against Gradle, please use forums.gradle.org.
  • Gradle
  • GRADLE-2058

testNG listeners' system out/err is swallowed

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None

Description

My TestNG listener outputs a lot of information in each of onTestXYZ method - when used with Maven and Surefire, it prints a lot of stuff, but using Gradle only what is printed by onFinish method is being printed. Weird, isn't it?

To see it not working please see a project here: https://github.com/tomekkaczanowski/gradle_1009

The output from the listener is not seen anywhere, not on the console nor in the reports. I was able to reproduce this problem with M3->M7

Issue Links

Duplicates

Bug - A problem which impairs or prevents the functions of the product. GRADLE-1252 output of TestNG listeners is not visible

  • Open - The issue is open and ready for the assignee to start work on it.
Related to

Bug - A problem which impairs or prevents the functions of the product. GRADLE-2524 JAVA PLUGIN - test task - Setting of logger (using java.util.logging) is reset to defaults inside the test method (using TestNG)

  • Open - The issue is open and ready for the assignee to start work on it.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • History
  • Activity
  • TeamCity
  • Commits
  • Source
  • Reviews
Hide
Permalink
Szczepan Faber added a comment - 23/Jan/12 4:55 PM

does the listener work at all or its just logging not relayed?

Show
Szczepan Faber added a comment - 23/Jan/12 4:55 PM does the listener work at all or its just logging not relayed?
Hide
Permalink
Tomek Kaczanowski added a comment - 24/Jan/12 1:53 AM

not sure what you are asking - the listener works fine with Maven, but with Gradle it only outputs what is printed by onFinish method, completely ignoring the rest :

// ONLY this one is printed
@Override
public void onFinish(ITestContext context) { System.out.println("onFinish"); }

// the rest is ignored
@Override
public void onStart(ITestContext context) { System.out.println("onStart"); }

@Override
public void onTestStart(ITestResult result) { System.out.println("onTestStart"); }

@Override
public void onTestFailure(ITestResult result) { log(result, "failed"); }

@Override
public void onTestSkipped(ITestResult result) { log(result, "skipped"); }

@Override
public void onTestSuccess(ITestResult result) { log(result, "passed"); }

private synchronized void log(ITestResult result, String string) { System.out.println(result.getMethod() + " " + string); }

Could you please look at the github project? It demonstrates the issue.

Show
Tomek Kaczanowski added a comment - 24/Jan/12 1:53 AM not sure what you are asking - the listener works fine with Maven, but with Gradle it only outputs what is printed by onFinish method, completely ignoring the rest : // ONLY this one is printed @Override public void onFinish(ITestContext context) { System.out.println("onFinish"); } // the rest is ignored @Override public void onStart(ITestContext context) { System.out.println("onStart"); } @Override public void onTestStart(ITestResult result) { System.out.println("onTestStart"); } @Override public void onTestFailure(ITestResult result) { log(result, "failed"); } @Override public void onTestSkipped(ITestResult result) { log(result, "skipped"); } @Override public void onTestSuccess(ITestResult result) { log(result, "passed"); } private synchronized void log(ITestResult result, String string) { System.out.println(result.getMethod() + " " + string); } Could you please look at the github project? It demonstrates the issue.
Hide
Permalink
Szczepan Faber added a comment - 26/Jan/12 8:40 AM

I looked at it and it seems to me that this problem has been apparent in Gradle for some time now. E.g. even with M3 it only prints 'onFinish'. I'll update this ticket.

Show
Szczepan Faber added a comment - 26/Jan/12 8:40 AM I looked at it and it seems to me that this problem has been apparent in Gradle for some time now. E.g. even with M3 it only prints 'onFinish'. I'll update this ticket.
Hide
Permalink
Szczepan Faber added a comment - 06/Sep/12 5:20 AM

possibly a duplicate.

Show
Szczepan Faber added a comment - 06/Sep/12 5:20 AM possibly a duplicate.

People

  • Assignee:
    Unassigned
    Reporter:
    Tomek Kaczanowski
Vote (0)
Watch (3)

Dates

  • Created:
    23/Jan/12 2:30 PM
    Updated:
    22/Oct/12 4:58 AM
  • Atlassian JIRA (v5.0.3#729-sha1:bf569e4)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Gradle. Try JIRA - bug tracking software for your team.