Re: [maven-and-scala] Getting error Failed to generate HTML Report by use of ReportNG with Maven.

171 views
Skip to first unread message
Message has been deleted

Martin Grigorov

unread,
May 24, 2013, 11:39:04 AM5/24/13
to maven-a...@googlegroups.com
Hi,

This forum is about scala-maven-plugin. Not about Maven in general.
You should ask in us...@maven.apache.org for general questions about Maven.


On Sun, May 19, 2013 at 7:35 AM, Omkar Khatavkar <okhata...@gmail.com> wrote:

Hi guys,I am trying to generate HTML report using Maven with ReportNG.I ahd mention the pom.xml file below.Please some one can help me out.I am new to maven and ReportNG.

Error:

Running TestSuite
org.apache.maven.surefire.booter.SurefireExecutionException: Failed generating HTML report.; nested exception is
org.uncommons.reportng.ReportNGException: Failed generating HTML report.
org.uncommons.reportng.ReportNGException: Failed generating HTML report.
        at org.uncommons.reportng.HTMLReporter.generateReport(HTMLReporter.java:117)
        at org.testng.TestNG.run(TestNG.java:613)
        at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62)
        at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:102)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:109)
        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:601)
        at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
        at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1017)
Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getDuration' in  class
org.uncommons.reportng.ReportNGUtils threw exception class java.lang.NoSuchMethodError : org.testng.ITestContext.
getPassedConfigurations()Lorg/testng/IResultMap;
        at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:246)
        at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:175)



My Pom.xml is below

POM.XML :

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.reportng</groupId>
    <artifactId>Reportng</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>Reportng</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.1.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>2.31.0</version>
        </dependency>
        <dependency>
            <groupId>org.uncommons</groupId>
            <artifactId>reportng</artifactId>
            <version>1.1.2</version>
        </dependency>
        <dependency>
            <groupId>velocity</groupId>
            <artifactId>velocity</artifactId>
            <version>1.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
            <version>3.0</version>
        </dependency>
    </dependencies>
    <repositories>
        <repository>
            <id>java-net</id>
            <url>http://download.java.net/maven/2</url>
        </repository>
    </repositories>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <properties>
                        <property>
                            <name>usedefaultlisteners</name>
                            <value>false</value>
                        </property>
                        <property>
                            <name>listener</name>
                            <value>org.uncommons.reportng.HTMLReporter,org.uncommons.reportng.JUnitXMLReporter</value>
                        </property>
                    </properties>
                    <workingDirectory>target/</workingDirectory>
                    <forkMode>always</forkMode>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

--
 
---
You received this message because you are subscribed to the Google Groups "Maven and Scala" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maven-and-sca...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages