ATU Reporter

Add Jar to your project


Step : 1

Two important classes which we will be using

  • ATUReportsListener – A TestNG Listener
  • ConfigurationListener – A TestNG Listener
  • MethodListener – A TestNG Listener
  • ATUReports – Used for logging the report data

Step : 2 file

#change results directory

#change header text
atu.proj.header.text=AUT Reports Header

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

#specify your project description
atu.proj.description=MyProject Testing Reports

#An option for the user to set whether screenshots should be taken or not regardless of what the user has logged in the script.
#Setting false for taking screenshots results in faster execution time. This option is best suitable when you use HtmlUnitDriver

#User has the option to choose whether configuration reports should be generated or not
#Available options: true, false

#generate excel reports – the first preview of excel reports – with noticeable limitations
#Available options: true, false

#when a user logs the step as failed (using LogAs parameter), you can continue execution of the remaining steps using this property
#Available options: true, false
atu.reports.continueExecutionAfterStepFailed = true
#Record test execution
#testmethod: recored 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

#Maximum number of runs to generate, not yet implemented
atu.reports.setMaxRuns = 100

#generate pdf reports, not yet implemented

Step : 3 – Complete program.

package main.seTests;

import java.awt.AWTException;
import java.sql.SQLException;

import org.junit.AfterClass;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Listeners;
import org.testng.annotations.Test;

import atu.testng.reports.ATUReports;
import atu.testng.reports.listeners.ATUReportsListener;
import atu.testng.reports.listeners.ConfigurationListener;
import atu.testng.reports.listeners.MethodListener;
import atu.testng.reports.logging.LogAs;
import atu.testng.selenium.reports.CaptureScreen;
import atu.testng.selenium.reports.CaptureScreen.ScreenshotOf;

@Listeners({ ATUReportsListener.class, ConfigurationListener.class,
MethodListener.class })
public class AUTreports {
{ System.setProperty(“atu.reporter.config”, “C:\\Users\\Youtility\\Desktop\\WebApp_AutomationCode\\TCS\\”); }

private WebDriver driver;
private String baseUrl;

public void setUp() throws Exception {
driver = new FirefoxDriver();
baseUrl = “”;
driver.get(baseUrl + “/”);
// ATU Reports
ATUReports.indexPageDescription = “My CSR Project”;

public void GoogleTooltip() throws Exception, SQLException {

Actions ToolTip1 = new Actions(driver);
WebElement googleLogo = driver.findElement(By .xpath(“//div[@id=’hplogo’]”));

String ToolTipText = googleLogo.getAttribute(“title”);
Assert.assertEquals(ToolTipText, “Google”);
System.out.println(“Tooltip value is: ” + ToolTipText);

// ATU Reports Method
public void testNewLogs() throws AWTException, IOException, InterruptedException {

ATUReports.add(“INfo Step”, LogAs.INFO, new CaptureScreen(ScreenshotOf.BROWSER_PAGE));
ATUReports.add(“Pass Step”, LogAs.PASSED, new CaptureScreen(ScreenshotOf.DESKTOP));
WebElement element = driver.findElement(By.xpath(“//input[@id=’lst-ib’]”));
ATUReports.add(“Warning Step”, LogAs.WARNING,new CaptureScreen(element));
ATUReports.add(“Fail step”, LogAs.FAILED, new CaptureScreen(ScreenshotOf.DESKTOP));

public void tearDown() throws Exception {

Step : 4


<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE suite SYSTEM “”&gt;
<suite guice-stage=”DEVELOPMENT” name=”Default suite”>
<test verbose=”2″ name=”Default test”>
<class name=”main.seTests.AUTreports”/>
</test> <!– Default test –>

<listener class-name=”atu.testng.reports.listeners.ATUReportsListener”></listener>
<listener class-name=”atu.testng.reports.listeners.ConfigurationListener”></listener>
<listener class-name=”atu.testng.reports.listeners.MethodListener”></listener>

</suite> <!– Default suite –>


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s