Tuesday, 4 February 2014

ATU Reporter Part 4


Customizing the Reports:

This Section describes how to modify some parts of the Reports as per the user requirement. This is supported from version 3.0 or above.

Version 3.0 :

Following are the customization's that you can do with the reports.

  • Set a Title of the Project in the Reports Header Section.
  • Add a logo of your choice that will appear at the right side of the header section
  • Log reports of your choice: 
         Ex: ATUReports.add("<a href=\"#\">My Logs using ATU Reporter</a>", true);
         or
              Reporter.log("<a href=\"#\">My Logs using TestNG Reporter</a>");
              These reports will appear in the test case report as a link.
  • Change the directory of the Reports folder (Name of the folder will be user's choice)
  • Description of the Project on Index page

The customization's are pulled from an external properties file having key value pairs. The property file keys would be as follows.


#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


Version 4.0 :

Following are the customization's that you can do with the 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=false

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



#generate excel reports - the first preview of excel reports - with noticeable limitations
#excel reports rely on external libraries - Visit ATU Reporter Part 5 Post  for External Dependencies - These are required
atu.reports.excel=true

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


Once the properties file has been defined. you have to set a System property that will point to the properties file.  This property must be defined within a static block in the Test Script as shown below
Ex:

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

       @Test
       public void loginTest() {
              // Code..
       }

}


Version 4.5 :

Following are the customization's that you can do with the reports

  • Set the Test case Requirement coverage description using below code, this snippet must be called within a test method

      @Test
      public void login() {
      ATUReports.setTestCaseReqCoverage("This test is mapped to Login Requirement TC_001");
      //..

      }
  • Set the Current run description using below code, this declaration can be done in any block

      ATUReports.currentRunDescription = "This is a Test Run";
  • Filter the test case in Current Run Page



Version 5.0 :


  • Log a step as failed (using LogAs parameter). you can continue execution of the remaining steps using this property

          atu.reports.continueExecutionAfterStepFailed = false



  • Record test execution - complete suite
          atu.reports.recordExecution=suite
          Note: Add "Test Execution Recorder" library to your class-path to record the execution. This is tested with VLC Player (The VLC plug-in must be enabled in the browser to play the video)

 

Once the above declaration is done, the ATUReporter will pick the defined properties from the file.
If there are multiple script files, then the above declaration can be done in any one of the Script.


We will be happy to hear your requests for new features. Let us know if any customizations are needed, we will check the feasibility and possibly implement that in the upcoming versions :). Any bugs you encounter, you can report us, we are always here, committed in resolving the bugs :)


110 comments:

  1. Hi Automation Tester,

    When ATU Reporter v3.0 will come ?

    Thanks
    KD

    ReplyDelete
  2. Dear AT,

    3.0 new features are working fine for me. but found one small clarification . Is any oter way to add logo when running the script rather than added manually to the folder "HTML_Design_Files/IMG" . I have some program which will zip the entire reports in to zip and send the mail . But present scenario i need add logo manually . Is there any other way to add logo ??? and the exporting to pdf and excel are very good one .. so when will 4.0 is releasing ??

    ReplyDelete
  3. Hi Ravi,

    As of with the current version 3.0, the image has to be copied manually. I will release a new version that will have additional configurations.

    Since you are zipping the reports, copying manually is not desirable, I Agree :) However, I will release a new version in a very short period (in 48hrs). This manual process can eliminated.

    Version 4.0 features Excel Based reporting, currently its under dev. It should be out by early end of this month. :)

    Regards
    AT

    ReplyDelete
    Replies
    1. Thanks AT :)

      for v4.0 planning for only excel or including pdf also. Again waiting for that one also :)

      Delete
    2. Welcome Ravi :)

      Excel based reports would be available from v4. PDF Reporting will be introduced in the subsequent release and that would be 4.5.

      Regards
      AT

      Delete
    3. AT-

      Logo is displaying in the reporting section without coping manually to the IMG folder. But it work's only for .PNG images only not for .JPEG images . What could be the reason for this one.

      Delete
    4. Hi Ravi,

      I have checked it, there are no restrictions, I ran the tests using .JPEG format, the logo is working fine with different formats too. can you re check it ? and confirm ?

      Regards
      AT

      Delete
    5. AT -

      It's working only for .PNG not for .JPEG . can you check once again from your end

      Delete
    6. Hi,

      Can you mail me the image ? I will check at my end. I have tested with .JPEG formats, they are working fine.

      Delete
    7. AT-

      I mailed images with my report files also . can you please check and let me know

      Delete
    8. I hope the issue is resolved :)

      Delete
  4. Hello! Great work! It would be nice to be able to add a description for every run.

    Thanks!

    ReplyDelete
    Replies
    1. Gustavo,

      Having description for each run is an added value, but how would you like to set description? From properties or through logging or the ATU Reporter should generate it by itself?

      Regards
      AT

      Delete
    2. I think trough logging would be great. ATU already generate some usefull information, but having a place to log some customize information in each run would be very helpfull. Every project has different needs.
      Something like "indexPageDescription" that can be put in the run description would work for me

      Thanks!!

      Delete
    3. Gustavo,

      We will consider this in favour to your request and evaluate the best possible way.

      Keep track of the part 3 post for new releases and features.

      Regards
      AT

      Delete
  5. Any tentative dates for next release of ATU Reporter ?

    ReplyDelete
    Replies
    1. Possibly March 10 or the earliest.

      Delete
    2. AT -

      Releasing new version today

      Delete
    3. 4.0 is released ?? I am able view another link "ATU Reporter Part 5" with partial information ?

      Delete
    4. The post is being updated.Download links will be available once all the data is uploaded.

      Delete
  6. Hi AT,

    Can we change the look and feel of the report. As in report background color, Table colors etc. ?

    ReplyDelete
    Replies
    1. Not supported in the current version. We will support this customization too in the next releases.

      Delete
    2. Thnx AT for the quick response. Also, I would like to thank you for this amazing work. This is exactly what we were looking for.
      Keep it up!!!!

      Delete
  7. Hi can you just explain step by step how i can generate ATU Reports using ant file ..
    please explain how to make build path so that it can directly generate the ATU Reports only.

    ReplyDelete
    Replies
    1. Hi,
      It is same as how you run the TestNg from ANT.

      Delete
  8. Hi I am getting error when I tried to add System.setProperty() in static block.
    java.lang.IllegalStateException: java.lang.NullPointerException
    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: java.lang.NullPointerException
    at atu.testng.reports.utils.Directory.init(Unknown Source)
    at atu.testng.reports.utils.Directory.verifyRequiredFiles(Unknown Source)
    ... 11 more

    Where as If I put it as non static, no error but property settings are not getting reflected.

    Can you help me on this? Am i missing anything?

    ReplyDelete
    Replies
    1. You are actually doing it correct, you might probably missing certain key value pairs in the properties file. Define all the properties, doing this so will execute fine.!

      #AT

      Delete
    2. Me too getting the same error...
      Have you resolved the issue? If yes, please share your finding.

      Delete
    3. Hi,

      Make sure you have defined all the keys in the properties file. You can download the latest version which contains the properties file.

      #AT

      Delete
    4. Thanks AT for the reply.
      I have gone through all the five parts of 'ATU Reporter' in your blog. I could not get a clear view on what all needs to be added to my existing framework to get this report running... :(
      Currently, I have added the 'ATU_Selenium_testNG_Reports_4.0.jar' to the lib folder. Also added the listeners in the testng.xml file. Then from the BeforeSuite method, i am passing the driver instance through the following code:
      ATUReports.setWebDriver(webDriver);
      and executing the build through ant. I have not added the 'atu.properties' file in my framework. Do i need to add this file? Do i need any other file that I downloaded from this blog?
      It will be really helpfull, if you can post a model of the folder structure that the framework needs to have the script running.

      Thanking AT for the support. God bless

      Delete
    5. Hi,

      If you are defining the System property in the static block, you must use the properties file along with the latest keys. However it should not cause any issue if you do not set the System property.

      #AT

      Delete
    6. Thanks for the reply.
      I am not using System property and I have not added 'atu.properties' in my framework. I am getting the following error message while executing the scenario:

      Exception in thread "main" java.lang.IllegalStateException: java.lang.NullPointerException
      at atu.testng.reports.listeners.ATUReportsListener.onFinish(Unknown Source)
      at org.testng.SuiteRunner.invokeListeners(SuiteRunner.java:182)
      at org.testng.SuiteRunner.run(SuiteRunner.java:226)
      at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
      at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
      at org.testng.TestNG.runSuitesSequentially(TestNG.java:1039)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:964)
      at org.testng.TestNG.run(TestNG.java:900)
      at org.testng.TestNG.privateMain(TestNG.java:1182)
      at org.testng.TestNG.main(TestNG.java:1146)
      Caused by: java.lang.NullPointerException
      at atu.testng.reports.writers.CurrentRunPageWriter.getTestCaseHTMLPath(Unknown Source)
      at atu.testng.reports.writers.CurrentRunPageWriter.writeFailedData(Unknown Source)
      at atu.testng.reports.writers.CurrentRunPageWriter.content(Unknown Source)
      at atu.testng.reports.listeners.ATUReportsListener.generateCurrentRunPage(Unknown Source)
      ... 10 more

      Since I am not using property file, what could be the reason for this error? Please help.

      Delete
    7. Hi,
      Let me check it. Before that can you tell me the reporter version?
      Can you ping me in gtalk?

      Delete
    8. yes..sure, pls add me
      nipunkx@gmail.com
      I am available on gtalk now

      Delete
    9. Also, to answer you question, I am using the latest version of ATU reporter 4.0

      Delete
    10. It working fine now. I am able to create report after including all the key pair values in property file. Earlier I removed some of the keys.

      Thanks

      Delete
  9. Hi AT,

    I am still having the issue, can you please post a sample project so that i can have a look at its execution flow?

    ReplyDelete
  10. Hey AT,

    WHen i run my test case each time the Index.HTML getting updated based on the new run,

    I am using default testNG

    What can be done if i want test case based html reports ??

    or want to keep all my test case reports in each testCASE folder

    ReplyDelete
    Replies
    1. The reports are generated in HTML and Excel formats, Every test case report in generated in individual folder.

      You can analyze the folder structure of the reports for clear understanding.

      #AT

      Delete
  11. Hi all, i changed atu properties but am not able to get custom reports, could you please help me some one and mail me (hari.chennareddy@gmail.com) , thanks

    ReplyDelete
    Replies
    1. Please make sure the listeners are called either in script or testng.xml file. This listeners does the job of generating reports.

      #AT

      Delete
    2. Even after opening Excel with different format , i am not seeing any values!!! is it bcoz of latest jcommon, jfreechart i have 1.0.22 and 1.0.17 am using or whats happening?

      Delete
  12. Report generated , see this excel file cannot open this file AUTreporter(run1.xlsx) file extension or file format incorrect . I have latest version

    Reagrding IMG - is this works only in htmlunitdriver?? or i can use it for normal firefoxdriver???

    ReplyDelete
    Replies
    1. we have used JCommon 1.0.17 & Jfree 1.0.14 & POI 3.9 to generate excel reports.

      If you are referring to screenshots.

      HTML Unit Driver - screenshots cannot be captured for this driver. A real browser is not instantiated via this driver.

      Firefox/IE/Chrome/Safari/Opera - screenshots are captured.

      As per the WebDriver API - Screenshot functionality works if the driver implements TakesScreenshot Interface.

      #AT

      Delete
    2. Again moving to your excel comments , Mean to say this wont work in latest release jcommon and Jfree???

      I didnt quite understands this statement - #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

      Delete
    3. It should also work fine with the latest versions unless the API items(The classes which we have used for generating reports) are intact in the newer versions of JCommon/Jfree/POI.

      if the user writes the script for taking screenshot - as shown below
      ATUReports.add("Taking Screenshot Step", true);

      then,
      when you set takescreenshot = false in the properties file, during execution of the script, the screenshots are not captured for any step - this will substantially decrease execution time.

      As mentioned in the above post, when you use HtmlUnitDriver, screenshot cannot be taken. Setting takescreenshot = false will not invoke the screen capture code - hence execution time is small.


      #AT

      Delete
  13. In which folder the result.html file will be created ?

    ReplyDelete
  14. 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
    Replies
    1. Hi Karuna, please post your questions at once place.

      Answering to your questions..

      An index.html file (not result.html) is created in the root directory of reports folder.
      As of with the current version, all the test results are displayed in single page. Currently there is no option for filtration on the basis of suite. If this is a feature that you would like to be supported in successive releases, do mention it.

      #AT

      Delete
  15. Thanks for your reply.

    We have a very large set of modules ( Test suites) and have nearly 3000+ automation test cases, Need to have the test results in Test suite wise.
    It would be very glad if you support this feature.

    ReplyDelete
    Replies
    1. you're welcome !!

      The next release 5.0 is ready. The requested feature will be supported from 5.x version.

      #AT

      Delete
  16. am getting this error i cannot understand this,,,
    java.lang.NoClassDefFoundError: org/openqa/selenium/internal/BuildInfo
    at atu.testng.reports.utils.Platform.(Unknown Source)
    at atu.testng.reports.writers.TestCaseReportsPageWriter.content(Unknown Source)
    at atu.testng.reports.listeners.ATUReportsListener.startReportingForPassed(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)
    Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.internal.BuildInfo
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 14 more

    ReplyDelete
    Replies
    1. Rakesh,

      Please add Selenium Server Standalone jar file to your build path. This jar contains org/openqa/selenium/internal/BuildInfo class.

      #AT

      Delete
  17. Hi,

    Why setProperty to reporter.config not work when i run test case with testng.xml, it can work when i run my test class directly. Please help me, thanks.
    Here is my code when i run testng.xml.

    public class Clinic_Type_TC001 {

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

    '<'?xml version="1.0" encoding="UTF-8"?>
    '<'!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
    '<'suite name="1031004" parallel="classes">
    '<'parameter name="selenium.browser" value="chrome" />
    '<'parameter name="selenium.url" value="192.168.100.60" />
    '<'test name="Clinic_Type_TC01">
    '<'classes>
    '<'class name="testcast.hospitaldatamanagement.clinic_type.Clinic_Type_TC001" />
    '<'/classes>
    '<'/test>
    '<'listeners>
    '<'listener class-name="atu.testng.reports.listeners.ATUReportsListener">'<'/listener>
    '<'listener class-name="atu.testng.reports.listeners.MethodListener">'<'/listener>
    '<'listener class-name="atu.testng.reports.listeners.ConfigurationListener">'<'/listener>
    '<'/listeners>
    '<'/suite>


    ReplyDelete
  18. HI AT

    am getting this error which am using Version -5

    plz help me how to solve this




    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

    ReplyDelete
    Replies
    1. hey sorry it was my mistake, i have define atu.properties wrong .....

      Delete
    2. i can able to get reports in html, but were can i find xls reports even though i enabled atu.reports.excel=true

      Delete
  19. Ignore my comments i got it thanks
    its superb reporting

    Looking forward to see pdf reports in V6

    ReplyDelete
  20. Hi,

    I am added the line 'System.setProperty("atu.report.config", "./atu.properties");' in line code of my TestNG and trying to run the TestNG file by configuring the atu.properties file on test header and description. my testNg file is executing successfully, but in the ATU reports, i am not getting the configured header and Test Description. Please help me out from this problem, to successfully implement ATU in my framework.

    ReplyDelete
  21. atu.reports.dir=D:/ATU Reporter
    atu.proj.header.text=My Proj Reports
    atu.proj.header.logo=D:\\ATU Reporter\\HTML_Design_Files\\IMG\\vensai.JPG

    atu.proj.description=MyProject Testing Reports
    atu.reports.takescreenshot=true
    atu.reports.configurationreports=true
    atu.reports.excel=false
    atu.reports.continueExecutionAfterStepFailed = false
    atu.reports.recordExecution=none
    atu.reports.setMaxRuns = 100
    atu.reports.pdf=false

    ReplyDelete
  22. Plss make a small video tutorial ...it will reduce issues

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

    ReplyDelete
  24. Hi ATU,

    When we run multiple classes in parallel mode using testng () then the screenshots are misplacing for each class tests. Please execute the tests in testng parallel mode and check the screenshots once.


    Looking forward for your response. I had already sent the details to your mail.

    ReplyDelete
    Replies
    1. I see the same issue. When I run multiple classes in parallel mode using testng, the screenshots are misplacing for each test. Were you able to find a solution to this issue?

      Delete
  25. Unable to execute parallel test also multiple Test suites using TestNG suite file path.. Scripts are running fine but screenshots not captured on HTML reports.. Getting struck in my project. Can you please help us on this..

    ReplyDelete
  26. Hi,
    I am facing one issue in ATU reports as follows:-
    If I put ATU report in @BeforeTest and @AfterTest in Main TestNG Class...and check the report, the Browser Version is not showing.
    But in @Test...it showing in reports.
    I am using ATU version 5.0

    ReplyDelete
  27. Hi,

    Great work buddy!!

    I have a request, is there any possibility to add "Actual" and "Expected" results in the reports??

    ReplyDelete
  28. Hi ,
    Please help me out with this error
    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)

    ReplyDelete
  29. I get this error how to resolve it


    Exception in thread "main" java.lang.IllegalStateException: java.lang.NumberFormatException: null
    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:1198)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
    at org.testng.TestNG.run(TestNG.java:1031)
    at com.ibm.pmc.selenium.main.GuiTestMain.main(GuiTestMain.java:130)
    Caused by: java.lang.NumberFormatException: null
    at java.lang.Integer.parseInt(Unknown Source)
    at java.lang.Integer.parseInt(Unknown Source)
    at atu.testng.reports.utils.SettingsFile.correctErrors(Unknown Source)
    ... 9 more

    ReplyDelete
  30. Hi Please help me in generating customize report. I need excel report generation.

    I have declared block and added the following code.

    static
    {System.setProperty("atu.reporter.config", "/home/likewise-open/priya-1711/Automation/TestNG/graphical/atu.properties");}

    And added listeners in XML. But it creates only default report.

    ReplyDelete
  31. Listener atu.testng.reports.listeners.MethodListener was not found in project's classpath

    I am facing this issue, Can you tell me where am I doing mistake?

    ReplyDelete
  32. How can i fetch remote browsers' details in Summary and Execution Platform details in my Report?

    Ex. When I run my tests in saucelabs, it takes my local machine's information in Execution Platform Details and in Summary, it shows Browser = "Unknown".

    I want to fetch details of the saucelab's machine where my test was run on. Ex. If it runs on Windows 8 and Chrome Browser then it should display in my report not my local machine's information.

    Note : Currently we are using 5.1.1 version of ATU report.

    ReplyDelete
  33. Hello friend,

    Is there a way I can replace the text "Run 1", "Run 2",... "Run n" (in consolidated report page) with a customized test, like "SANITY-RUN-June-25-2015:08:12:44"?

    For my project, this indicated that it is a Sanity/Regression/Functional run on a particular date & time.

    Please guide me, it is important for me to get a resolution soon.

    ReplyDelete
  34. Hi i am getting following error,

    java.lang.IllegalStateException: java.lang.NullPointerException
    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)
    Caused by: java.lang.NullPointerException
    at atu.testng.reports.writers.TestCaseReportsPageWriter.content(Unknown Source)
    at atu.testng.reports.listeners.ATUReportsListener.startReportingForPassed(Unknown Source)
    ... 11 more

    atu.properties file key-value pairs are,

    atu.reports.dir=D:/ABC
    atu.proj.header.text=Welcome to Automation Index Page
    atu.proj.header.logo=D:/automated_testing.jpg
    atu.proj.description=Automation
    atu.proj.author=XYZ
    atu.reports.takescreenshot=true
    atu.reports.configurationreports=true
    atu.reports.excel=true
    atu.reports.continueExecutionAfterStepFailed=true
    atu.reports.recordExecution=none
    atu.reports.setMaxRuns=100
    atu.reports.pdf=false

    I am using ATU Reporteer 5.1.1
    Am i missing any other entries in atu.properties, please help me in this.

    ReplyDelete
  35. I have a custom ReportsListener implements ITestListener, this error pops up when test case fails. I am using ATUReports.add method in onTestFailure method.

    Also such error observed only on mac system. In windows it works fine.

    java.lang.IllegalStateException: java.lang.NullPointerException
    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)
    Caused by: java.lang.NullPointerException
    at atu.testng.reports.writers.CurrentRunPageWriter.getTestCaseHTMLPath(Unknown Source)
    at atu.testng.reports.writers.CurrentRunPageWriter.writeFailedData(Unknown Source)
    at atu.testng.reports.writers.CurrentRunPageWriter.content(Unknown Source)
    at atu.testng.reports.listeners.ATUReportsListener.generateCurrentRunPage(Unknown Source)
    ... 11 more

    ReplyDelete
    Replies
    1. this might help

      [ATU Custom Reporter Step Failed Exception]
      at atu.testng.reports.ATUReports.stepFailureHandler(Unknown Source)
      at atu.testng.reports.ATUReports.add(Unknown Source)
      at webUiLayer.ReportsListener.onTestFailure(ReportsListener.java:44)
      at org.testng.internal.Invoker.runTestListeners(Invoker.java:1895)
      at org.testng.internal.Invoker.runTestListeners(Invoker.java:1879)
      at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1292)
      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)

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

    ReplyDelete
  37. Hello AT,

    I am getting below exception.

    java.lang.IllegalStateException: java.lang.NullPointerException

    ATU properties files looks good.

    #Tue Jan 05 09:40:06 IST 2016

    atu.reports.setMaxRuns=100
    atu.proj.description=Automation testing
    atu.reports.takescreenshot=true
    atu.reports.excel=true
    atu.proj.header.text=Automation text
    atu.reports.recordExecution=suite
    atu.reports.pdf=true
    atu.proj.header.logo=C\:\\Users\\images.jpg
    atu.reports.continueExecutionAfterStepFailed=true
    atu.reports.dir=c\:/AutoamtionProject/2016-01-05/testplan1
    atu.reports.configurationreports=true


    Am i missing anything here?

    ReplyDelete
  38. Hello Automation Tester,

    Is there any way to disable ATU reporting at one place when ever required?

    Appreciate your reply!

    Regards,
    Aswini Kumar

    ReplyDelete
  39. Unable to execute parallel test also multiple Test suites using TestNG suite file path.. Scripts are running fine but screenshots not captured on HTML reports.. Getting struck in my project. Can you please help us on this..

    ReplyDelete
  40. Unable to execute parallel test also multiple Test suites using TestNG suite file path.. Scripts are running fine but screenshots not captured on HTML reports.. Getting struck in my project. Can you please help us on this..

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

    ReplyDelete
  42. 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:199)
    at org.testng.SuiteRunner.run(SuiteRunner.java:257)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1185)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1110)
    at org.testng.TestNG.run(TestNG.java:1018)
    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

    ReplyDelete
    Replies
    1. im getting this error while running my script

      Delete
  43. 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
  44. Hello Sir/Mam,
    I am executing the selenium script using testNG and ATU reports on Chrome,Firefox and IE browsers sequentially. The separate reports are generated for the three browsers but the previous BeforeSuite,BeforeTest and AfterSuites methods are getting added in next browser report.
    Is there any solution for this?

    ReplyDelete
  45. Hi,
    Am new to ATU reports, I am using it for my Mobile Automation testing using perfecto cloud, can u please let me know how to capture screen shot of the mobile on failure, I tried with new CaptureScreen(ScreenshotOf.BROWSER_PAGE) and DESKTOP, but its taking the screen shot of desktop not the mobile device, is there any way which we can pass the Screen shot path as a string to the report. Please help me on this, Other than this every thing works fine for me as per client requirement, like reports comparison etc..
    Thanks
    Suresh

    ReplyDelete
  46. Hi Sir/Madam,

    Any update on taking screenshot on mobile using ATU report Please help me on this .....

    Thanks,
    Suresh

    ReplyDelete
  47. How to change the formatString and tickInterval , since the barChart.js and lineChart.js are getting generated on each run

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

    ReplyDelete
  49. Please help me anyone How to change the formatString and tickInterval , since the barChart.js and lineChart.js are getting generated on each run

    ReplyDelete
  50. Hi,
    I am using ATU for appium scripts, Can you please tell me how to take screenshots of mobile device using ATU.
    Thanks

    ReplyDelete
  51. When I run multiple classes in parallel mode using testng, the screenshots are misplacing for each test. You can reproduce this issue when you execute the tests in parallel mode in testNG and check the screenshots for each test.

    ReplyDelete
    Replies
    1. Hi , i'm facing similar issue on parallel execution.
      ATU team ,can you please confirm is ATU reports support for parallel run or not.

      if possible, can we get source code of ATU report so that we can override the functions as per requirement

      Delete
    2. The workaround for this solution is set the atu reports webdriver(ATUReports.setWebdriver(driver)) before calling the fail step. You can achieve this by creating a wrapper fail method inside this method set the webdriver then call this wrapper fail method in your class.

      Delete
  52. Hi All,

    I am using ATU for mobile automation using Appium. I have added listeners in testng.xml file. Can anyone please tell me where should add the property file of ATU ??

    please anyone respond.

    ReplyDelete
  53. Hi AT,
    Can ATU report take screen shot of IOS/Android devices ?

    ReplyDelete