How to use ReportNG
===================
To use the reporting plug-in, set the "listeners" attribute of the "testng"
element in your Ant build file. This attribute takes a comma-separated list of
reporter class names. The class names for the ReportNG reporters are:
org.uncommons.reportng.HTMLReporter
org.uncommons.reportng.JUnitXMLReporter
You may also want to disable the default TestNG reporters by setting the
"useDefaultListeners" attribute to "false".
Your Ant task will probably look something like this:
<testng classpathref="test-path"
outputdir="${test-results.dir}"
haltonfailure="true"
useDefaultListeners="false"
listeners="org.uncommons.reportng.HTMLReporter">
<xmlfileset dir="." includes="testng.xml"/>
<sysproperty key="org.uncommons.reportng.title" value="My Test Report"/>
</testng>
If you are not using Ant to run TestNG (i.e. you are using Maven, the command
line or an IDE plug-in), please refer to the TestNG documentation
(http://testng.org/doc/documentation-main.html#running-testng) to find out how
to register custom listeners/reporters.
Supported System Properties
---------------------------
The following optional system properties can be set (via nested "<sysproperty>"
elements within the "<testng>" element) in order to customise the report
output:
org.uncommons.reportng.coverage-report
A relative or absolute URL that links to a test coverage report.
org.uncommons.reportng.escape-output
Used to turn off escaping for log output in the reports (not
recommended). The default is for output to be escaped, since this
prevents characters such as '<' and '&' from causing mark-up problems.
If escaping is turned off then log text is included as raw HTML/XML,
which allows for the insertion of hyperlinks and other nasty hacks.
org.uncommons.reportng.failures-only
Defaults to "false". If set to "true" the HTML report will exclude tests
that completed without failures.
org.uncommons.reportng.frames
Defaults to "true". If set to "false" generates the HTML report without
using a frameset. No navigation page is generated and the overview page
becomes the index page.
org.uncommons.reportng.locale
Over-rides the default locale for localised messages in generated
reports. If not specified, the JVM default locale is used. If there are
no translations available for the selected locale the default English
messages are used instead. This property should be set to an ISO
language code (e.g. "en" or "fr") or to an ISO language code and an ISO
country code separated by an underscore (e.g. "en_US" or "fr_CA").
org.uncommons.reportng.show-expected-exceptions
Set to "true" or "false" to specify whether the stack-traces of expected
exceptions should be included in the output for passed test cases. The
default is "false" because the presence of stack-traces for successful
tests may be confusing.
org.uncommons.reportng.stylesheet
The path to a custom CSS file that over-rides some or all of the default
styles used by the HTMLReporter. This allows the appearance of reports
to be customised. See the default stylesheet for the classes and
selectors that can be styled. For an example, see this version of the
sample report, which uses the bundled hudsonesque.css file to customise
the report's appearance.
org.uncommons.reportng.title
Used to over-ride the report title.
org.uncommons.reportng.velocity-log
Since version 1.1.3, ReportNG will no longer generate a Velocity log file
by default. If you want a log file you should set this property to
"true".
org.uncommons.reportng.xml-dialect
Controls the XML generated by JUnitXMLReporter. If set to "testng" (the
default) then skipped tests appear as "skipped" in the XML. This is
suitable for use with tools such as Hudson that understand the TestNG
dialect of the XML format. Other tools, such as Ant's junitreport task,
do not have a notion of skipped tests. For these tools the dialect can
be set to "junit" and skipped tests will be marked as failures.
没有合适的资源?快使用搜索试试~ 我知道了~
testng所需jar包guice-3.0.jar reportng-1.1.4.jar velocity-dep-1.4.ja...
共7个文件
txt:4个
jar:2个
css:1个
3星 · 超过75%的资源 需积分: 14 104 下载量 63 浏览量
2016-09-29
09:13:56
上传
评论
收藏 500KB ZIP 举报
温馨提示
testng所需jar包guice-3.0.jar reportng-1.1.4.jar velocity-dep-1.4.jar
资源推荐
资源详情
资源评论
收起资源包目录
reportng-1.1.4.zip (7个子文件)
reportng-1.1.4
LICENSE.txt 11KB
stylesheets
hudsonesque.css 3KB
CHANGELOG.txt 2KB
velocity-dep-1.4.jar 506KB
NOTICE.txt 600B
README.txt 4KB
reportng-1.1.4.jar 40KB
共 7 条
- 1
资源评论
- Rihannalu2017-08-15这里面只有 reportng-1.1.4.jar velocity-dep-1.4.jar,没有guice-3.0.jar。还得另外找,楼主不厚道啊。不过我找到了,在这里可以下载https://github.com/google/guice/wiki/Guice41,已经更新到4.1了。
- qq_382523212017-08-10没有guice-3.0.jar 汗颜
- xiaotian-xiao2018-04-20可以使用 感谢分享
zaq1zse4
- 粉丝: 1
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功