Friday, 27 December 2013

ATU Reporter Part 2

How to Use the Project:

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


The above listeners must be called in the TestNG script or used in the testng.xml file.

Using The Listener in a TestNG Script:

In a TestNG Script, use the Listener as

import atu.testng.reports.listeners.ATUReportsListener;
import atu.testng.reports.listeners.ConfigurationListener;
import atu.testng.reports.listeners.MethodListener;
@Listeners({ ATUReportsListener.class, ConfigurationListener.class,
MethodListener.class })
public class TestNGScript {
}


NOTE: If you plan to work with ATU Reporter for Selenium TestNG then follow next procedure else skip it

-------------------------------------------------------------------------------------------------------


Set the driver Object to the ATUReporter as follows.

driver = new FirefoxDriver();

ATUReports.setWebDriver(driver);

This is required to retrieve the browser information and taking screenshots. If this is not set, Screenshots will not be captured.

---------------------------------------------------------------------------------------

Setting Index page Description, this is Optional
ATUReports.indexPageDescription = "My Project Description";

Setting Author Details, this is Optional
@Test
public void testME() {
   setAuthorInfoForReports();
}

private void setAuthorInfoForReports() {
   ATUReports.setAuthorInfo("Automation Tester", Utils.getCurrentTime(),"1.0");
}

This must be set for every test case so that the author details are set on the Test Case Report Page.

Finally, we log the Test Step execution as follows.

@Test
public void testME() {
  setAuthorInfoForReports();
  ATUReports.add("Step Desc"false);
  ATUReports.add("Step Desc""inputValue"false);
  ATUReports.add("Step Desc""expectedValue""actualValue"false);
  ATUReports.add("Step Desc""inputValue""expectedValue","actualValue"false);
}

The ATUReports class has four overloaded add methods for logging the Step information. 
The Boolean value tells whether a screenshot should be taken for the current Step.

true : Takes Screenshot
false : No Screenshot


Full Program:

package com.testcases;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Listeners;
import org.testng.annotations.Test;

import atu.testng.reports.ATUReports;
import atu.testng.reports.utils.Utils;

import atu.testng.reports.listeners.ATUReportsListener;
import atu.testng.reports.listeners.ConfigurationListener;
import atu.testng.reports.listeners.MethodListener;

@Listeners({ ATUReportsListener.class, ConfigurationListener.class,

MethodListener.class })
public class TestNGScript {


       //Set Property for ATU Reporter Configuration
       {
         System.setProperty("atu.reporter.config", "Path to the properties file");

       }


       WebDriver driver;

       @BeforeClass
       public void init() {
              driver = new FirefoxDriver();
              ATUReports.setWebDriver(driver);
              setIndexPageDescription();
       }

       private void setAuthorInfoForReports() {
              ATUReports.setAuthorInfo("Automation Tester", Utils.getCurrentTime(),
                           "1.0");
       }

       private void setIndexPageDescription() {
              ATUReports.indexPageDescription = "My Project Description <br/> <b>Can include Full set of HTML Tags</b>";
       }

            //Deprecated Methods
       @Test
       public void testME() {
              setAuthorInfoForReports();
              ATUReports.add("Step Desc"false);
              ATUReports.add("Step Desc""inputValue"false);
              ATUReports.add("Step Desc""expectedValue""actualValue"false);
              ATUReports.add("Step Desc""inputValue""expectedValue",
                           "actualValue"false);
       }


       //New Way of Logging

       @Test
       public void testNewLogs() throws AWTException, IOException {

              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("/html/body/div/h1/a"));
              ATUReports.add("Warning Step", LogAs.WARNING,
                           new CaptureScreen(element));
              ATUReports.add("Fail step", LogAs.FAILED, new CaptureScreen(
                           ScreenshotOf.DESKTOP));
       }

}


Using The Listener in testng.xml File

Create a listener tag and add the Listener.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite" parallel="none">
  <test name="Test">
    <classes>
      <class name="com.testcases.TestNGScript"/>
      <class name="com.testcases.WordPress"/>
    </classes>
  </test> <!-- Test -->
  <listeners>
  <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>
  </listeners>
</suite> <!-- Suite -->


Note: The Listener must be used Either in Test Script or testng.xml but not both. This will cause errors. 



