配置 Rational Function Tester (RFT) 以在 Hudson/Jenkins 中运行

发布于 2024-08-14 22:50:15 字数 298 浏览 12 评论 0原文

我刚刚安装了 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

黎歌 2024-08-21 22:50:16

Rational Function Tester 的命令行参考:

http://publib.boulder.ibm.com/infocenter/rfthelp/v8r0m0/index.jsp?topic=/com.ibm.rational.test.ft.doc /topics/RobotJCommandLine.html

运行测试的示例命令:

java -classpath "C:\IBM\RFT\FunctionalTester\bin\rational_ft.jar" 
com.rational.test.ft.rational_ft -datastore \\My_project\AUser\RobotJProjects -user admin -project
\\My_project\AUser\TestManagerProjects\Test.rsp -build "Build 1" -logfolder "Default" -log  
"Al_SimpleClassicsA#1" -rt.log_format "TestManager" -rt.bring_up_logviewer true -playback 
basetests.SimpleClassicsA_01

附加说明,您需要在将运行测试的代理计算机上正确配置窗口。这不是针对 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:

java -classpath "C:\IBM\RFT\FunctionalTester\bin\rational_ft.jar" 
com.rational.test.ft.rational_ft -datastore \\My_project\AUser\RobotJProjects -user admin -project
\\My_project\AUser\TestManagerProjects\Test.rsp -build "Build 1" -logfolder "Default" -log  
"Al_SimpleClassicsA#1" -rt.log_format "TestManager" -rt.bring_up_logviewer true -playback 
basetests.SimpleClassicsA_01

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

三生殊途 2024-08-21 22:50:16

我们在 Hudson 上运行了一个相当复杂的分布式构建,它的过程基本上如下:

  1. 在 Windows 上测试。
  2. 在 OSX 上进行测试,运行代码覆盖率和将结果推送到服务器。
  3. 在 OSX Tiger 上进行测试。
  4. OSX Leopard 和 OSX Leopard 的软件包将构建推送到服务器。
  5. 适用于 Windows 和 Windows 的软件包将构建推送到服务器。
  6. 更新产品网站。

我们不使用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:

  1. Test on Windows.
  2. Test on OSX, run code coverage & push results to server.
  3. Test on OSX Tiger.
  4. Package for OSX Leopard & push build to server.
  5. Package for Windows & push build to server.
  6. Update product website.

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.

与君绝 2024-08-21 22:50:16

我相信最好的答案是,将 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:

  • be logged in the machine;
  • the screen can't be locked;
  • if you are remotely connected, you can't minimize the connection screen.

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.

云胡 2024-08-21 22:50:16

我对此有一些一般性建议,因为我自己还没有实现这一点。
我假设您希望 Hudson 通过构建或 Hudson 进程自动为您运行 RFT 脚本?
我也想在我的组织中实施类似的事情。

由于组织限制,我尚未能够实现此目的,但这是我到目前为止所想到/所做的:

  1. 下载 Windows 进程查看器,获取运行测试的命令。
  2. 用它制作 shell 脚本,分离出变量等。
  3. 未来的计划是设置一台 Windows 从机,其中包含测试开始后所需的所有工具,例如。正确的浏览器版本、环境变量以及所需的其他工具。
  4. Hudson 将启动一个进程,该进程运行创建的 shell 脚本,该脚本运行所有 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:

  1. Downloaded Windows process viewer, got the command for running the tests.
  2. Made shell Script out of it, separated out the variables etc
  3. The future plan is to setup a Windows Slave machine which would have all the tools in it that would be required once the Tests are kicked off, for eg. the correct versions of browsers, and environment variables, and other tools that are required.
  4. Hudson would kick off a process which runs the shell scripts created which runs all the RFT Scripts and performs necessary operations on the slave machine.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文