cbeust/testng — pull request #297 by atomicknight (2012-10-30 16:21:03+00:00)
Title: New emailable reporter implementation

As promised, here is a new emailable reporter implementation that was rewritten from scratch to address issue #219. The final output is mostly the same, though I stripped out some redundant data (for my test case, it reduced the final output file size by 22%) and made some small cosmetic changes. Overall, there is no loss of data as compared to the old version.

Some numbers for comparison (10K tests):

Original version:

[TestNG] Time taken by org.testng.reporters.EmailableReporter@1e2f4356: 28075 ms
[TestNG] Time taken by [FailedReporter passed=0 failed=0 skipped=0]: 76 ms
[TestNG] Time taken by org.testng.reporters.JUnitReportReporter@60e950e9: 904 ms
[TestNG] Time taken by org.testng.reporters.SuiteHTMLReporter@66e04981: 4912 ms
[TestNG] Time taken by org.testng.reporters.XMLReporter@7c2c0d3e: 1546 ms
[TestNG] Time taken by org.testng.reporters.jq.Main@4fb3c3d9: 2161 ms

New version:

[TestNG] Time taken by org.testng.reporters.EmailableReporter2@626ea9d2: 707 ms
[TestNG] Time taken by [FailedReporter passed=0 failed=0 skipped=0]: 72 ms
[TestNG] Time taken by org.testng.reporters.JUnitReportReporter@71f948b1: 1084 ms
[TestNG] Time taken by org.testng.reporters.SuiteHTMLReporter@1eebcf2d: 4801 ms
[TestNG] Time taken by org.testng.reporters.XMLReporter@52d058d1: 1791 ms
[TestNG] Time taken by org.testng.reporters.jq.Main@7fe4e47f: 2429 ms

I've named the class EmailableReporter2 in case you want to keep the old implementation around, but I suspect that most people will want to use the new version exclusively. Feel free to rename as you see fit.