Skip to main content

Integration of your test suite with Hudson using Apache Ant

The quick, dirty and painless guide to integrate your test automation suite with Hudson.

Prerequisites

1. It is assumed that you already have test automation suite that produces test results in JUnit XML format.
For example this can be a bundle of Selenium RC and JUnit. Or Watir and Cucumber with JUnit-style reporter.
2. You need to create Ant project build.xml script that executes your test suite.
Materials: http://varun-qa.blogspot.com/2010/03/ant-script-for-generating-junit-report.html
Example (execution of Watir/Cucumber test suite on Windows): 3. It is assumed that your test automation suite is stored to Subversion or CVS server.
4. Download hudson.war from here: http://hudson-ci.org/latest/hudson.war

Steps

1. Go to the directory with downloaded hudson.war and run the following command: java -jar hudson.war
2. Open your browser and go to: http://localhost:8080/
3. Click "New Job" link on the left panel of Hudson dashboard
4. Enter job name (this can be anything using Latin symbols and not using any special characters)
5. Select "Build a free-style software project" option
6. Press OK button
7. Set the location of your test suite in "Repository URL" field of Subversion section
8. Set SVN credentials if needed
9. Set "." value in "Local module directory (optional)" field of Subversion section
10. Set "Build periodically" checkbox
11. Set "@midnight" value in "Schedule" field
12. Select Add build step -> Invoke Ant
13. Select the Ant target that runs your tests
14. Set checkbox in "Publish JUnit test result report" field
15. Set "out/reports/*.xml" value in "Test report XMLs" field
16. Set "Archive the artifacts" checkbox
17. Set "out/" value in "Files to archive" field
18. Press Save button
19. Press "Build Now" link on the left panel of Hudson dashboard

That's it! You have test results at Hudson dashboard, you have automatic updates of your test suite from SVN/CVS, you have scheduler, you have history from all previous test executions, sorted by date.

Popular posts from this blog

Switching between keyboard layouts in Openbox (Arch Linux)

Switching between two (or more) keyboard layouts in Openbox DE is a task that's quite easy to accomplish, although it might not be so obvious as in other desktop environments. This solution was tested on Arch Linux. You just need to edit this file (assuming you want to switch between English and Ukrainian Phonetic layouts with Alt-Shift): /etc/X11/xorg.conf.d/01-keyboard-layout.conf Section "InputClass" Identifier "keyboard-layout" Driver "evdev" MatchIsKeyboard "yes" Option "XkbLayout" "us,ua(phonetic)" Option "XkbModel" "pc105" Option "XkbOptions" "grp:alt_shift_toggle" EndSection If you have Nvidia card, don't forget to edit /etc/X11/xorg.conf.d/20-nvidia.conf and change Driver from "kbd" to "evdev" in InputDevice section: Section "InputDevice" Identifier "Keyboard0" Driver "evdev" EndSection Y...

How to control CPU frequency on Linux Fedora 20

Sometimes you need to make CPU run faster or slower, depending on your needs. In Linux you can control this by using different CPU governors. The following steps were tested on Fedora 20, but most likely they would also work on later versions of Linux Fedora OS. sudo yum install kernel-tools Check the available CPU governors: sudo cpupower frequency-info --governors sudo cpupower frequency-set --governor [governor] More information about the governors here: http://docs.fedoraproject.org/en-US/Fedora/20/html/Power_Management_Guide/cpufreq_governors.html

How to run Jekyll server on Cloud9

So you already have your Cloud9 account and your Jekyll site is in your workspace. Now you want to run the server. It is actually very simple. In a fresh Could9 workspace you only need to execute the following two commands in the terminal window: gem install jekyll jekyll serve --host 0.0.0.0 --port 8080 After executing these two commands you can open your site in the browser using the following link: https://[workspacename]-c9-[username].c9.io Important note: Only port 8080 works for me in Cloud9, other ports are closed. Also assigning host to 0.0.0.0 is necessary.