views:

577

answers:

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.

+2  A: 

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
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
@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
Thanks alot. I will try that!
Alex
+2  A: 

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
Tom E
A: 

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