Maven-ATU Report Integration...

1,425 views
Skip to first unread message

Ram Narayan

unread,
Feb 1, 2016, 9:59:21 AM2/1/16
to Selenium Users
Hi Everyone,
I've a problem while execute my MAVEN project as 'Maven test' due to the ATU report thing. I am getting TestNG exception and a Compilation exception.

Q1: Where we need to add the listener thing in pom.xml file ?
Q2: When i am executing the testng.xml file as a 'maven test' (i.e. putting the testng.xml file path as below) why i am getting the exceptions.
                     <suiteXmlFiles>
                        <suiteXmlFile>src/test/resources/runlocal.xml</suiteXmlFile>
                    </suiteXmlFiles>

Any body used ATU Reports with Maven build tool,Please reply to this mail with Suggestion.

Please refer to the attachments

-Ram Narayan

compilation.png
testng_exception.png

Ram Narayan

unread,
Feb 2, 2016, 6:55:37 AM2/2/16
to Selenium Users
Guys,
Happy to tell you the solution ...

Reason : It happens as you haven't added the dependencies in your pom.xml file. When you run a project as maven test then it looks for the jar in local repo of your system.

Solution :

NOTE : At anytime in your project if you use any third party JARs or JAR files created by you which is not having MAVEN dependencies then don't worry. we can create by our own.

Steps for creating maven dependency :

1. Maven Install the xyz JAR file 

D:\>mvn install:install-file -Dfile=c:\xyz.jar -DgroupId=com.xyz.code  -DartifactId=xyzartifact -Dversion=1.0 -Dpackaging=jar


You should get the BUILD SUCCESS 

2. Now write the dependency in pom.xml file

<dependency>
      <groupId>com.xyz.code</groupId>
      <artifactId>xyzarifact</artifactId>
      <version>1.0</version>
 </dependency>

Follow the above steps and then Run your maven test.(mvn test).

Let me know if you face any difficulty.Thanks ! 

Rselva RaCe

unread,
May 13, 2016, 12:09:25 PM5/13/16
to Selenium Users
Hi Ram Narayan,

I have tried everything as your said above. but still am unable to integrate ATU report in Maven project. if i included @Listeners({ ATUReportsListener.class, ConfigurationListener.class, MethodListener.class }) means am getting "The type org.testng.IConfigurationListener2 cannot be resolved. It is indirectly referenced from required .class files"

then if i added Selenium-server-standalone jar externally means, that error disappeared and if i run maven test means getting below exception. Can u pls tell me the steps how did u integrated ATU report in maven project?

org.apache.maven.surefire.booter.SurefireExecutionException: sun.reflect.annotation.TypeNotPresentExceptionProxy; nested exception is java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724)
at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531)
at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)
at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
at java.lang.Class.createAnnotationData(Class.java:3521)
at java.lang.Class.annotationData(Class.java:3510)
at java.lang.Class.getAnnotation(Class.java:3415)
at org.testng.internal.annotations.JDK15AnnotationFinder.findAnnotationInSuperClasses(JDK15AnnotationFinder.java:83)
at org.testng.internal.annotations.JDK15AnnotationFinder.findAnnotation(JDK15AnnotationFinder.java:149)
at org.testng.TestNG.createCommandLineSuitesForClasses(TestNG.java:551)
at org.testng.TestNG.initializeCommandLineSuites(TestNG.java:789)
at org.testng.TestNG.run(TestNG.java:975)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:141)
at org.apache.maven.surefire.Surefire.run(Surefire.java:180)
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.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.559 s
[INFO] Finished at: 2016-05-13T18:24:15+05:30
[INFO] Final Memory: 10M/114M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test (default-test) on project WebClient: There are test failures.
[ERROR] 
[ERROR] Please refer to D:\Selenium\WebClient\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:


On Monday, February 1, 2016 at 8:29:21 PM UTC+5:30, Ram Narayan wrote:
Reply all
Reply to author
Forward
0 new messages