By Yolande Poirier-Oracle on Jun 16, 2015
In a new article, Madhu Seelam and Raghunandan Seshadri describe how to build a test framework that ensures logs from test classes and TestNG listeners that are executed in parallel reach the appropriate log file and are organized in a format similar to that of Javadocs.
TestNG is a popular open source test automation framework that provides support for parallel test execution. Java Logging APIs can ensure thread-safe logging from numerous threads and logging within test cases, as well as callback functions within listeners. However, when tests are executed in parallel, the logs from various test cases are interleaved, which makes it difficult to isolate the logs for a given test case.
Using the solution described in this article, all logs from a given TestNG test class reside in one HTML file, and HTML files can be linked into a format similar to that of Javadocs. This enables you to select a package and select the corresponding class to view the logs related to just that test class, even when the tests have been executed in parallel. Read the article