Мне понравилось графическое представление отчетов testng xslt, и я хочу отправить сообщение по электронной почте (не уверен, что это будет возможно, потому что он передает HTML). Я попробовал this blog. Ниже pom.xml не дает ЛЮБОЙ ошибки, но все еще не в состоянии создать каталог C:/Users/windowspc/workspace/windows-project/target/testng-xslt-report
с отчетами xslt. Я помню, что мне удалось генерировать отчеты xslt через build.xml, я помню, что я дал saxon.jar
, поэтому я добавил зависимость в pom также, также он имел этот кусок кода <xslt in="${basedir}/test-output/testng-results.xml" style="${basedir}/testng-results.xsl" out="${basedir}/testng-xslt/index.html">
, но он отсутствует в pom.xml, я не Обязательно добавьте это, если это необходимо для генерации отчетов xslt.Невозможно сгенерировать XSLT в проекте maven
ПОМ выглядит следующим образом:
<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>
http://www.cosminaru.ro/maven/ отсутствует. – willome
@willome, не могли бы вы объяснить, что это значит. Что такое решение>? – paul
См. Мой ответ. Скачайте lib и установите его в локальный репозиторий maven – willome