简体   繁体   English

TestNG可通过电子邮件发送的报告0kb

[英]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.

相关问题 TestNG可通过电子邮件发送的报告中的原始HTML - Raw html in TestNG Emailable Report 按时间顺序排列testng emailable-report.html? - testng emailable-report.html in chronological order? 如何通过编程方式将所有Testng可通过电子邮件发送的报告合并为单个报告 - How to merge all the testng emailable report into single report through programatically TestNG-如何在testng自定义可通过电子邮件发送的报告中打印运行时的testng参数? - TestNG - How to print run time testng parameters in testng custom emailable report? 如何使用 xslt 将值从 XML 附加到 TestNG 可通过电子邮件发送的 HTML 报告 - How to append values from XML to TestNG emailable HTML report using xslt 如何使用testng-results.xml生成可通过电子邮件发送的格式执行报告 - how to generate emailable format execution report using testng-results.xml 测试完成后如何触发发送TestNG可通过电子邮件发送的报告 - How do I trigger sending TestNG emailable report after test completion 如果使用DataProvider,如何在TestNG可通过电子邮件发送的报告中提供自定义方法名称 - How to give Custom Method name in TestNG emailable report, in case when DataProvider is Used TestNG在Reporter之后我可以在哪里运行代码? 想要发送test-output / emailable-report.html - TestNG where can I run code after Reporter? Want to send test-output/emailable-report.html android:将捕获照片0kb保存在文件夹中 - android: save capture photo 0kb in the folder
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM