Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
(TestNG) TextReport should be Thread-safe #364
Now TextReport listener is not thread-safe.
When I run a set of tests in 2+ threads in parallel, some tests have an empty sample text report despite tests passed. In other words, console report table is empty for some tests.
I found that there is really an issue with
@Rule public TestRule report = new TextReport();
JUnit creates a new TextReport instance before every test.
TestNG creates only one instance of listener and re-uses it for all the tests. That's why we have a concurrency issue.