Bug 348633 - [console] Capture separate console output for each executed JUnit test
Summary: [console] Capture separate console output for each executed JUnit test
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-07 15:28 EDT by Matthew Flint CLA
Modified: 2016-06-13 08:02 EDT (History)
4 users (show)

See Also:


Attachments
[Utils] Attempting to create E:\workspace_UK\TestNGSelenium\test-output\Default suite\Default test.html [Utils] Directory E:\workspace_UK\TestNGSelenium\test-output\Default suite exists: true (136.94 KB, image/png)
2016-06-13 08:02 EDT, vasu vv CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Flint CLA 2011-06-07 15:28:10 EDT
Build Identifier: 20090920-1017

We all love JUnit, and we all love using JUnit in Eclipse.

But when things go wrong, the JUnit view doesn't always have all the hints we need, so we look in the Console too.

Alas, when running many test-cases, the console output can be very cluttered.

I'd like to see console output captured for each individual test case - so I'll know which piece of logging or which exception belongs to which test case.

Reproducible: Couldn't Reproduce

Steps to Reproduce:
There are probably many ways to implement this.

One possibility would be to right-click on a failed test (in the JUnit view) and "Show console output for this failure".
Comment 1 vasu vv CLA 2016-06-13 08:02:55 EDT
Created attachment 262400 [details]
[Utils] Attempting to create E:\workspace_UK\TestNGSelenium\test-output\Default suite\Default test.html [Utils]   Directory E:\workspace_UK\TestNGSelenium\test-output\Default suite exists: true

I am executing the testNG scripts in eclipse (Version: Mars.2 Release (4.5.2)
Build id: 20160218-0600) and windows 7 os, Java version is jdk1.7.0_79.

Scripts are passed but it is showing some unnecessary messages.
--------------------------
[TestNG] Running:
  C:\Users\Testing\AppData\Local\Temp\testng-eclipse-50444336\testng-customsuite.xml

Connecting to the database...
Opening the Browser
Executing Login Testcase..
Close the Browser
Opening the Browser
Executing user registration testcase
Close the Browser
Disconnecting from the database
[Utils] Attempting to create E:\workspace_UK\TestNGSelenium\test-output\Default suite\Default test.html
[Utils]   Directory E:\workspace_UK\TestNGSelenium\test-output\Default suite exists: true
[Utils] Attempting to create E:\workspace_UK\TestNGSelenium\test-output\Default suite\Default test.xml
[Utils]   Directory E:\workspace_UK\TestNGSelenium\test-output\Default suite exists: true
PASSED: doLogin
PASSED: userReg

===============================================
    Default test
    Tests run: 2, Failures: 0, Skips: 0
===============================================


===============================================
Default suite
Total tests run: 2, Failures: 0, Skips: 0
===============================================

[TestNG] Time taken by org.testng.reporters.jq.Main@6e2f0180: 86 ms
[Utils] Attempting to create E:\workspace_UK\TestNGSelenium\test-output\old\Default suite\toc.html
[Utils]   Directory E:\workspace_UK\TestNGSelenium\test-output\old\Default suite exists: true
[Utils] Problem creating output directory E:\workspace_UK\TestNGSelenium\test-output\old\Default suite
[Utils] Attempting to create E:\workspace_UK\TestNGSelenium\test-output\old\Default suite\Default test.properties
[Utils]   Directory E:\workspace_UK\TestNGSelenium\test-output\old\Default suite exists: true
[Utils] Problem creating output directory E:\workspace_UK\TestNGSelenium\test-output\old\Default suite
[Utils] Attempting to create E:\workspace_UK\TestNGSelenium\test-output\old\Default suite\index.html
[Utils]   Directory E:\workspace_UK\TestNGSelenium\test-output\old\Default suite exists: true
[Utils] Problem creating output directory E:\workspace_UK\TestNGSelenium\test-output\old\Default suite
[Utils] Attempting to create E:\workspace_UK\TestNGSelenium\test-output\old\Default suite\main.html
[Utils]   Directory E:\workspace_UK\TestNGSelenium\test-output\old\Default suite exists: true
[Utils] Problem creating output directory E:\workspace_UK\TestNGSelenium\test-output\old\Default suite
[Utils] Attempting to create E:\workspace_UK\TestNGSelenium\test-output\old\Default suite\groups.html
[Utils]   Directory E:\workspace_UK\TestNGSelenium\test-output\old\Default suite exists: true
[Utils] Problem creating output directory E:\workspace_UK\TestNGSelenium\test-output\old\Default suite
[Utils] Problem creating output directory E:\workspace_UK\TestNGSelenium\test-output\old\Default suite
[Utils] Problem creating output directory E:\workspace_UK\TestNGSelenium\test-output\old\Default suite
[Utils] Attempting to create E:\workspace_UK\TestNGSelenium\test-output\old\Default suite\classes.html
[Utils]   Directory E:\workspace_UK\TestNGSelenium\test-output\old\Default suite exists: true
[Utils] Problem creating output directory E:\workspace_UK\TestNGSelenium\test-output\old\Default suite
[Utils] Attempting to create E:\workspace_UK\TestNGSelenium\test-output\old\Default suite\reporter-output.html
[Utils]   Directory E:\workspace_UK\TestNGSelenium\test-output\old\Default suite exists: true
[Utils] Problem creating output directory E:\workspace_UK\TestNGSelenium\test-output\old\Default suite
[Utils] Attempting to create E:\workspace_UK\TestNGSelenium\test-output\old\Default suite\methods-not-run.html
[Utils]   Directory E:\workspace_UK\TestNGSelenium\test-output\old\Default suite exists: true
[Utils] Problem creating output directory E:\workspace_UK\TestNGSelenium\test-output\old\Default suite
[Utils] Attempting to create E:\workspace_UK\TestNGSelenium\test-output\old\Default suite\testng.xml.html
[Utils]   Directory E:\workspace_UK\TestNGSelenium\test-output\old\Default suite exists: true
[Utils] Attempting to create E:\workspace_UK\TestNGSelenium\test-output\old\index.html
[Utils]   Directory E:\workspace_UK\TestNGSelenium\test-output\old exists: true
[TestNG] Time taken by org.testng.reporters.SuiteHTMLReporter@2b155ce8: 111 ms
[TestNG] Time taken by [FailedReporter passed=0 failed=0 skipped=0]: 0 ms
[TestNG] Time taken by org.testng.reporters.XMLReporter@6244b22e: 10 ms
[Utils] Attempting to create E:\workspace_UK\TestNGSelenium\test-output\junitreports\TEST-sample.LoginTest.xml
[Utils]   Directory E:\workspace_UK\TestNGSelenium\test-output\junitreports exists: true
[TestNG] Time taken by org.testng.reporters.JUnitReportReporter@6ed76e89: 6 ms
[TestNG] Time taken by org.testng.reporters.EmailableReporter2@43775b59: 9 ms