Welcome to the next episode in our new series “Integrating testing into your development flow”. Today we are going to be looking at “Reporting In TestNG: How To Write Custom Loggers And Reporters”.
In the last two presentations on TestNG, we talked about what TestNG is and have given a thorough walkthrough of where to get the tools, setting up your environment, the different annotations you can use, how to execute your procedures and tests. Then we looked at the different types of suite testing you can do. Such as, how to ignore tests, group testing, exception testing, dependency testing, parameterized testing, and running JUnit tests in TestNG.
So far we have covered only the basics of reporting in TestNG.
Up until now, we have only touched on the absolute basics of reporting in TestNG. Beginning, with how the report HTML gets generated when we run our test scripts. Next, we discussed the workings of the TestNG Eclipse plugin. Not to mention, all the useful information it reports regarding the results of our test runs. Finally, we looked at the reporting output we get from TestNG when we run our tests from the command-line.
So as you can see we have been seeing reporting all along. It’s just that we have only been using the out of box reporting, and have not delved into any specifics of reporting in TestNG.
Which brings us to today’s topic reporting in TestNG. Where we will look at how to expand on the logging and reporting tools provided by testNG to add more meaningful logging and reporting to our test suite. Including, several examples of how to write your own custom logger and reporters. Starting with, how TestNG generates its default HTML and XML reports when we run a test case. Then, we get into the reporting framework and look at ways to modify those existing reports and create our own custom reports. Finally, we cover how to create JUnit Reports inside TestNG. In case, you have any old legacy reports in JUnit that you would like to reuse in TestNG.
Topics covered in Reporting In TestNG: How To Write Custom Loggers And Reporters
-
- Reporters
- Listeners
This series comes from our mentoring/mastermind classes. These classes are virtual meetings that focus on how to improve our technical skills and build our businesses. The goals of each member vary. However, this diversity makes for great discussions and a ton of educational value every time we meet. We hope you enjoy viewing this series as much as we enjoy creating it. As always, this may not be all new to you, but we hope it helps you be a better developer.