I allready wondered about why the report produced by TestNG is looking totally different when TestNG is called in eclipse (via the plugin) than when it is called in the shell (java org.testng.TestNG ...) or the ant-Target <testng>.
So far, i got used to it with the assumption that the reason for the simplier report format in eclipse has someting to do with the needed ability of the plugin to interprete the report for the graphical view?
What really bothers me now is that any information i add to the html-report with the static Reporter.log() method within a method annotated with @After-/BeforeMethod is just shown in the eclipse-report and not at all in ant/shell-report.
It looks like the only supported place to call a striking Reporter.log() for ant/shell is the test-method (@Test) itself.
Any particular reason for that and do i really have to use the Reporter API and an own Repoter for my need?
Thx in advance for any help!
b.t.w., i'm using TestNG in Version 6.5.1
Reporter.log() should definitely add its output to the HTML report, can you post a screen shot of what you mean?
On Mon, May 21, 2012 at 2:54 AM, Jostar <[hidden email]> wrote:
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
Sure i can! :-)
Using the code below for any Test-Class and a testng.xml where it gets executed in a suite,
i get the following two reports and Results/Summary views when executed in ecplise (via plugin) and the shell respectively.
As you can see, in the second report (Screenshot_ShellReport_ReportOutput.png) the lines from the @BeforeClass methods ("Report entry before ClassA/B") are missing.
B.t.w. i neither get the line from the test-method ("Report entry from within testA2") within the summary of the shell-report (Screenshot_ShellReport_Summary.png) as i would expect it. So i have explicitely to look at the "reporter output" and i loose the information from which test-method which report-line was raised.
Hope that helps
------ code snipped of ClassA.java -----
public void classFromA()
System.out.println ("BeforeClass from A");
Reporter.log ("Report entry before ClassA");
public void testA1()
System.out.println (" - testA1");
public void testA2()
System.out.println (" - testA2");
Reporter.log ("Report entry from within testA2");
public void testA3()
System.out.println (" - testA3");
I realized, that the "old style" reports (screenshots 1 and 3) are coming from the old testng eclipse pluging that is installed in our central eclipse distribution (version 184.108.40.20610713_1401).
After installing locally a newer version (220.127.116.1120308_1617) the reports from within eclipse are like the ones from the shell or ant, thus with missing entries in the report output.
As often, sadly, an update of a technology/tool for increased optical comfort came along with decreased functionality... ;)
|Free forum by Nabble||Edit this page|