0

I liked the graphical representation of testng xslt reports and I want to email (not sure it would be possible because it sents HTML). I tried this blog. Below pom.xml doesnt give ANY error but still not able to create directory C:/Users/windowspc/workspace/windows-project/target/testng-xslt-report with xslt reports. I remember I was able to generate xslt reports via build.xml, I remember that I had given saxon.jar so I added the dependency in pom also, also it had this piece of code <xslt in="${basedir}/test-output/testng-results.xml" style="${basedir}/testng-results.xsl" out="${basedir}/testng-xslt/index.html"> but it is missing in pom.xml, I am not sure where to add this if this is necessary to generate xslt reports.

pom looks like this:

     <build>
        <testResources>
            <testResource>
                <directory>src/test/resource</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.12.4</version>
                <configuration>
                    <suiteXmlFiles>
                        <suiteXmlFile>
                            C:/Users/windowspc/workspace/windows-project/Chrome.xml
                        </suiteXmlFile>
                    </suiteXmlFiles>
                    <testFailureIgnore>
                        true
                    </testFailureIgnore>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>

                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.testng.xslt</groupId>
                <artifactId>testng-xslt-plugin</artifactId>
                <version>1.1</version>
                <configuration>
                    <outputDir>C:/Users/windowspc/workspace/windows-project/target/testng-xslt-report</outputDir>
                    <showRuntimeTotals>true</showRuntimeTotals>
                    <sortTestCaseLinks>true</sortTestCaseLinks>
                    <testDetailsFilter>FAIL,PASS,SKIP,CONF</testDetailsFilter>
                </configuration>
            </plugin>
        </plugins>
    </reporting>
    <pluginRepositories>
        <pluginRepository>
            <id>testng-xslt-plugin</id>
            <url>http://uhftopic.com/maven/</url>
        </pluginRepository>
    </pluginRepositories>
    ...
    ...
        <dependency>
            <groupId>net.sourceforge.jexcelapi</groupId>
            <artifactId>jxl</artifactId>
            <version>2.6.12</version>
        </dependency>
        <dependency>
            <groupId>net.sf.saxon</groupId>
            <artifactId>saxon</artifactId>
            <version>8.7</version>
        </dependency>

        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.5.2</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
paul
  • 4,333
  • 16
  • 71
  • 144

1 Answers1

0

The plugin repository is offline. try downloading this plugin from an other place.

There is an answer in the blog comments :

Please find the download link for the testngxslt jar below: https://docs.google.com/open?id=0B3OQaZlrVrdJRndLZWhrcDBzaFU

You can use any of the following method mentioned in following links to include it in your classpath: Maven: How to include jars, which are not available in reps into a J2EE project?

http://www.roseindia.net/answers/viewqa/Maven/11659-including-jar-file-in-maven-pom.xml-.html

Community
  • 1
  • 1
willome
  • 3,062
  • 19
  • 32
  • could you please share your pom that is able to generate xslt reports. I have edited the post with new pom which doesnt give any error but not able generate pom , dont know why... – paul Sep 27 '13 at 09:00