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 asimport 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
-------------------------------------------------------------------------------------------------------
driver = new FirefoxDriver();
ATUReports.setWebDriver(driver);
---------------------------------------------------------------------------------------
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 })
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
//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
//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>
<listener class-name="atu.testng.reports.listeners.ConfigurationListener"></listener>
<listener class-name="atu.testng.reports.listeners.MethodListener"></listener>
</listeners>
</suite> <!-- Suite -->
From where u can download listeners
ReplyDeleteHi,
DeleteNavigate to "Graphical TestNG Reporting" main page. Download links are provided.
Regards
AT
Hi Automation Tester,
ReplyDeleteWe 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?
Krupa,
DeleteThe 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.
Hi,
ReplyDeleteYes 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 ?
Hi Krupa,
DeleteThe reports works fine with correct values, make sure the values which you pass as parameters are not null.
Hi Guys,
ReplyDeleteI 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
Hi,
DeleteEvery 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
Hi,
ReplyDeleteCan you please tell me how to add screenshots in this report?
Ric
Every overloaded add method has a boolean parameter, set it to true for taking screenshot.
Delete#AT
Hi,
DeleteHow 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
Please go through the posts. Everything required for setting up reports is described.
Delete#AT
hi,
DeleteI 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
Ritesh,
DeleteIn the properties file, set the takescreenshot value to true. If this is set to false, the screenshots will not be captured.
#AT
Hi,
DeleteI 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
The property must be set in a static block. It is mentioned in the post.
Delete#AT
This comment has been removed by the author.
DeleteHi,
ReplyDeleteI 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
Ritesh,
Deletedeclare the static block in your Test Class as shown below,
{
System.setProperty("atu.reporter.config", "D:\\atu.properties");
}
#AT
Thank you very much, its working now
DeleteRic
Good :)
Delete#AT
Hi,
DeleteHow 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
Hi,
DeleteThe reports displays skipped test cases. Setting test as disabled does not fall under skipped category.
#AT
Hi Ritesh, AT,
DeleteI 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.
how to resolve this error in ATU Report
Deletejava.lang.NoClassDefFoundError: org/jfree/data/general/PieDataset
This error shows after executing the scripts
how to resolve this error in ATU Report
Deletejava.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
Hi AT,
ReplyDeleteI 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
You can set the webdriver in any annotated method.
DeleteMake sure the path given is correct.
#AT
Hello AT,
ReplyDeleteI'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
Set the webdriver object. That would do the job.
Delete#AT
Thanks it works,
Deletebut 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 !
Hi,
DeleteThe 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
Hello,
ReplyDeleteI use it for a browser screen,unfortunately i don't get the entire page !!
Regards
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.
Delete#AT
Hi AT,
Deleteplease how can i use this combinations of Selenium Server and Browser ?! i didn't get u well !
Thanks for your help
Regard
Actually,i use selenium webdriver 2.41.0 to automate browser actions !
DeleteCan you mail us the sample snippet ?
Delete#AT
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.
ReplyDeletevery nice report, 2 quick questions:
ReplyDelete1. 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
Hi,
DeleteThe 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
Hi AT,
ReplyDeleteI 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
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.
ReplyDeletedo you face issue with Jenkins related to path separator ?
Delete#AT
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
DeleteIf 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
Deletepackage tarnea.master.addproduct.gui;
ReplyDeleteimport 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...
In the property file, set the takescreenshot attribute to true. If set to false then screenshot will not be captured.
Delete#AT
#change results directory
ReplyDeleteatu.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 ...........
I am facing the same issue. Please let me know if you were able to resolve the Screenshot error
DeleteHello AT, on execution of my scripts am getting below error pls help me out
ReplyDelete[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)
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.
Delete#AT
In my case, the test fails when I use LogAs.FAILED, to mark a step as Failed. Please help.
DeleteDid u find a solution for this??
Deleteeven 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.
Deletehey 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.
DeleteHello,
ReplyDeleteThe 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!
In the properties file, make sure you have atu.reports.takescreenshot=true is set.
Delete#AT
what plugin is required to play the execution video
ReplyDeletePreferably VLC. Works well with VLC player.
Delete#AT
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"
ReplyDeletewhether i have to specify anything to start the recording of the video in my code
Any tips to figure it out.
Hi,
DeleteMake 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
Hi AT,
DeleteThanks 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();
}
}
Hello Saptha Rishi,
DeleteWe 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
Hi,
DeleteA new version of ATU TestRecorder v2.1 has been uploaded. let us know if you still encounter any issues.
#AT
Hello Saptha Rishi,
DeleteDue 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
Hi Again,
DeleteThe new version 5.1.1 is available for download.
#AT
Awsome!!! good to see the execution video playing .. Thanks a lot AT
DeleteFantastic !!
Delete#AT
Hi
ReplyDeleteWhy 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
There is a separate project for TestNG without Selenium dependency. Have you checked the below link ?
Deletehttp://automationtestingutilities.blogspot.in/2014/04/ATUReporterForTestNG.html
#AT
i can able to generate the report but not capturing the screen shots ..
ReplyDeleteSo any one can help me..........
Make sure you have the takescreenshot property set to true in the properties file.
Delete#AT
yes
DeleteATUReports.add("INfo Step", LogAs.INFO, new CaptureScreen(ScreenshotOf.BROWSER_PAGE));
Deletelike this i gave but not showing screenshot
i am using ubuntu not windows because of that any problem will come with
DeleteATUReports.....
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)
ReplyDeleteat 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
Hello Lavanya,
DeleteCould you mail us the reports ?
#AT
This comment has been removed by the author.
ReplyDeleteatu.reports.dir=/home/ihub/Documents/Menu2
ReplyDeleteatu.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
Hi,
DeleteHave u got fix this issue, if yes pls suggest me i am facing same issue not getting screenshot, video using Linux
Hi AT
ReplyDeleteThanks 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();
}
}
Hello,
DeletePlease mail us the data @: automationtestingutilities@gmail.com
#AT
Hi,
DeleteCan 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.
Hi,
DeleteCan 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.
Hi,
ReplyDeleteWhen 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
Hello,
Deletewhich version are you using ? make sure you have the latest jar in your build path.
#AT
thanks for your reply. Yes I used the latest version
ReplyDeleteI tried it on intellij and it's working fine, It throws exception on eclipse, very strange...
But it's ok I will use intellij
Hi,
DeleteI am using intellij and not able to capture screenshot. Can you please tell me how it is working for u? what settings i need to do as i tried everything mentioned above and found no luck.
Hi,
ReplyDeleteI 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
Hello,
DeleteYou 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
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.
DeleteThanks. Waiting for your reply.
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.
Delete#AT
Thank you ,will do that...
DeleteCould you provide me the request page so I can add it there?
DeleteThank you !
The link is provided in the main page.
Delete#AT
Hi,
ReplyDeleteSometimes 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
Hello,
Deleteemail the reports folder @ our mail id.
#AT
Hello me to have the same issue
DeleteHello,
ReplyDeleteAs 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!
Hi,
ReplyDeletei 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
sorry I mean that file does not exist, not folder
DeletePlease 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.
Delete#AT
can u tell me how to set report creation location dynamic in the atu.properties file ?
ReplyDeleteA path for the reports should be given in the properties file as
Deleteatu.reports.dir=your path goes here
#AT
Hi Automation tester
ReplyDeletei 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)
===============================================
This exception occurs when you set the test step to failed using LogAs.FAILED parameter.
DeleteEx: 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
I set it as true still getting same error message.
DeleteJust wanted to know the new way of telling 'false' for taking screenshot in the logging steps
ReplyDeleteIf you do not wish to capture screenshot, pass a null parameter as argument.
DeleteEx: 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
I want to capture screenshot ONLY on failure , otherwise i do not want to capture.
ReplyDeletewhat parameter i have to sent in the add function if i do not want to capture screenshot if the steps pass
If you do not wish to capture screenshot, pass a null parameter as argument.
DeleteEx: ATUReports.add("INfo Step", LogAs.INFO,null);
#AT
Hi AUT Team, I am trying to add an .jpg image under main report page of generated AUT html. Below is the code :
ReplyDelete1. 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.
Hello Robin,
DeleteYou 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
Hi AT,
DeleteI 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
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.
ReplyDelete#AT
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?
ReplyDeleteHi AT,
ReplyDeleteI 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?
Hey AT, please ignore this. Its working fine now :)..
DeleteBtw your reporting is superb!! Perfect.
Hi,
Deleteatu.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
Hi,
ReplyDeleteI have xml like this :
For this type of xml I am not getting report. Can you please provide solution for this issue?
Thanks,
Ric
xml
ReplyDeleteI am not able to paste my xml but it contain two test tag
ReplyDeleteextra from the other xml
Hi AUT Team,
ReplyDeleteIn 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 !
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.
ReplyDeleteAny idea why some pages can't load from the browser?
Turns out the link breaks if the test method name is longer than 19 characters.
DeleteHi AT,
ReplyDeleteHere 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.
Hi,
DeletePlease add the Listeners at either class level or only at TestNg XML alone.And then do your execution,it will resolve your issue.
How to set properties??q
ReplyDeleteHi,
ReplyDeleteI 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.
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");".
ReplyDeleteI 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.
DeleteHi AT,
ReplyDeleteThis 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.
Hi AT,
DeleteI downgrade to version 5.1.1
Now it is reading the atu.properties path.
Thank you.
I am also logging this to the spreadsheet.
Hi I. getting below error
ReplyDeletejava.lang.IllegalStateException: [ATU Custom Reporter Exception] Settings File Not Available
Please help me to fix it.
Hi
ReplyDeleteIs it possible to share the class for wordpress used in testng.xml so as to understand the report better
Hi i am facing some problem with ATU, i get this error could someone pls help me, i am pretty new to selenium.
ReplyDeletejava.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)
and wht is key values? how to set that ?
ReplyDeleteHi 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?
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteHi everyone,
ReplyDeletePlease 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
I am getting below error can you pls let me know why i am getting thius
Deletejava.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
"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'
DeleteI am also seeing the same issue......Please give me if any one able to call the properties file in ur scripts..... :(
DeleteHi,
ReplyDeleteFirst 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?
Hi,
ReplyDeleteCan 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.
Hi,
ReplyDeleteI 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");
}
Hi ATU,
ReplyDeleteI 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)
How to take screen shot of Android devices?
ReplyDeleteATU not reading anything from atu.properties file
ReplyDeletedeclared 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
I am also seeing the same issue......Please give me if any one able to call the properties file in ur scripts..... :(
DeleteDear Sir,
ReplyDeleteI 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)
✔ PLC Training in chennai
ReplyDelete✔ PLC Training Institute in chennai
✔ PLC Training Center in chennai
✔ PLC Training Course in chennai
✔ PLC Course in chennai
✔ PLC SCADA Training in chennai
✔ PLC Training Centre in chennai
✔ PLC SCADA Training Institute in chennai
✔ Best PLC Training in chennai
✔ Best PLC Training Institute in chennai
✔ DCS Training in chennai
✔ Automation Training in chennai
✔ Automation Training Institute in chennai
✔ Industrial Automation Training in chennai
✔ Process Automation Training in chennai
✔ Robotics Training in chennai
✔ Inplant Training in chennai
I dont want previous run reports. can any one tell me how to get only current run in the report.
ReplyDeleteHi..can anyone suggest me how will i get screenshot for failed step also using AUT report? becoz after operation adding report descritption
ReplyDeleteeg: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.
how can i get screenshot for passed steps and as well as for first failed step screenshot. is it possible with ATUReport??
ReplyDeletePlease provide some sample code to generate the reports, and also for excel generate reports, how mention the code to keep true.
ReplyDeletePlease 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
An awesome tool for generating reports.
ReplyDeleteA 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.
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.
ReplyDeleteI 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?
ReplyDeleteCan someone help on this...
Thanks,
Nawaz.
Hi there,
ReplyDeleteCan 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 ???
Hello,
ReplyDeleteI 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,
java.io.FileNotFoundException: reports/Results/Run_10/Default suite/Default test/testcases/LoginTC001/TopEntiesTestcase_Iteration1/IMG/1.PNG (No such file or directory)
ReplyDeleteat 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
Please help me..
ReplyDeleteThanks, Karthikeyan
Hi AT,
ReplyDeletePlease 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
Hi AT,
DeleteI 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.
Hi AT& Friends.
ReplyDeletei 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
Hello,
ReplyDeleteI 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?
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?
ReplyDeletei am trying to implement for appium, how to change the method for it and write the test cases accordingly
ReplyDeleteHi, I ma getting the following error, can someone help
ReplyDeletejava.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)
I am trying to generate excel reports
ReplyDeleteHi Ramnarayan,
ReplyDeleteThis 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/
Where is "/html/body/div/h1/a" coming from? is it from my website or report page?
ReplyDeleteI'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
ReplyDelete"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
Hi,
ReplyDeleteThe Screenshots displayed are not matching in the report.
I'm using cross browsers to test the same, is this responsible for creating this issue?
Hi,
ReplyDeleteI 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);
}
}
why you guys did not do any video on it so that anyone can do it easily
ReplyDeleteHi i am getting error when i set the atu.properties
ReplyDeletejava.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
java.lang.IllegalStateException: [ATU Custom Reporter Exception] Unable To Create Required Files for Custom Reports
ReplyDeleteat 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..
Hi
ReplyDeleteI am not getting the screenshot in my report. I have set the value as "true" in the properties file and set the Boolean value as true in AtuReports.add method.But still I am not getting the screenshot.
When I declare the properties file in the static block , I am getting the below 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:208)
at org.testng.SuiteRunner.run(SuiteRunner.java:266)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
at org.testng.TestNG.run(TestNG.java:1064)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:230)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:76)
Not able to get screen shots ,
ReplyDeletetried everything stated above and tried different version as well but no success.
Please help
My code in set up where I am opening URL
ReplyDeleteI have mentioned listeners in testng.xml
public static void setUp(String browser){
System.out.println("Entered set up file");
System.setProperty("atu.reporter.config", "D:\\Automation Tools\\ATU reports jar\\version 5.5 beta\\ATUReporter_Selenium_testNG_5.5 BETA + ATU Recorder 2.1+javadoc+propfile\\atu.properties");
if(browser.equals("IE")) {
System.out.println("Entered set up file IE");
System.setProperty(Constants.SYSTEM_PROPERTY_IE,CommonUtils.getIEDriver());
setDriver(new InternetExplorerDriver());
driver = new InternetExplorerDriver();
ATUReports.setWebDriver(driver);
}
else if(browser.equals("Chrome")) {
System.out.println("Entered set up file Chrome");
System.setProperty(Constants.SYSTEM_PROPERTY_CHROME,CommonUtils.getChromeDriver());
setDriver(new ChromeDriver());
driver = new ChromeDriver();
ATUReports.setWebDriver(driver);
}
Here is the test script where I want screen shots
ReplyDeletepublic class Login {
@SuppressWarnings("deprecation")
@BeforeTest
@Parameters({"Browser"})
public static void navigatingToURL(String browser) {
SetUpPage.setUp(browser);
ATUReports.add("last time",true);
ATUReports.add("desktop",LogAs.PASSED, new CaptureScreen(ScreenshotOf.BROWSER_PAGE));
System.out.println("now desktop page");
ATUReports.add("desktop",LogAs.PASSED, new CaptureScreen(ScreenshotOf.DESKTOP));
}
Suppose, this framework doesn't supports by it's author for now. Also have troubles with screenshots.
ReplyDeletePerhaps Allure framework will be good with screenshots.
https://github.com/allure-framework/
This is an awesome Reporting tool.
ReplyDeleteis there any way to change the Test Result folder.. instead of "Run", can we update as "Date" of the execution?
How to add browser detail on the CurrentRun Page...Syntax to add Browser details...it is showing unknown
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteHi ATU,
ReplyDeleteI am getting the below exception when running the reports code after 2 times..i have tried in both 5.1.1 and 5.5 beta version
java.io.FileNotFoundException: G:\eclipse\ATU Reports\Results\Run_40\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 atu.testng.reports.listeners.ATUReportsListener.generateReport(Unknown Source)
at org.testng.TestNG.generateReports(TestNG.java:1115)
at org.testng.TestNG.run(TestNG.java:1074)
at com.pack.ScriptHandler.execute(ScriptHandler.java:261)
at org.apache.jsp.executescript_jsp._jspService(executescript_jsp.java:348)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:438)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1156)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1539)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1495)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
Hi,
ReplyDeleteI am usint retry analyzer to run the failed testcase with atu report.
I was able to remove the skipped tests from TestNG report. However, the skipped count still displaying in ATU report. Do we have any solution for this
Hi,
ReplyDeleteI have given property file in static block and updated property file with required value.
I have not given listeners in testng.xml file as mentioned those should be given either in class or testng
But it is not reading property file.
Please help me in this.
Hi,
ReplyDeleteATU Capture Screenshot is unable to capture the complete Browser, can you please help on it.
I had used the below code
ATUReports.add("arg0", "arg1", "arg2", "arg3", LogAs.PASSED, new CaptureScreen(ScreenshotOf.BROWSER_PAGE));
But still it not capturing the complete browser page.
Can you please help
Thanks.
Screenshot-not generating
ReplyDeleteScreenshot-not generating
ReplyDeleteI have read your blog its very attractive and impressive. I like your blog. selenium online training Hyderabad
ReplyDelete