fbpx

Test Automation Results Reporting with Easy Test NG Listeners

| Blog,Enterprise Software Development,Software testing

Reporting Automation Testing Results

Test Automation engineers often use ReportNG to generate results reports for automations performed using the Selenium WebDriver framework. ReportNG can be quite complex in terms of configuring, and it also lacks a variety of features.

Listed below are some of the limitations in ReportNG.

  1. Inability to add visually appealing graphs and charts illustrating the comparison of test results with previous cycles, at a glance.
  2. Inability to capture screen shots/videos as test result evidence.
  3. Absence of a customizable index page with project description, logo etc.
  4. Inability to export results in PDF, Microsoft Excel and HTML formats.

ATU Reporter

ATU Reporter is an open source Test NG Listener designed for Selenium. Users can easily add this  reporting feature to the code. Users can add the ATU Reporter feature even after completing the automation code for their respective projects.

The following features are available in the ATU Reporter:

  1. Customizable graphical reports (Line Charts, Bar Charts, and Index Page)
  2. Consolidated reports with the ability to compare information with previous test cycles
  3. Screen shot capturing
  4. Video recording
  5. Ability to export results in Microsoft Excel, PDF, and HTML formats

Configuring ATU Reporter for an existing Selenium code

  1. Download ATU Reporter for Selenium TestNG from the following location https://automationtestingutilities.blogspot.com/p/reporting.html.
  2. The downloaded file contains two executable JAR files. Copy the JAR files to the respective project folders.
  3. Open the properties file and provide the location. The reports appear in atu.reports.dir file.
  4. Integrate ATU reports and the automation project by setting the ATU property information in the main method as follows:

//Set Property for ATU Reporter Configuration

{

System.setProperty(“atu.reporter.config”, “D:\\Hisan Backup\\HisanS\\D\\ATUReporter_Selenium_testNG_2.1 jar javadoc prop file demo proj atu recorder\\ATUReporter_Selenium_testNG_2.1 jar+javadoc+prop file+demo proj+atu recorder\\atu.properties”);

}

 

Adding the screen shot capturing feature to the Selenium code 

  1. In the Property file, change the value of reports.takescreenshot property to true.

atu.reports.takescreenshot=true

  1. Enter the following code after the respective test execution code in the test method, in order to capture the screen at the relevant instance.

The steps, input value, expected value and actual value can be described in the respective test cases, which will be shown in the report.

@Test

public void testME()

{

setAuthorInfoForReports();

driver.get(“https://www.google.com”);

ATUReports.add(“Step Desc”, “inputValue”, “expectedValue”,

“actualValue”, true);

}

  1. Click the screen shot thumbnail to enlarge the screen shot.

 

Customizing the index page

You can change the header text and add a client logo and a description for the respective project by configuring the following properties in the Property file.

#change header text

atu.proj.header.text=My Proj Reports

#add project/client logo, the image is copied to “HTML_Design_Files/IMG” directory

atu.proj.header.logo=D:/img/google.png

#specify your project description

atu.proj.description=MyProject Testing Reports

 

Enabling the video recording feature

You can enable the video recording feature by changing the Property file.

To enable the video recording feature, enter ‘suite’ as the value for the “atu.reports.recordExecution” property, and run the selenium test automation code. A video will be created in the respective cycle folder, which the user can watch while running the automated test. You can watch the video only using VLC Media Player.

The user could also click the ‘Click Me to Show/Hide the Execution’ Video link in the report to watch the recording.

#Record test execution

#testmethod: record execution for every single test method in its own movie file, not yet implemented

#suite: record execution of complete suite in a single movie file

#Available options: suite, none

atu.reports.recordExecution=suite

 

Click here to download our Software Testing brochure for more information

Click here to read more about Brandix i3’s Software Testing and QA Solution

 

Author: 

Hisan Saleeth

i3 Labs is the technology and innovations Lab at Brandix i3

Related Posts

From insights to thought-leadership

View More

Post-pandemic fashion manufacturing: Essential technology for the manufacturer

In my previous blog series I discussed how fashion companies could adapt to meet the challenges of the new normal. For the most part, I focused on brands, but the same principles apply to fashion manufacturing. In this blog post, let’s focus on how manufacturers can adapt to the new normal by achieving visibility and collaboration with the right software.

Post-pandemic fashion manufacturing: Bridging the East-West divide

Twenty years ago, I started my career at an Asian apparel manufacturer. Tech-packs would come in from big brands from the US and Europe. We would gather in meeting rooms late into the night, deciphering the documents and pulling together a sample as best we could. If the sample was approved, we would confirm delivery dates to the brand six months in advance.

Is moving to the cloud the secret to a more sustainable supply chain?

Corporate sustainability is increasingly becoming a differentiator of business performance and financial success. Not only will sustainability help the planet recover from the harm that has been inflicted by aggressive industrialization, but it will also add value to your brand by attracting eco-conscious customers who demand green products.

Drive growth and digitize your supply chain with marketplace dropshipping

Fashion and luxury brands that have adopted dropshipping and e-commerce marketplaces are geared to capitalizing on the collapse of brick-and-mortar retail. In the new digitally-centered world of e-commerce, these businesses can maximize revenue, increase market share, and offer a seamless customer experience through dropshipping marketplaces. Read more in our latest blog post written in collaboration with Absolutelabs.

The Value of Data Analytics in Fashion eCommerce

The fashion industry is easily one of the biggest players in global eCommerce. Although this giant sector has had its fair share of setbacks following the effects of the pandemic, experts are expecting a stellar recovery in the coming years.

Harmonizing retail after the pandemic

Fashion retailers can maximize sales and increase customer satisfaction by establishing a harmonized retail strategy. Read how selecting the right channels, stock fluidity, adaptable software, and analytics can help in our latest blog post.