182 comments:

  1. From where u can download listeners

    ReplyDelete
    Replies
    1. Hi,

      Navigate to "Graphical TestNG Reporting" main page. Download links are provided.

      Regards
      AT

      Delete
  2. Hi Automation Tester,

    We are doing hybrid driven framework...
    i have a scenario such that i need to get the inputs like keywords, input value and
    expected result from excel and need to verify the same and print result and screenshot..... Recently, i saw the ATU website , its really great.... My concern is that iam unable to understand the ATUReports.add method()....
    I want to use this method like ATUReports.add(obj.getStepDescFrmXL(), obj.getInputValFrmXL(), obj.getExpectedValFrmXL(),obj.verifyActualValonApp(),true);

    Does it possible to use that method such that? If not then, can you tell me the add
    method with any example for my understanding?

    ReplyDelete
    Replies
    1. Krupa,
      The reporter is specifically developed as a listener for TestNG. I doubt if your hybrid framework is linked with TestNg, if this is so, then its difficult to use ATU Reporter.

      Without TestNG this cant be used.

      Delete
  3. Hi,
    Yes it is TestNG only..
    okay, if i copy the ATUReports.add("Step Desc", "inputValue", "expectedValue","actualValue", false); in my test method and run it.
    It displays only Step Desc and rest as blank values to the corresponding columns.
    Why it is happening ? can you please tell me ?

    ReplyDelete
    Replies
    1. Hi Krupa,

      The reports works fine with correct values, make sure the values which you pass as parameters are not null.

      Delete
  4. Hi Guys,

    I have added you jar and updated the testng xml with listner details.
    But while executing the scenario, i am getting the following error message:

    [testng] Exception in thread "main" java.lang.IllegalStateException: java.lang.NullPointerException
    [testng] at atu.testng.reports.listeners.ATUReportsListener.onFinish(Unknown Source)
    [testng] at org.testng.SuiteRunner.invokeListeners(SuiteRunner.java:182)
    [testng] at org.testng.SuiteRunner.run(SuiteRunner.java:226)
    [testng] at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    [testng] at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    [testng] at org.testng.TestNG.runSuitesSequentially(TestNG.java:1039)
    [testng] at org.testng.TestNG.runSuitesLocally(TestNG.java:964)
    [testng] at org.testng.TestNG.run(TestNG.java:900)
    [testng] at org.testng.TestNG.privateMain(TestNG.java:1182)
    [testng] at org.testng.TestNG.main(TestNG.java:1146)


    Please help me resolve this

    ReplyDelete
    Replies
    1. Hi,

      Every new version of ATU Reporter may introduce certain keys. you must define all the keys in your properties file to take full advantage of the reporter. for a list of keys pertaining to each version, refer to ATU Reporter part 4 post. alternatively you can find the properties file in the download zip file.

      #AT

      Delete
  5. Hi,

    Can you please tell me how to add screenshots in this report?

    Ric

    ReplyDelete
    Replies
    1. Every overloaded add method has a boolean parameter, set it to true for taking screenshot.

      #AT

      Delete
    2. Hi,

      How to use atu.properties? I added System.setProperty("atu.reporter.config", "D:\\Config\\atu.properties"); in my testcase class but its not taking from there. Can we change this logic to env variable logic?

      Ric

      Delete
    3. Please go through the posts. Everything required for setting up reports is described.

      #AT

      Delete
    4. hi,

      I tried above mentioned code for my report but I am not able to get screen shot, I am using below method for screen shot
      ATUReports.add("Open URL", "URL", expectedValue,actualValue, true);

      Ric

      Delete
    5. Ritesh,

      In the properties file, set the takescreenshot value to true. If this is set to false, the screenshots will not be captured.

      #AT

      Delete
    6. Hi,

      I tried but its not fetching from properties file. I am using below line in my code in @BeforeClass method:
      System.setProperty("atu.reporter.config", "D:\\opc\\TestNgProject\\Config\\atu.properties");


      Ric

      Delete
    7. The property must be set in a static block. It is mentioned in the post.

      #AT

      Delete
    8. This comment has been removed by the author.

      Delete
  6. Hi,

    I tried that also but it was not working fine. below code I used

    public static void setproperty(){
    System.setProperty("atu.reporter.config", "D:\\opc\\TestNgProject\\Config\\atu.properties");
    }

    Ric

    ReplyDelete
    Replies
    1. Ritesh,

      declare the static block in your Test Class as shown below,

      {
      System.setProperty("atu.reporter.config", "D:\\atu.properties");
      }


      #AT

      Delete
    2. Thank you very much, its working now

      Ric

      Delete
    3. Hi,

      How to add skip testcases in report. Right now I am using

      @Test(enabled = false)

      in my code but its not including skip testcases in report. Can you please help me?

      Ric

      Delete
    4. Hi,

      The reports displays skipped test cases. Setting test as disabled does not fall under skipped category.

      #AT

      Delete
    5. Hi Ritesh, AT,

      I m unable to take screenshot. I have added property file in static block as shown below.

      {
      System.setProperty("atu.reporter.config", "C:\\atu.properties");
      }

      Please help me out.

      Delete
    6. how to resolve this error in ATU Report

      java.lang.NoClassDefFoundError: org/jfree/data/general/PieDataset

      This error shows after executing the scripts

      Delete
    7. how to resolve this error in ATU Report

      java.lang.NoClassDefFoundError: org/jfree/data/general/PieDataset

      This error shows after executing the scripts

      Can anyone mail to ksridhar1989@gmail.com. My report is a saving as text file

      Delete
  7. Hi AT,
    I am getting Unable To Create Required Files for Custom Reports error. I dont know what I am missing.
    Could you please help me on this.
    I have given all key pair values in the properties file and declared static block but still getting the error.
    Is it necessary to setwebdriver to be done in @Beforeclass. shall I do in the @Test

    ReplyDelete
    Replies
    1. You can set the webdriver in any annotated method.

      Make sure the path given is correct.

      #AT

      Delete
  8. Hello AT,

    I'am not able to take screeshots,i would like to take it at the end of my test.i use this portion of code : @Test(priority = 0 , enabled = true)
    public void EmbaucherSalarie() throws Exception {
    setAuthorInfoForReports();
    em = new EmbaucherSalarie() ;
    em.embaucherSalarie() ;
    ATUReports.add("Processus d'embauche", true) ;
    it displays the step description but not the screenshot, i encapsulate my automated script in the method : embaucherSalarie()

    Regards

    ReplyDelete
    Replies
    1. Set the webdriver object. That would do the job.

      #AT

      Delete
    2. Thanks it works,
      but how can make the screenchots more important so that it displays the hole screen,because i receive just a small portions of screen that not contains the necessary informations !

      Delete
    3. Hi,

      The screenshot is taken by webdriver which has the flexibility to capture entire browser screen. If you are looking for desktop screenshot which is not yet supported by the ATU Reporter - you can expect this feature in next version.

      #AT

      Delete
  9. Hello,

    I use it for a browser screen,unfortunately i don't get the entire page !!

    Regards

    ReplyDelete
    Replies
    1. Well It should work fine if it is browser screen and this behavior is completely dependent on WebDriver - use appropriate combinations of Selenium Server and Browser.

      #AT

      Delete
    2. Hi AT,

      please how can i use this combinations of Selenium Server and Browser ?! i didn't get u well !

      Thanks for your help


      Regard

      Delete
    3. Actually,i use selenium webdriver 2.41.0 to automate browser actions !

      Delete
    4. Can you mail us the sample snippet ?

      #AT

      Delete
  10. I am able to execute the report and view the results. Is there any option to see the results in test suite wise, I have 100 test cases in 10 suits. how can view the results in suite wise ? In the current report its showing all 100 cases in one shot.

    ReplyDelete
  11. very nice report, 2 quick questions:
    1. last 10 runs does not work on line chart and consolidate page?
    2. Can we provide a config to set the value by ourselves? eg: if I set it to 5, in the report it will show last 5 runs trend in line chart and bar chart, and provide the last 5 runs link in the left panel

    ReplyDelete
    Replies
    1. Hi,

      The line chart displays all the run history whereas Bar chart does not.

      you will definitely have an option for setting limit for runs. This is under implementation and you can expect this feature in next successive releases.

      #AT

      Delete
  12. Hi AT,

    I have integrated reporting and it looks good. I have one suggestion may be that you already have in your TODO list.

    Currently we can see execution of tests run wise. This looks good and when I came to see failed tests result. it shows details as expected. But It would be good if we can see trend for particular tests failure with previous executions. So that we can easily identify since which run particular test is failing.

    Thanks for sharing such good reporting.

    Thanks,
    Datta

    ReplyDelete
  13. could you please change the the path separator from \ to / ? if publishing the html report in jenkins, the page could not show correct format because of the path separator.

    ReplyDelete
    Replies
    1. do you face issue with Jenkins related to path separator ?

      #AT

      Delete
    2. can someone help me to work on reports through jenkins .. currently i am synchromizing each time for the updated reports .. is there a way it get updated automatically there in jenkins

      Delete
    3. If i configure through jenkins for the html publisher . report is showing without any chart or images . seems like total html design is missing . How to add that

      Delete
  14. package tarnea.master.addproduct.gui;

    import org.openqa.selenium.By;
    import org.openqa.selenium.WebDriver;
    import org.openqa.selenium.WebElement;
    import org.openqa.selenium.firefox.FirefoxDriver;
    import org.testng.annotations.AfterTest;
    import org.testng.annotations.BeforeClass;
    import org.testng.annotations.BeforeTest;
    import org.testng.annotations.Listeners;
    import org.testng.annotations.Test;

    import com.gargoylesoftware.htmlunit.WebConsole.Logger;
    import com.thoughtworks.selenium.ScreenshotListener;

    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.utils.Utils;

    @Listeners({ ATUReportsListener.class, ConfigurationListener.class,MethodListener.class })
    public class Master_P_Tax
    {
    WebDriver driver;
    @BeforeTest
    public void setUp() throws Exception
    {
    driver=new FirefoxDriver();
    ATUReports.setWebDriver(driver);
    }

    @Test
    public void test() throws Exception
    {
    driver.get("http://www.google.com");

    ATUReports.add("Step Desc", "inputValue", "expectedValue","actualValue", true);
    }

    @AfterTest
    public void release() throws Exception
    {
    driver.quit();
    }
    }





    this is my code and able to generate the report but not capturing the screen shots ..
    So any one can help me...thank in advance...

    ReplyDelete
    Replies
    1. In the property file, set the takescreenshot attribute to true. If set to false then screenshot will not be captured.

      #AT

      Delete
  15. #change results directory
    atu.reports.dir=D:/ATU Reporter

    #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:/google.png

    #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
    atu.reports.takescreenshot=true

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

    #generate excel reports - the first preview of excel reports - with noticeable limitations
    #Available options: true, false
    atu.reports.excel=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
    atu.reports.recordExecution=suite


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


    #generate pdf reports, not yet implemented
    atu.reports.pdf=false






    This is my properties file and still i am facing the same problem any one can help me please ...........

    ReplyDelete
    Replies
    1. I am facing the same issue. Please let me know if you were able to resolve the Screenshot error

      Delete
  16. Hello AT, on execution of my scripts am getting below error pls help me out
    [ATU Custom Reporter Step Failed Exception]
    at atu.testng.reports.listeners.ATUReportsListener.onTestSuccess(Unknown Source)
    at org.testng.internal.Invoker.runTestListeners(Invoker.java:1899)
    at org.testng.internal.Invoker.runTestListeners(Invoker.java:1879)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:778)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
    at org.testng.SuiteRunner.run(SuiteRunner.java:240)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

    ReplyDelete
    Replies
    1. It's not an error. This is one of the features introduced from version 5.0 onwards. "ATU Custom Reporter Step Failed Exception" occurs when a step is logged as fail using LogAs parameter.

      #AT

      Delete
    2. In my case, the test fails when I use LogAs.FAILED, to mark a step as Failed. Please help.

      Delete
    3. Did u find a solution for this??

      Delete
    4. even i am facing the same problem. test case getting failed when i use LogAs.Failed. my testcase execution not moving further. ATU Please help. help would be greatly appreciated.

      Delete
    5. hey i have a workaround for the above, you can mark case as failed and still move on, put LogAs.Failed in try catch. this way it will mark step as failed and controls goes to catch block.

      Delete
  17. Hello,

    The ATU reporting is very useful and wonderful.
    I tried to use it but unable to take screenshots in the report.
    Below is the code that i am using:

    package testcases;

    import org.openqa.selenium.By;
    import org.openqa.selenium.WebDriver;
    import org.openqa.selenium.firefox.FirefoxDriver;
    import org.testng.annotations.BeforeClass;
    import org.testng.annotations.Listeners;
    import org.testng.annotations.Test;

    import atu.testng.reports.ATUReports;
    import atu.testng.reports.utils.Utils;

    import atu.testng.reports.listeners.ATUReportsListener;
    import atu.testng.reports.listeners.ConfigurationListener;
    import atu.testng.reports.listeners.MethodListener;

    /*@Listeners({ ATUReportsListener.class, ConfigurationListener.class,
    MethodListener.class })*/
    public class TestNGScript {


    //Set Property for ATU Reporter Configuration
    {
    System.setProperty("atu.reporter.config", "E:\\Selenium\\Practice\\Reporting\\src\\atu.properties");
    }


    WebDriver driver;

    @BeforeClass
    public void init() {
    driver = new FirefoxDriver();
    ATUReports.setWebDriver(driver);
    setIndexPageDescription();
    }

    private void setAuthorInfoForReports() {
    ATUReports.setAuthorInfo("Automation Tester", Utils.getCurrentTime(),
    "1.0");
    }

    private void setIndexPageDescription() {
    ATUReports.indexPageDescription = "My Project Description
    Can include Full set of HTML Tags";
    }

    //Deprecated Methods
    @Test
    public void testME() {
    setAuthorInfoForReports();



    driver.get("http://gmail.com/");
    ATUReports.add("Open gmail login page in Mozilla Firefox", true);

    driver.findElement(By.id("Email")).sendKeys("rohit");
    ATUReports.add("Enter username", "rohit", true);

    String text = driver.findElement(By.id("signIn")).getText();
    ATUReports.add("Verify sign in button name", "Sign in", text, true);

    driver.findElement(By.id("Passwd")).sendKeys("rohit");
    String pwdtext = driver.findElement(By.id("Passwd")).getText();
    ATUReports.add("Verify the input password entered by user", "rohit", "rohit",pwdtext, true);


    }}

    The ATU.properties file is under the src folder in the project. I have added the ATU jar files.
    Could you please tell me where am I going wrong!

    ReplyDelete
    Replies
    1. In the properties file, make sure you have atu.reports.takescreenshot=true is set.

      #AT

      Delete
  18. what plugin is required to play the execution video

    ReplyDelete
    Replies
    1. Preferably VLC. Works well with VLC player.

      #AT

      Delete
  19. Thank u,i have installed the plugin and now i can see the vlc icon in the report, but no video is playing. My property file is set to "atu.reports.recordExecution=suite"

    whether i have to specify anything to start the recording of the video in my code

    Any tips to figure it out.

    ReplyDelete
    Replies
    1. Hi,

      Make sure the video file is recorded and available in your Run folder. Once the plugin is loaded, play the video - maximize for a full screen view.

      #AT

      Delete
    2. Hi AT,
      Thanks for the reply, i don't see video file being recorded in my Run folder, what might be the problem.

      My property file is set to "atu.reports.recordExecution=suite"

      sample code which i am using. code works fine but no video is recorded

      @Listeners({ATUReportsListener.class,ConfigurationListener.class,MethodListener.class})
      public class ATUtesting
      {
      {
      System.setProperty("atu.reporter.config", C:\\atu.properties");
      }

      WebDriver driver;


      @BeforeMethod
      public void startbrowser()
      {
      driver = new FirefoxDriver();
      ATUReports.setWebDriver(driver);
      setIndexPageDescription();
      driver.get("http://www.google.co.in");
      driver.manage().timeouts().pageLoadTimeout(30,TimeUnit.SECONDS);
      }


      private void setIndexPageDescription() {
      ATUReports.indexPageDescription = "My Project Description
      Testing how to create ATU reports";
      }

      @Test
      public void testcase()
      {
      System.out.println("first test case");
      ATUReports.setAuthorInfo("Saptha Rishi","26-May-2014:46", "1.2");
      ATUReports.add("INFO STEP",LogAs.INFO, new CaptureScreen(ScreenshotOf.BROWSER_PAGE));


      }

      @Test
      public void testcase2()
      {
      System.out.println("second test case");
      ATUReports.add("PASS STEP","Rishi",LogAs.PASSED,new CaptureScreen(ScreenshotOf.DESKTOP));
      }

      @Test
      public void testcase3()
      {
      System.out.println("Third test case");
      }

      @AfterMethod
      public void close()
      {
      driver.close();
      }

      }

      Delete
    3. Hello Saptha Rishi,

      We found the issue. There is a missing file which is causing not to generate the video. We apologize for this inconvenience. We will upload the latest version of ATUTestRecorder v2.1 by E.O.D which will be bug free. Thank you :)

      #AT

      Delete
    4. Hi,

      A new version of ATU TestRecorder v2.1 has been uploaded. let us know if you still encounter any issues.

      #AT

      Delete
    5. Hello Saptha Rishi,

      Due to a missing attribute, recorded videos are not played in the browser. This issue will be fixed in the new version 5.1.1

      #AT

      Delete
    6. Hi Again,

      The new version 5.1.1 is available for download.

      #AT

      Delete
    7. Awsome!!! good to see the execution video playing .. Thanks a lot AT

      Delete
  20. Hi
    Why this is dependent on selenium. For example if i am testing api using TestNG only. I am not able to run that without adding selenium dependency in pom

    ReplyDelete
    Replies
    1. There is a separate project for TestNG without Selenium dependency. Have you checked the below link ?

      http://automationtestingutilities.blogspot.in/2014/04/ATUReporterForTestNG.html

      #AT

      Delete
  21. i can able to generate the report but not capturing the screen shots ..
    So any one can help me..........

    ReplyDelete
    Replies
    1. Make sure you have the takescreenshot property set to true in the properties file.

      #AT

      Delete
    2. ATUReports.add("INfo Step", LogAs.INFO, new CaptureScreen(ScreenshotOf.BROWSER_PAGE));

      like this i gave but not showing screenshot

      Delete
    3. i am using ubuntu not windows because of that any problem will come with
      ATUReports.....

      Delete
  22. java.io.FileNotFoundException: /home/ihub/Documents/SiteElectornicsReports1/Results/Run_11/Default suite/Default test/sel/Module/Examples/Menu1_Iteration1/IMG/3.PNG (No such file or directory)
    at java.io.RandomAccessFile.open(Native Method)
    at java.io.RandomAccessFile.(RandomAccessFile.java:236)
    at javax.imageio.stream.FileImageOutputStream.(FileImageOutputStream.java:69)
    at com.sun.imageio.spi.FileImageOutputStreamSpi.createOutputStreamInstance(FileImageOutputStreamSpi.java:55)
    at javax.imageio.ImageIO.createImageOutputStream(ImageIO.java:409)
    at javax.imageio.ImageIO.write(ImageIO.java:1520)
    at atu.testng.reports.ATUReports.takeDesktopScreenshot(Unknown Source)
    at atu.testng.reports.ATUReports.add(Unknown Source)
    at sel.Module.Examples.Menu1(Examples.java:346)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:622)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
    at org.testng.SuiteRunner.run(SuiteRunner.java:240)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

    Like this message showing.............when i gave capturescreenshot

    ReplyDelete
    Replies
    1. Hello Lavanya,

      Could you mail us the reports ?

      #AT

      Delete
  23. This comment has been removed by the author.

    ReplyDelete
  24. atu.reports.dir=/home/ihub/Documents/Menu2

    atu.proj.header.text=ATUReport Testing

    atu.proj.header.logo=/home/ihub/Documents/innominds.jpg

    atu.proj.description=MyProject Testing Reports

    atu.reports.takescreenshot=true

    atu.reports.configurationreports=false

    atu.reports.excel=false

    atu.reports.continueExecutionAfterStepFailed = true

    atu.reports.recordExecution=suite

    atu.reports.setMaxRuns = 100

    atu.reports.pdf=false

    Like this i gave atu properties but no screen shots showing any where

    ReplyDelete
    Replies
    1. Hi,
      Have u got fix this issue, if yes pls suggest me i am facing same issue not getting screenshot, video using Linux

      Delete
  25. Hi AT
    Thanks for the reply,
    sample code which i am using. code works fine but Screenshots and no video recording.

    @Listeners({ATUReportsListener.class,ConfigurationListener.class, MethodListener.class })

    public class ATUtesting {

    { System.setProperty("atu.reporter.config", "/home/ihub/Documents/Test_NG/ATUReport/atu.properties");}
    WebDriver driver;

    @BeforeMethod
    public void startbrowser()
    {
    driver = new FirefoxDriver();
    ATUReports.setWebDriver(driver);
    setIndexPageDescription();
    driver.get("http://www.google.co.in");
    driver.manage().timeouts().pageLoadTimeout(30,TimeUnit.SECONDS);

    }
    private void setIndexPageDescription(){
    ATUReports.indexPageDescription = "My Project Description Testing how to create ATU reports";
    }


    @Test
    public void testcase1() {
    System.out.println("first test case");
    ATUReports.setAuthorInfo("Lavanya", "25-june-2014:46" , "1.2");
    ATUReports.add("INFO STEP", LogAs.INFO,new CaptureScreen(ScreenshotOf.BROWSER_PAGE) );
    }

    @Test
    public void testcase2(){
    System.out.println("secon test case");
    ATUReports.add("PASS STEP", "LAVI", LogAs.PASSED, new CaptureScreen(ScreenshotOf.BROWSER_PAGE));
    }

    @Test
    public void testcase3(){
    System.out.println("Third test case");
    }

    @AfterMethod
    public void close(){
    driver.close();
    }
    }

    ReplyDelete
    Replies
    1. Hello,

      Please mail us the data @: automationtestingutilities@gmail.com

      #AT

      Delete
    2. Hi,

      Can u pls provide me the solution for above issues - Can able to generate report but no screenshot, video using linux. Pls reply me with solution.

      Delete
    3. Hi,

      Can u pls provide me the solution for above issues - Can able to generate report but no screenshot, video using linux. Pls reply me with solution.

      Delete
  26. Hi,

    When I run the demo test case , it always throw exception:
    FAILED: deprecatedLogsTest
    java.lang.NoSuchMethodError: setAttribute
    at atu.testng.reports.ATUReports.buildReportData(Unknown Source)
    at atu.testng.reports.ATUReports.add(Unknown Source)
    at com.ATUReporterSampleTests.deprecatedLogsTest(ATUReporterSampleTests.java:47)

    Could you please help me on that? Thanks

    ReplyDelete
    Replies
    1. Hello,

      which version are you using ? make sure you have the latest jar in your build path.

      #AT

      Delete
  27. thanks for your reply. Yes I used the latest version
    I tried it on intellij and it's working fine, It throws exception on eclipse, very strange...
    But it's ok I will use intellij

    ReplyDelete
  28. Hi,

    I noticed that in ATU framework we have to set Auth info in each test method in test class, which I think is unnecessary as usually one class is designed by one person, and we only need to set it one time in one class.
    Please correct me if you have different opinion. Thanks

    ReplyDelete
    Replies
    1. Hello,

      You have raised a valid point. However, It is not the same all the time, the class can be edited by other as well, adding new test cases to it.

      #AT

      Delete
    2. Yes that may happen, is there any way we can set up auth info under class level and all methods will inherit it by default? It's inconvenience to set up it in every method.
      Thanks. Waiting for your reply.

      Delete
    3. If this is a feature that you would like to have - we can definitely have this in the successive versions. Log your requests in the requests page.

      #AT

      Delete
    4. Thank you ,will do that...

      Delete
    5. Could you provide me the request page so I can add it there?
      Thank you !

      Delete
    6. The link is provided in the main page.

      #AT

      Delete
  29. Hi,

    Sometimes I can't redirect to test case detail page(which includes all steps in that page) when clicking on test case name in CurrentRun.html. Error is:

    File not found

    Firefox can't find the file at /C:/TestingSource/Durkheim/HboGo/ATU Reporter/Results/Run_3/Hbo-GO regression test suite for parental controls/Parental Controls with no subaccount/com/hbo/hbogo/parentalcontrols/ManageParentalControlsTest/testChangeTVRatings_Iteration1/testChangeTVRatings.html.

    But this file does exist. Could you help me with this issue? Thanks

    ReplyDelete
    Replies
    1. Hello,

      email the reports folder @ our mail id.

      #AT

      Delete
    2. Hello me to have the same issue

      Delete
  30. Hello,

    As I experience, the screenshot about the BROWSER_PAGE and WebElement are not working if I'm using RemoteWebDriver. Could you please help me how to use it?

    Thank you!

    ReplyDelete
  31. Hi,

    i have 2 tests in one suite, and if i run that suite i only can get report of the 2nd test, that is run2, when i click on run1 it said Firefox can't find the file at ....ATU Reporter/Results/Run_1/CurrentRun.html. i checked that folder does not exist. is this a bug?
    thanks for your time

    ReplyDelete
    Replies
    1. sorry I mean that file does not exist, not folder

      Delete
    2. Please note that , the listeners must be declared only once either in the testng.xml file or the java file but not both. If the listeners are declared more than once you will encounter such issue, it creates multiple Runs due to multiple listener declarations.

      #AT

      Delete
  32. can u tell me how to set report creation location dynamic in the atu.properties file ?

    ReplyDelete
    Replies
    1. A path for the reports should be given in the properties file as

      atu.reports.dir=your path goes here

      #AT

      Delete
  33. Hi Automation tester

    i am unable to to generate report, following error is showing , can u tell me how to fix it

    FAILED: test
    [ATU Custom Reporter Step Failed Exception]
    at atu.testng.reports.ATUReports.stepFailureHandler(Unknown Source)
    at atu.testng.reports.ATUReports.add(Unknown Source)
    at firsttestngpackage.Report_generation_example.test(Report_generation_example.java:88)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
    at org.testng.SuiteRunner.run(SuiteRunner.java:240)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)


    ===============================================

    ReplyDelete
    Replies
    1. This exception occurs when you set the test step to failed using LogAs.FAILED parameter.

      Ex: ATUReports.add("Fail step", LogAs.FAILED, null);

      Inorder to continue the execution after a step has failed, please set
      atu.reports.continueExecutionAfterStepFailed = true in properties file

      #AT

      Delete
    2. I set it as true still getting same error message.

      Delete
  34. Just wanted to know the new way of telling 'false' for taking screenshot in the logging steps

    ReplyDelete
    Replies
    1. If you do not wish to capture screenshot, pass a null parameter as argument.
      Ex: ATUReports.add("INfo Step", LogAs.INFO,null);

      Or, if you do not want any screen to be captured for entire test then set the takescreenshot attribute to false in properties file.

      #AT

      Delete
  35. I want to capture screenshot ONLY on failure , otherwise i do not want to capture.

    what parameter i have to sent in the add function if i do not want to capture screenshot if the steps pass

    ReplyDelete
    Replies
    1. If you do not wish to capture screenshot, pass a null parameter as argument.
      Ex: ATUReports.add("INfo Step", LogAs.INFO,null);

      #AT

      Delete
  36. Hi AUT Team, I am trying to add an .jpg image under main report page of generated AUT html. Below is the code :

    1. atu.proj.header.logo=C:/Selenium/icm.jpg

    2. How I am reading properties file :

    fileinputstream = new FileInputStream(System.getProperty("user.dir")+"//src//com//cisco//config//atu.properties");
    ATU = new Properties();
    ATU.load(fileinputstream);

    But i can not see image on UI as well as under folder of HTML_Designed_Files.

    Do I need to add/change some other property. Please guide.

    ReplyDelete
    Replies
    1. Hello Robin,

      You need not write any code for copying the image. All you need to is to set the path for the image in the properties file, the ATU reporter will copy the image.

      #AT

      Delete
    2. Hi AT,

      I am also facing the same problem could you please provide more guidance as ATU is not picking up the property file.

      Thanks and Regards,
      Amit Kapoor

      Delete
  37. Hi AUT Team,

    Can we integrate the below reporting with AUT Reports?.

    https://code.google.com/p/selenium-step-level-reporter/



    ReplyDelete
    Replies
    1. Perhaps you could implement the same reports by extending a EventFiringWebDriver and register the new driver. This will listen to individual actions performed. However you may see repeated steps with this approach when you run loops.

      #AT

      Delete
  38. I want to capture screenshot of only my emulator screen and not of the entire desktop. However CaptureScreen(ScreenshotOf.BROWSERPAGE) does not help me to do it. Is there any other way to achieve this?

    ReplyDelete
  39. Hi AT,
    I am facing a problem, I have set the atu.properties file as
    atu.reports.continueExecutionAfterStepFailed = true
    And true for screenshot also., Still looks like its not reading the entries from the properties file. I did provide the entry as a static block. Is there anything else to check?

    ReplyDelete
    Replies
    1. Hey AT, please ignore this. Its working fine now :)..
      Btw your reporting is superb!! Perfect.

      Delete
    2. Hi,

      atu.reports.continueExecutionAfterStepFailed = true is not working for me means its not taking screenshot for failed step(immediate failed step). Can u pls explain me to do this.

      Thanks,
      Priyanka P
      polisettyp8@gmail.com

      Delete
  40. Hi,

    I have xml like this :
























    For this type of xml I am not getting report. Can you please provide solution for this issue?

    Thanks,
    Ric

    ReplyDelete
  41. I am not able to paste my xml but it contain two test tag
    extra from the other xml





    ReplyDelete
  42. Hi AUT Team,

    In the block "Summary" (between "Execution Platform Details" and "Author Info"), the information about the Browser is always at "UnKnown,".

    How can I fill this information with the name and version of the current browser in which the tests are runned ?
    Is this field supposed to be automatically filled ?

    Thank you in advance.
    And thanks for ATU Reporter, it works fine and generates great graphical reports !

    ReplyDelete
  43. Hey, Thanks for this tool. It's great and simple to implement. I'm having one issue though I'm hoping you can help me with. Some test cases fail to open on the browser due to "Error code: ERR_FILE_NOT_FOUND" , but the file does exist and the URL seems correct (some tests in the suite open fine.) It is possible to drag and drop the html file into the browser.

    Any idea why some pages can't load from the browser?

    ReplyDelete
    Replies
    1. Turns out the link breaks if the test method name is longer than 19 characters.

      Delete
  44. Hi AT,

    Here iam facing one problem when i am running my testcases in a suite.
    System is generating 2 Run folder when i am running only once.
    i.e.., Executed testng.xml file only once, After execution i opened ATU Reporter folder --> It's displaying Run_1 and Run_2. Where in Run_1 there is no current run.html, In Run_2 there is Current run.html and Run_2 we are getting reports.

    We system is generating 2 reports for one run

    Please give solution.

    ReplyDelete
    Replies
    1. Hi,

      Please add the Listeners at either class level or only at TestNg XML alone.And then do your execution,it will resolve your issue.

      Delete
  45. How to set properties??q

    ReplyDelete
  46. Hi,

    I have a query . When we open test-output folder & see the index.html file. its printing step1, step2 step3 .Cant we remove this or print entire step description.

    ReplyDelete
  47. Hi guys I, am using "ATUReporter_Selenium_testNG_5.5_BETA.jar". I am trying to customize the report by using atu.properties file. It is not customizing the report as per my given in atu.properties file. But it is not showing me any error message while invoking the "System.setProperty("atu.reporter.config", "Path to the properties file");".

    ReplyDelete
    Replies
    1. I think your code is not able to read property file. I faced the same issue and found property file was not able to read. Try printing sometime from property file to confirm that are you able to print.

      Delete
  48. Hi AT,

    This is a great tool, thank you very much.
    After read through all the posts, I am trying to find out: how to set the atu.reporter.config with atu.properties if listeners are being set from testng.xml?
    Because if I only put listener in xml file, and everything remains the same, and now the test will run like without the atu.properties, and not taking screenshot also. I am using 5.5 beta. Is anyway I can set this property from xml file?

    Thank you very much.

    ReplyDelete
    Replies
    1. Hi AT,
      I downgrade to version 5.1.1
      Now it is reading the atu.properties path.
      Thank you.
      I am also logging this to the spreadsheet.

      Delete
  49. Hi I. getting below error

    java.lang.IllegalStateException: [ATU Custom Reporter Exception] Settings File Not Available

    Please help me to fix it.

    ReplyDelete
  50. Hi

    Is it possible to share the class for wordpress used in testng.xml so as to understand the report better

    ReplyDelete
  51. Hi i am facing some problem with ATU, i get this error could someone pls help me, i am pretty new to selenium.

    java.lang.IllegalStateException: [ATU Custom Reporter Exception] Unable To Create Required Files for Custom Reports
    at atu.testng.reports.listeners.ATUReportsListener.onStart(Unknown Source)
    at org.testng.SuiteRunner.invokeListeners(SuiteRunner.java:197)
    at org.testng.SuiteRunner.run(SuiteRunner.java:238)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

    ReplyDelete
  52. and wht is key values? how to set that ?

    ReplyDelete
  53. Hi I am unable to read properties file , if I commebt system.setpriperty then my scripts are running but failing in taking screenshots and if I in commebt setpriperty IT is failing and throwing error , can you help me?

    ReplyDelete
  54. This comment has been removed by the author.

    ReplyDelete
  55. Hi everyone,
    Please help me.I have followed all the steps in this blog for generating ATU Reports but when i ran the program I got the below error.Kindly please help me...


    java.lang.IllegalStateException: [ATU Custom Reporter Exception] Unable To Create Required Files for Custom Reports
    at atu.testng.reports.listeners.ATUReportsListener.onStart(Unknown Source)
    at org.testng.SuiteRunner.invokeListeners(SuiteRunner.java:197)
    at org.testng.SuiteRunner.run(SuiteRunner.java:238)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
    Caused by: [ATU Custom Reporter Exception] Unable To Create Required Files for Custom Reports
    at atu.testng.reports.utils.SettingsFile.create(Unknown Source)
    at atu.testng.reports.utils.SettingsFile.initSettingsFile(Unknown Source)
    at atu.testng.reports.utils.Directory.verifyRequiredFiles(Unknown Source)
    ... 11 more

    thanks

    ReplyDelete
    Replies
    1. I am getting below error can you pls let me know why i am getting thius

      java.lang.IllegalStateException: [ATU Custom Reporter Exception] Unable To Create Required Files for Custom Reports
      at atu.testng.reports.listeners.ATUReportsListener.initChecking(Unknown Source)
      at atu.testng.reports.listeners.ATUReportsListener.onExecutionStart(Unknown Source)
      at org.testng.TestRunner.initListeners(TestRunner.java:354)
      at org.testng.TestRunner.init(TestRunner.java:238)
      at org.testng.TestRunner.init(TestRunner.java:205)
      at org.testng.TestRunner.(TestRunner.java:160)
      at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:141)
      at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:271)
      at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:561)
      at org.testng.SuiteRunner.init(SuiteRunner.java:157)
      at org.testng.SuiteRunner.(SuiteRunner.java:111)
      at org.testng.TestNG.createSuiteRunner(TestNG.java:1299)
      at org.testng.TestNG.createSuiteRunners(TestNG.java:1286)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
      at org.testng.TestNG.run(TestNG.java:1057)
      at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
      at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
      at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
      Caused by: [ATU Custom Reporter Exception] Unable To Create Required Files for Custom Reports
      at atu.testng.reports.utils.SettingsFile.create(Unknown Source)
      at atu.testng.reports.utils.SettingsFile.initSettingsFile(Unknown Source)
      at atu.testng.reports.utils.Directory.verifyRequiredFiles(Unknown Source)
      ... 18 more

      Delete
    2. "Unable To Create Required Files for Custom Reports", this error is due to setting of wrong path in Atu.properties file. Edit 'Atu.properties' file and set 'atu.reports.dir' property to a valid path : ex: 'atu.reports.dir=C:\\AtuReporter'

      Delete
    3. I am also seeing the same issue......Please give me if any one able to call the properties file in ur scripts..... :(

      Delete
  56. Hi,

    First of all thanks for the wonderful Reporting tool. I am using ATUReporter v5.1.1, i have set the take screenshot property to true, as well as set the webdriver. But its not taking any screenshots. I get all the logging except screenshots. Can you help?

    ReplyDelete
  57. Hi,

    Can we use this reporting for Selenium Grid?? If yes, please tell me the procedure. I tried it for grid, but I didn't get reports.

    ReplyDelete
  58. Hi,
    I am unble to add author info in ATU Reporter I have written Code as given below
    public void startReports()
    {
    // set web driver for atu report to start report
    ATUReports.setWebDriver(webDriver);
    ATUReports.setAuthorInfo("Shashank Chouhan", Utils.getCurrentTime(), "1.0");
    }

    ReplyDelete
  59. Hi ATU,

    I am also getting the below exception when running the reports code..i have tried in both 5.1.1 as well


    java.io.FileNotFoundException: F:\Selenium\Selenium\ATU Reports\Results\Run_2\pieChart.js (The system cannot find the path specified)
    at java.io.FileOutputStream.open0(Native Method)
    at java.io.FileOutputStream.open(Unknown Source)
    at java.io.FileOutputStream.(Unknown Source)
    at java.io.FileOutputStream.(Unknown Source)
    at java.io.PrintWriter.(Unknown Source)
    at atu.testng.reports.writers.HTMLDesignFilesJSWriter.pieChartJS(Unknown Source)
    at atu.testng.reports.listeners.ATUReportsListener.onFinish(Unknown Source)
    at org.testng.SuiteRunner.invokeListeners(SuiteRunner.java:200)
    at org.testng.SuiteRunner.run(SuiteRunner.java:243)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

    ReplyDelete
  60. How to take screen shot of Android devices?

    ReplyDelete
  61. ATU not reading anything from atu.properties file

    declared in code as below
    {

    System.setProperty("atu.reporter.config", "D:\\Workspace_Overvu\\overvu\\ATU Reports\\atu.properties");

    }

    also set atu.reports.takescreenshot=true , still not capturing screenshot

    ReplyDelete
    Replies
    1. I am also seeing the same issue......Please give me if any one able to call the properties file in ur scripts..... :(

      Delete
  62. Dear Sir,
    I am getting following error for LoaAS.Failed. Note atu.property setup is atu.reports.continueExecutionAfterStepFailed = true. Still I got the below exception for all the failed testcases.

    Click Me to Show/Hide the Full Stack Trace
    [ATU Custom Reporter Step Failed Exception] at atu.testng.reports.listeners.ATUReportsListener.onTestSuccess(Unknown Source) at org.testng.internal.Invoker.runTestListeners(Invoker.java:1899) at org.testng.internal.Invoker.runTestListeners(Invoker.java:1879) at org.testng.internal.Invoker.invokeMethod(Invoker.java:778) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111) at org.testng.TestRunner.privateRun(TestRunner.java:767) at org.testng.TestRunner.run(TestRunner.java:617) at org.testng.SuiteRunner.runTest(SuiteRunner.java:334) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291) at org.testng.SuiteRunner.run(SuiteRunner.java:240) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224) at org.testng.TestNG.runSuitesLocally(TestNG.java:1149) at org.testng.TestNG.run(TestNG.java:1057) at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

    ReplyDelete
  63. I dont want previous run reports. can any one tell me how to get only current run in the report.

    ReplyDelete
  64. Hi..can anyone suggest me how will i get screenshot for failed step also using AUT report? becoz after operation adding report descritption
    eg:driver.findElement(By.id("login-button123")).click();
    ATUReports.add("login button","" ,"" ,"click",LogAs.INFO,new CaptureScreen(ScreenshotOf.BROWSER_PAGE) );

    when login-button123 failed the how ATUReports line will execute.

    Thanks for suggestion.

    ReplyDelete
  65. how can i get screenshot for passed steps and as well as for first failed step screenshot. is it possible with ATUReport??

    ReplyDelete
  66. Please provide some sample code to generate the reports, and also for excel generate reports, how mention the code to keep true.

    Please really it is very confusing so put sample code for the declaration of Project Description and Project Logo...... tried as mentioned in one of the ATU article but throwing errors.

    #change results directory
    atu.reports.dir=D:/ATU Reporter

    #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:/google.png


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

    ReplyDelete
  67. An awesome tool for generating reports.

    A piece of advice, rather than giving Run1,Run2,...RunN, you could give some meaningful names. Perhaps run date seems more of a value.

    Why am I saying this?
    If the end user of the report wants to view a result of a particular run, he has to open each and every run to find out the result based on a date.

    ReplyDelete
  68. Yep.. I think ATU 5.5 BETA is not reading the atu.properties. I wonder if the team is still working on this tool? I have no t seen an answer from them for a long time.

    ReplyDelete
  69. I use Retry Listener in my TestNG project, so whenever a test case fails it re-run the same test case for couple of times. My ATU reports counts re-runed test cases as well and shows in graphs but testng-xslt results doesn't show retired count in graphs. Is there any possibility that re-tired test cases count doesn't reflect in ATU graphs?

    Can someone help on this...

    Thanks,
    Nawaz.

    ReplyDelete
  70. Hi there,

    Can someone explain me the actual usage of the below command.
    ATUReports.setWebDriver(driver);

    if this is the for passing the WebDriver instance to the ATUReporter class then why commenting this also works well ???

    ReplyDelete
  71. Hello,

    I need to get the class and method names listed in the log which are executed.
    Ex :
    Class Abc
    {
    }
    Class Def
    {
    }
    @Test
    public void Main_Page()
    {
    Abc.navigatetoUrl();
    Abc.login_details();
    Def.register_new_member();
    Def.logout();
    }

    In the log i need to get the names of the class and methods like.
    Abc.navigatetoUrl executed
    Abc.login_detail executed
    Def.register_new_member executed
    Def.logout executed

    I need the log as above so that I can drill down which class and method is failing.

    how can i get it ..??
    any help is appreciated.

    Thanks,

    ReplyDelete
  72. java.io.FileNotFoundException: reports/Results/Run_10/Default suite/Default test/testcases/LoginTC001/TopEntiesTestcase_Iteration1/IMG/1.PNG (No such file or directory)
    at java.io.RandomAccessFile.open0(Native Method)
    at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
    at java.io.RandomAccessFile.(RandomAccessFile.java:243)
    at javax.imageio.stream.FileImageOutputStream.(FileImageOutputStream.java:69)
    at com.sun.imageio.spi.FileImageOutputStreamSpi.createOutputStreamInstance(FileImageOutputStreamSpi.java:55)
    at javax.imageio.ImageIO.createImageOutputStream(ImageIO.java:419)
    at javax.imageio.ImageIO.write(ImageIO.java:1530)
    at atu.testng.reports.ATUReports.takeDesktopScreenshot(Unknown Source)
    at atu.testng.reports.ATUReports.add(Unknown Source)
    at pulse.pages.PulseTopEntitiesPage.TopEntitiesPost(PulseTopEntitiesPage.java:33)
    at testcases.LoginTC001.TopEntiesTestcase(LoginTC001.java:39)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:659)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:845)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1153)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
    at org.testng.TestRunner.privateRun(TestRunner.java:771)
    at org.testng.TestRunner.run(TestRunner.java:621)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:357)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310)
    at org.testng.SuiteRunner.run(SuiteRunner.java:259)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1199)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1124)
    at org.testng.TestNG.run(TestNG.java:1032)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
    Successfully Logout

    When I am using Ubuntu OS, I am getting issue taking screen shot using atu report

    ReplyDelete
  73. Hi AT,

    Please guide me how i can record the script execution???...with same code can i expect it??..& also iam used the atu.reports.recordExecution=suite in properties file...please guide me

    ReplyDelete
    Replies
    1. Hi AT,

      I need to see all the expected & actual data included in the report..please guide me from scratch...i am trying to use this reporting in my company,so please do guide me.

      Delete
  74. Hi AT& Friends.

    i want my report should be in such way that,it should show only like

    SI.No StepDescription inputvalue Expected actual time_taken status

    all above are my columns of the report...please guide me

    ReplyDelete
  75. Hello,
    I am a newbie in ATU Report.
    I downloaded ATU source from
    http://automationtestingutilities.blogspot.com/2014/04/ATUReporterForTestNG.html

    In my class i tried to use this code:
    ATUReports.setWebDriver(driver);

    But actually, ATUReports class does not contain setWebDriver method. So it raises that error.

    Can anyone tell me what to do?

    ReplyDelete
  76. I am not able to generate custom report although Property file loaded properly. It is generating result in default "ATU Reports" folder. Could you please advise earliest?

    ReplyDelete
  77. i am trying to implement for appium, how to change the method for it and write the test cases accordingly

    ReplyDelete
  78. Hi, I ma getting the following error, can someone help

    java.lang.NoSuchMethodError: org.jfree.chart.plot.PiePlot.setSectionPaint(Ljava/lang/Comparable;Ljava/awt/Paint;)V
    at atu.testng.reports.chart.PieChart.generate2DPieChart(Unknown Source)
    at atu.testng.reports.excel.ExcelReports$ExcelChart.writeChartToExcel(Unknown Source)
    at atu.testng.reports.excel.ExcelReports.addPieChartTOExcel(Unknown Source)
    at atu.testng.reports.excel.ExcelReports.testSummary(Unknown Source)
    at atu.testng.reports.excel.ExcelReports.generateExcelReport(Unknown Source)
    at atu.testng.reports.listeners.ATUReportsListener.onFinish(Unknown Source)
    at atu.testng.reports.listeners.ATUReportsListener.generateReport(Unknown Source)
    at org.testng.TestNG.generateReports(TestNG.java:1076)
    at org.testng.TestNG.run(TestNG.java:1035)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

    ReplyDelete
  79. I am trying to generate excel reports

    ReplyDelete
  80. Hi Ramnarayan,

    This is required to retrieve the browser information and taking screenshots. If this is not set, screenshots will not be captured.

    Regards,
    Aswini Kumar
    http://aksahu.blogspot.in/

    ReplyDelete
  81. Where is "/html/body/div/h1/a" coming from? is it from my website or report page?

    ReplyDelete
  82. I'm using ATU Reporter with Selenium, Maven and TestNG, and my test are being executed using CircleCI... The problem that I'm seeing is why the BeforeMethod and AfterMethod are counting as Tests. There are only 20 Tests on my project, but they are displayed as

    "Your build ran 60 tests in junit with 0 failures"

    I'm not sure if there are something wrong with the ATU Reporter or if this is on the Circle side

    ReplyDelete
  83. Thanks for sharing great information in your blog. Got to learn new things from your Blog . It was very nice blog to learn about Selenium.
    Selenium

    ReplyDelete
  84. Hi,

    The Screenshots displayed are not matching in the report.
    I'm using cross browsers to test the same, is this responsible for creating this issue?

    ReplyDelete
  85. Hi,
    I have set the takescreenshot in the atu properties file as true and I am unable to take screenshot
    I have tried the parameters WebElement, driver, the default BRowser_PAGE and Desktop. Yet I see the space blank.

    Please let me know how this actually works Cuz I currently have a code that takes screen shot:

    public void savePageScreenshot(String path, WebDriver driver) {
    imageEditor.saveImageFile(((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE), path);
    }

    public void saveImageFile(File imageFile, String path) {
    Pattern pattern = Pattern.compile("/*.jpg|/*.png|/*.jpeg");
    Matcher matcher = pattern.matcher(path);
    String newPath = null;
    if (!matcher.matches()) {
    newPath = path + ".png";
    }
    try {
    FileUtils.copyFile(imageFile, new File(newPath));
    } catch (IOException e) {
    throw new RuntimeException(e);
    }
    }

    ReplyDelete
  86. why you guys did not do any video on it so that anyone can do it easily

    ReplyDelete
  87. Well explained. Got to learn new things from your Blog on Appium.Appium training in chennai

    ReplyDelete
  88. Hi i am getting error when i set the atu.properties

    java.lang.NoClassDefFoundError: Could not initialize class atu.testng.reports.utils.Platform
    at atu.testng.reports.writers.TestCaseReportsPageWriter.content(Unknown Source)
    at atu.testng.reports.listeners.ATUReportsListener.startReportingForFailed(Unknown Source)
    at atu.testng.reports.listeners.ATUReportsListener.onFinish(Unknown Source)
    at org.testng.SuiteRunner.invokeListeners(SuiteRunner.java:200)
    at org.testng.SuiteRunner.run(SuiteRunner.java:243)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

    Note: looks like when executing TestNG.java file in the line for(Xmlsuite xmlsuite : m_suites) i am facing this issue

    ReplyDelete
  89. java.lang.IllegalStateException: [ATU Custom Reporter Exception] Unable To Create Required Files for Custom Reports
    at atu.testng.reports.listeners.ATUReportsListener.onStart(Unknown Source)
    at org.testng.SuiteRunner.invokeListeners(SuiteRunner.java:197)
    at org.testng.SuiteRunner.run(SuiteRunner.java:238)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:236)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:81)
    Caused by: [ATU Custom Reporter Exception] Unable To Create Required Files for Custom Reports
    at atu.testng.reports.utils.SettingsFile.create(Unknown Source)
    at atu.testng.reports.utils.SettingsFile.initSettingsFile(Unknown Source)
    at atu.testng.reports.utils.Directory.verifyRequiredFiles(Unknown Source)
    ... 11 more

    ---------------
    Getting above error....and Same Code is working fine in another programme..

    ReplyDelete