如何让RFT实时报告测试结果?
在我们的开发环境中,我们运行持续集成服务 (TeamCity),该服务通过运行构建/测试作业并报告结果来响应代码签入。当工作正在进行时,我们可以很容易地看到到目前为止已经执行了多少个单元测试、有多少个单元测试失败了等等。
我的自动化测试团队正在交付在 Rational Function Tester 中开发的 UI 测试。从源代码控制系统中提取这些测试、编译它们并从命令行执行它们似乎都是非常简单的练习。
我无法找到一种自动报告测试结果的方法 - 例如,似乎没有任何监听器的钩子,或者任何自定义发出的消息的方法。
根据迄今为止的研究,我得出的结论是,我唯一的选择是 (a) 等待测试完成,然后 (b) 解析 RFT 生成的 HTML 报告。
还有人有比这更好的答案吗?
In our development environment, we run a Continuous Integration service (TeamCity) which responds to code checkins by running build/test jobs and reporting the results. While the job is in progress, we can easily see how many unit tests have executed so far, how many have failed, etc.
My automated testing team is delivering UI tests developed in Rational Functional Tester. Extracting those tests from the source control system, compiling them, and executing them from the command line all seem to be pretty straight forward exercises.
What I haven't been able to find is a way to report the test results automatically - there don't appear to be any hooks for listeners, for example, or any way to customize the messages that are emitted.
From my research thus far, I've come to the conclusion that my only option is to (a) wait until the tests finish, then (b) parse the HTML report that RFT generates.
Does anybody have a better answer than that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
以下是我用于类似目的的解决方法:
Here is the workaround I've used for the similar purpose:
扩展 @eric2323223,在 onTerminate 重写中,您可以使用 TeamCity 的 构建脚本交互功能可将 RFT 通过/失败状态汇总到 TeamCity。您只需将这些 TeamCity 特定消息发送到命令行,以便 TeamCity 接收它们。
Expanding on @eric2323223, in your onTerminate override, you can use TeamCity's build script interaction functionality to have your RFT pass/fail status rolled up to TeamCity. You just need these TeamCity specific messages emitted to the command line, so that TeamCity picks them up.