问题标签 [reportng]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
208 浏览

maven - TestNG 报告未显示超过 21 个测试

我有一个通过 Testng xml 运行 testNG 测试的 maven 项目。XML 具有以下侦听器

我在 xml 中有 24 个测试,所有测试都运行包,例如

出于某种原因,所有 24 个测试都运行,但在 testng 报告中我只看到 21 个测试。显示的 21 个测试并不总是一致的,因此排除了某些测试设置存在问题的可能性。我想知道是否可能运行最大数量的测试以及是否需要组合测试?或者是否可以设置最大数量的测试参数?

以下是我的 maven-surefire-plugin 设置

谢谢你的帮助。

0 投票
2 回答
2199 浏览

testing - Selenium Webdriver Keyword driven with TestNG integration

I'm in the process of learning keyword driven framework with TestNG and ReportNG integration. My requirements are

  1. Triggering the automation using TestNG
  2. Read the keywords and values from the excel sheet (one sheet has keywords and actions. The other sheet has xpath for each object)
  3. Drive the automation using keyword driven approach
  4. Generate report using ReportNG

TestNG File:

Excel Sheet1 :

enter image description here

Excel Sheet2:

This can be moved to properties file but as of now I'm reading from excel file

enter image description here

TestSuite file:

Can anyone help me in clarifying the below questions?

  1. When I run this test integrated with ReportNG, each excel row is considered as single test case and the report is showing the total number of row as test case count.

    Any suggestion on how to read the excel sheet based on TC name and generate ReportNG report based on that?

  2. If the answer for the above question is yes, then how can I call single @Test method to generate more than one test case?

Any help on this is highly appreciated. Thanks.

0 投票
1 回答
131 浏览

html - 每次测试完成后,使用 ReportNG 按日期时间生成报告

我使用 Selenium webdriver、testng 和 reportng 开发自动化测试框架,一切正常,reportNG 在每次测试完成后生成 html 报告,但 html 报告将被下一轮测试覆盖;

所以,我正在考虑是否可以在 Reportng 中配置以保留 HTML 报告的任何参数不会被覆盖,只需按日期和时间分别创建和保存;你能告诉我在哪里做reportng的设置吗?谢谢!

0 投票
1 回答
222 浏览

selenium - 转义后无法添加屏幕截图报告硒设置为false

我无法将屏幕截图添加到 reportNG html 报告。输出如下所示

[a href="C:/2016.12.01.23.03.59.jpg"] [img src="C:/2016.12.01.23.03.59.jpg"/] [/a]

1.ReportNG 报告生成正确 2. 我已将转义属性设置为 System.setProperty("org.uncommons.reportng.escape-output", "false") 3. 我从项目属性中禁用了默认侦听器。4. 我在testng.xml 和pom.xml 中添加了reportng 监听器。

不知道为什么没有显示屏幕截图。请任何人建议。

0 投票
1 回答
1111 浏览

testing - TestNG - 从 TestNG 工厂运行每个实例作为单独的测试

我正在使用 TestNG 进行测试自动化以及使用 ReportNG 进行报告。我使用 TestNG 工厂类为我的测试提供不同的输入。我这里面临的问题是工厂提供的所有测试实例都在同一个测试下运行,并且生成的报告显示了单个测试下的所有场景。

我想将工厂提供的每个测试实例作为单独的测试运行。有没有办法做到这一点?PFB 我的 xml 配置

0 投票
2 回答
93 浏览

selenium - ReportNG 报告显示空白灰色框

我对 ReportNG 有一个问题,它工作正常,并且在每次执行后在 surefire-reports 下生成了“index.html”。

但是当我尝试将该报告作为电子邮件附件发送并打开该附件“index.html”以查看报告时

报告显示为灰色空框附加空 ReportNG 报告

0 投票
1 回答
596 浏览

reportng - java.lang.NoClassDefFoundError 在运行带有配置的 ReportNG 的 TestNG xml 文件时

我是 Selenium 的新手,使用已配置的 ReportNG 运行我的第一个 TestNG。我已经执行了以下所有必需的步骤。请帮助您的输入。谢谢!

  1. 将以下 JAR 添加到项目 guice 3.0 Velocity 1.4 报告 1.1.4
  2. 禁用 TestNG 的默认侦听器
  3. 向 xml 添加了 ReportNG 侦听器

    XML 文件:

将 .xml 作为 TestNG 套件运行后,出现以下错误。类定义看起来不错...下面的快照...

java.lang.NoClassDefFoundError: org/apache/commons/collections/ExtendedProperties at org.apache.velocity.runtime.RuntimeInstance.<init> (RuntimeInstance.java:160) at org.apache.velocity.runtime.RuntimeSingleton.<clinit> (RuntimeSingleton.java:95) at org.apache.velocity.app.Velocity.setProperty(Velocity.java:117) at org.uncommons.reportng.AbstractReporter.<init>(AbstractReporter.java:62) at org.uncommons.reportng.HTMLReporter.<init>(HTMLReporter.java:83) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at org.testng.internal.ClassHelper.newInstance(ClassHelper.java:50) at org.testng.TestNG.initializeConfiguration(TestNG.java:914) at org.testng.TestNG.run(TestNG.java:1022) at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77) Caused by: java.lang.ClassNotFoundException: org.apache.commons.collections.ExtendedProperties at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 16 more

0 投票
2 回答
933 浏览

java - Selenium Java(maven 项目):TestNG 结果与 ReportNG 不同

我尝试运行testng.xml,结果是:

================================================

默认测试

测试运行:14,失败:6,跳过:0

默认套件

总测试运行:14,失败:6,跳过:0

================================================

现在,我禁用了默认的 TestNG 侦听器并在testng.xml. testng.xml。_ 看起来像这样:

按照这些步骤,我在velocitymaven的.guicereportngpom.xml

执行 testsuitetestng.xml后,创建了以下文件夹(标记为红色框)。

在此处输入图像描述

打开index.html后结果是这样的: 在此处输入图像描述

正如预期的那样,ReportNG 应该已经创建了一个输出文件夹,这在我的场景中没有被注意到。其次,结果不同。

此外,报告index.html看起来并不实际。有人可以告诉你怎么了?

一些细节供您参考:

操作系统:Windows 7

Guice.jar 版本:guice-4.1.0

报告版本:reportng-1.1.4

速度版本:velocity-dep-1.4

测试NG版本:testng-6.11

硒版本:selenium-java-3.5.3

蚀:eclipse oxygen

我的测试用例如下:

0 投票
1 回答
422 浏览

jenkins - 当 Zypher 向 JIRA 发布报告时出现 java.lang.NullPointerException

我使用报告格式将报告发布到 Jira,但我看到了 nullpointer 异常:

你知道为什么吗?或者如何解决?

0 投票
2 回答
132 浏览

testng - 需要帮助修改 Testng 报告

在我的报告中,excel 表中的最后一个测试名称被附加到我的结果中。这是我的代码

我的报告看起来像这样

报告