Monday, 16 May 2011

Example - Continuous Integration without ant

Aim
Selenium Example using Hudson without ant. This example will demonstrate the usage of Hudson with Selenium against scripts that you have recorded using the IDE only. The other howto entry demonstrates the usage of Hudson with a compiled script created with Java.

Difficulty Level
Medium

Pre-requisites:
  • Hudson war file
  • Java Runtime Environment JRE
Key Steps

  1. Open the command prompt.
  2. Launch the Hudson via command :java -jar hudson.war
  3. Launch the Browser.
  4. Enter the URL http://localhost:8080/
  5. Create a New Job.
  6. Enter the Job Name.
  7. Select a 'Build a free-style s/w Project' from radiobutton.
  8. Click on 'OK' button.
  9. Select a Build 'SeleniumHQ htmlSuite Run' from 'Add build step' drop downlist.
  10. Fillup all the mandatory field(browser,startURL,resultFile,suiteFile).
  11. Select 'Archive the artifacts' from checkbox.
  12. Enter the value into 'Files to archive' textfield.
  13. Select 'Publish Selenium Report' from checkbox.
  14. Enter the value into 'Test report HTMLs' textfield.
  15. Click on 'Save' button.
  16. Now for build click on 'Build Now' link.
  17. See Job is Runing.
  18. Click on 'Status' link.
  19. Report link is displayed


Conclusions

  • Demonstrates hudson jobs
  • integration between Hudon and Selenium RC
  • Selenium Reports accessible via Hudson
Related Entries
Continuous Integration with Ant



Solution Video File



Video File Steps
1. start Jenkins
2. java -jar jenkins.war
3. goto http://localhost:8080 in a browser
4. Create a new Job
5. Enter a job Name
6. select radio button "build a free-style software project"
7. hit OK
8. Add Build Step ->SeleniumHQ htmlSuite Run
9. Enter Selenium Parameters:
browser: *firefox
path to suiteFile:
resultFile
Other parameters
10. enter Post Build Actions
Files to Archive: wordpress*
11. tick the "publish Selenium Report" : wordpressResult.html
12. click on SAVE
13. click on Build Now
14. notice the selenium script execution
15. click on teh build history and notice the results file pulled into the Jenkins build CI Tool

3 comments:

  1. The VM java runtime evnironment needs to be updated to version 6 ( 1.6) for the selenium plugin to work.

    ReplyDelete
  2. Yes, you are right, I have already VM having JRE version 6 ( 1.6) for the selenium plugin to work, please suggest for the next step.

    ReplyDelete

Thank you for your comment
- Time2test Team