3

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.

neves
  • 33,186
  • 27
  • 159
  • 192
Alex
  • 105
  • 1
  • 6

4 Answers4

6

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

Community
  • 1
  • 1
Tom E
  • 2,519
  • 2
  • 17
  • 22
3

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.

Clinton
  • 3,638
  • 3
  • 26
  • 33
  • We use ANT. Do you mean that I should run command line commands from ANT or add another build step in Hudson job configuration? Running it from ANT makes more sense I guess but I've seen that you can add batch command build steps. – Alex Dec 16 '09 at 16:15
  • @Alex Yes, I think you should try to add your own custom build steps to ant. In particular I think the exec task in ant should be enough to enable you to invoke your other tools from the command line. Then in Hudson you configure the ant builder to invoke your new task(s). – Clinton Dec 16 '09 at 22:20
1

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.

neves
  • 33,186
  • 27
  • 159
  • 192
  • Quick observation, if you're testing web based applications in a browser the above listed restrictions do not exist - they are for Desktop apps like automating Outlook, etc. For Web applications RFT supports a WebUI mode which can run under lockscreens etc and ships with a Jenkins plugin which would be pertinent to this question. – MrChris Sep 18 '20 at 15:37
  • @MrChris nice to know. Thanks God my company deleted RFT and this isn't a problem for us anymore. Interface testing has important uses, and a lot of better and cheaper tools than RFT for web technologies. – neves Sep 18 '20 at 23:58
0

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.
sjt
  • 1,607
  • 11
  • 14