配置 Rational Function Tester (RFT) 以在 Hudson/Jenkins 中运行
我刚刚安装了 Hudson,它运行得很好。它构建、运行 JUnit 测试以及 CheckStyle 分析。
我们的下一步是创建一个安装,安装它,然后对实际安装运行自动化测试。如果测试失败或者至少以某种方式发布结果,我希望构建失败。我认为我们会对其进行设置,以便该部分定期运行或手动触发。
我们使用 InstallAnywhere 进行安装,使用 IBM Rational Function Tester 进行自动化测试。
所以问题是:有人创建了类似的设置吗?有没有任何插件、教程或其他资源可以帮助我。或者您有什么一般性的提示或建议吗?
I've just installed Hudson and it is running beautifully. It builds, runs JUnit-tests and also CheckStyle analysis.
Next step for us would be to create an installation, install it and then run automated tests on the actual installation. I would then like to fail the build if the tests fail or at least publish the results somehow. I think we would set it up so that part runs periodically or manually triggered.
We use InstallAnywhere for installation and IBM Rational Functional Tester for automated tests.
So questions are: anyone created a similar setup? are there any plugins, tutorials or other resource that could help me along. Or do you have any tips or advice in general.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Rational Function Tester 的命令行参考:
http://publib.boulder.ibm.com/infocenter/rfthelp/v8r0m0/index.jsp?topic=/com.ibm.rational.test.ft.doc /topics/RobotJCommandLine.html
运行测试的示例命令:
附加说明,您需要在将运行测试的代理计算机上正确配置窗口。这不是针对 Hudson 或 RFT 的建议,而是针对 Windows 上的所有 GUI 自动化工具的建议。 RFT 将需要一个交互式桌面环境,以便能够单击按钮等。如果您将 Hudson 代理作为 Windows 服务运行,则不会有桌面。请参阅以下内容:除非 RDP 连接打开,否则 Silverlight 测试无法工作
The command line reference for Rational Functional Tester:
http://publib.boulder.ibm.com/infocenter/rfthelp/v8r0m0/index.jsp?topic=/com.ibm.rational.test.ft.doc/topics/RobotJCommandLine.html
Sample command for running a test:
An additional note, you'll want to configure windows properly on your agent machine which will be running the tests. This is not advice specific to Hudson or RFT, but rather all GUI automation tools on Windows. RFT will require an interactive desktop environment for it to be able to click buttons, etc. If you have your Hudson agent running as a Windows service, there will be no desktop. See the following: Silverlight tests not working unless RDP connection open
我们在 Hudson 上运行了一个相当复杂的分布式构建,它的过程基本上如下:
我们不使用InstallAnywhere或RationalFunctionalTester,但在它们的位置上有类似的机制。我们发现在 Hudson 中一切顺利的关键是能够从命令行运行我们的各个步骤。 Maven 和适当的插件很快就完成了这项任务。所以我的建议就是,使用您正在使用的任何构建工具(ant,maven,?)配置它们,以便您可以运行您的理性功能测试器并从命令行安装到任何地方,并将一个简单的目标传递给您的构建工具(即 mvn 测试或 mvn 组装:组装)。
之后,确保运行 Hudson 的任何机器都已安装并配置好所有内容(即 Rational Technical Tester),以便您可以打开命令行并输入目标并正确执行测试。
从那时起,在 Hudson 中将其连接起来相当简单 - 只需在配置构建时传递目标即可。
We have run a fairly complicated distributed build on Hudson, it is a process that basically follows:
We don't use InstallAnywhere or Rational Functional Tester, but have similar sorts of mechanisms in their place. The key we found to making it all sing in Hudson was being able run our various steps from the command line. Maven and appropriate plugins made short work of this task. So my advice would be just that, using whatever build tool you are using (ant, maven, ?) configure them so that you can run your rational functional tester and install anywhere from the command line with a simple goal passed to your build tool (i.e. mvn test or mvn assembly:assembly).
After that, make sure whatever machine Hudson is running on has everything installed (i.e. Rational Functional Tester) and configured, so that you can open up the command line and type in the goal and have your tests correctly execute.
Hooking it up in Hudson from that point on is fairly simple - just pass in the goal when you configure the build.
我相信最好的答案是,将 RFT 与 Hudson/Jenkins 集成是徒劳的。
正如 IBM FAQ 所说,要使 RFT 发挥作用,您必须:
所以你不能将 Jenkins/Hudson 作为服务运行,这使得它不是很有用。您必须从您登录的帐户运行它。如果您使用的是公司计算机(如果您使用的是 RFT,则很可能),您可能必须使用 hack 来阻止屏幕保护程序启动。如果屏幕被锁定,您的测试将始终失败。
将测试配置为 从命令行运行,您只需处理测试失败和成功时的返回代码。
Jenkins/Hudson 还会为您提供一些优势,例如将测试与版本控制集成,可能会在提交时自动运行测试。当测试失败时,它还有助于发送电子邮件。
但您仍然需要将 RFT 日志与某种 JUnit 插件集成才能获得一份不错的报告。您还必须有脚本来使用命令行运行测试。
我认为不值得将持续集成服务器与 RFT 结合使用。最好让您的测试每天在 Windows 任务计划程序中运行。这是一个更简单的解决方案,故障点更少。
或者使用我的最终解决方案:退出 RFT 并使用免费的 Selenium 和无头网络驱动程序。
I believe the best answer is that integrating RFT with Hudson/Jenkins is a useless endeavor.
As this IBM FAQ says, to make RFT work you must:
So you can't run Jenkins/Hudson as a service, making it not very useful. You must run it from your logged account. If you are in a corporate computer (very probable if you are using RFT), you probably must use a hack to prevent the screen saver to start. If the screen is locked, your tests will always fails.
It isn't very difficult to configure your tests to run from the command line, you just have to take care of the return codes when the tests fail and succeed.
Jenkins/Hudson would also give you some advantages, like integrating the tests with your version control, probably automatically running the tests when a commit is made. It would also help sending emails when the tests fail.
But you still would have to integrate the RFT logs with some kind of JUnit plugin to have a nice report. You also would have to have script to run the tests using the command line.
I think it is not worth the trouble to use an continuous integration server with RFT. Better just have your tests running every day in Windows Task Scheduler. It is a simpler solution with less failure points.
Or use my final solution: quit RFT and use the free Selenium with a headless web driver.
我对此有一些一般性建议,因为我自己还没有实现这一点。
我假设您希望 Hudson 通过构建或 Hudson 进程自动为您运行 RFT 脚本?
我也想在我的组织中实施类似的事情。
由于组织限制,我尚未能够实现此目的,但这是我到目前为止所想到/所做的:
I have some general advice on this because I have not yet implemented this myself.
I am assuming you want to have Hudson run the RFT scripts automatically for you via a build or Hudson process?
I want to implement something similar in my organisation as well.
I have not yet been able to implement this because of organisational constraints but here is what I have thought out/done so far: