[英]TestNG Emailable Report 0kb
I'm trying to use TestNG EmailableReporter2 in my tests but the generated html file is 0kb and does not contain any tests. 我正在尝试在测试中使用TestNG EmailableReporter2,但是生成的html文件为0kb,并且不包含任何测试。
I've added 我已经添加
<listeners>
<listener class-name="org.testng.reporters.EmailableReporter2" />
</listeners>
To my testng.xml, the report file is generating without issues, but does not contain any data. 对于我的testng.xml,报告文件正在生成,没有问题,但是不包含任何数据。
I have a few hunches, because before this was working fine for me. 我有一些预感,因为在此之前对我来说还不错。 Could this be because something's wrong with my pom.xml?
可能是因为我的pom.xml出了点问题吗? (Previously I haven't used maven in my automation projects)
(以前,我没有在自动化项目中使用过Maven)
Not likely, but could this be because of some proxy issues? 不太可能,但这可能是因为某些代理问题?
My pom.xml is as follows: 我的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>package.name</groupId>
<artifactId>ArtID</artifactId>
<version>1.0.0</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.3.1</version>
</dependency>
<!--<dependency>-->
<!--<groupId>org.apache.logging.log4j</groupId>-->
<!--<artifactId>log4j-api</artifactId>-->
<!--<version>2.8.1</version>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>log4j</groupId>-->
<!--<artifactId>log4j</artifactId>-->
<!--<version>1.2.17</version>-->
<!--</dependency>-->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.8.1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.8.1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.15</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.5</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>LATEST</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.11</version>
</dependency>
</dependencies>
</project>
I believe your question was answered in the issue https://github.com/cbeust/testng/issues/1412 我相信您的问题已在问题https://github.com/cbeust/testng/issues/1412中得到了回答
You have not specified the testng.xml location to maven.
您尚未将testng.xml位置指定为maven。
Check: https://maven.apache.org/surefire/maven-surefire-plugin/examples/testng.html
检查: https : //maven.apache.org/surefire/maven-surefire-plugin/examples/testng.html
Feel free to reopen the issue if it doesn't work and if you think it is a testng issue.
如果此问题不起作用,并且您认为是testng问题,请随时重新打开。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.