Tuesday, 8 March 2011

Exercise 9 - Hudson and Continuous Integration

Aim:
Run your first Selenium Script using Hudson

Difficulty level: Hard


What you will learn?
  • Continuous Integration 
  • Installation of Hudson ( Jenkins)
  • Installation of the Selenium plugin
  • Running a Selenium Suite using Hudson
Tips:
  • use the Video below to pick up what needs to be done and achieved
  • use an existing test suite
  • The PC has hudson installed, selenium plugin and selenium RC server but check that they are working ok
The pre-requisite for this exercise:
  • To use a previously created test script
  • selenium RC jar is available
  • Hudson is installed
  • the selenium plugin is already installed


Exercise Steps:

  1. Launch the Hudson via a command execution into the CMD terminal
  2. Open the URL: http://localhost:8080/ for launching the Hudson's dashboard into any of the browser
  3. Move at Manage Plugins page, and install the available plugins for Seleniumhq and Selenium
  4. Once installations are done, we can validate them on the Manage Plugins page under the installed tab
  5. Need to configure the Selenium RC server, just to acheive it move at Manage Hudson page then go with the "Configure System" link
  6. Create a new job
  7. Provide the setup to link to the test script to execute
  8. Run the job
  9. Notice the job ran successfully - the build shows Green.
  10. See the build output file.

Conclusions

  • Introduction to Hudson/Jenkins


Related Entries

http://time2testcourse.blogspot.com/2011/05/what-is-hudson-workspace.html
http://time2testcourse.blogspot.com/2011/05/how-to-run-hudson-via-command-line.html
http://time2testcourse.blogspot.com/2011/05/example-save-selenium-screenshots-as.html
http://time2testcourse.blogspot.com/2011/05/how-to-start-hudson-via-java-web-start.html
http://time2testcourse.blogspot.com/2011/04/how-to-install-selenium-plugin-on.html
http://time2testcourse.blogspot.com/2011/05/example-continuous-integration-at-work.html


Solution:
Solution in document file is in progress, but solution is done in embedded video file.

Helpful Video


13 comments:

  1. notes
    this exercise should only be about installing hudson and running selenium. needs redoing.

    ReplyDelete
  2. Hi Viresh, I have updated the solution and have added helpful video as well, can you please review this I think this solution contains end to end about Hudson using a detailed example.
    But still suggest me if i need to change the solution..

    ReplyDelete
  3. Hi. not sure why you need to install xampp and use eclipe for this exercise? please explain.

    ReplyDelete
  4. Notes: the exercise is all about the points as explained in the top of the blog entry therefore I dont think you need XAMPP. Tell me what your thougts are?

    ReplyDelete
  5. Reply: Viresh, to make this exercise completely separate, I have first shown how to setup wordpress install as we are executing wordpress scripts as an example for Hudson, please suggest if I need to XAMPP/Wordpress parts?

    ReplyDelete
  6. Notes: the main focus of this exercise is to Run your first selenium script using Hudson via continuous integration. The xampp install is more related to the environment. So, remove the xampp part out.
    The pre-requisite for this exercise:
    0. The test virtual machine ( which already has xampp installed)
    1. to use a previously created test script
    2. selenium RC jar is available
    3. Hudson is installed
    4. the selenium plugin is already installed
    5. the

    The steps of the exercise:
    1. open hudson
    1.1 show that selenium plugin is installed
    1.2 show that the selenium jar is configured in hudson
    2. create a new job
    3. provide the setup to link to the test script to execute
    4. run the job
    5. notice the job ran successfully - the build shows Green.
    6. notice the build output file

    ReplyDelete
  7. Ok, I will update the exercise accordingly.

    ReplyDelete
  8. Solution in document file is still in progress, but solution is done in embedded video file.

    ReplyDelete
  9. note for viresh:
    create links to the "how to" section for how to install hudson and how to install the selenium plugin.

    ReplyDelete
  10. I have downloaded hudson-2.2.1.war and started it using the command in the video, but I don't have the scripts referred to in the video. What do I do next?

    ReplyDelete
  11. Hi. For the moment, let's arrange a teamviewer/skype session where i can demonstrate this example to you.
    Hudson has changed lots since this example was created. I am going to create a new video to demo this quickly and easily. Incidentally, please download jenkins.war from http://jenkins-ci.org/ website ( latest version is 1.489)

    ReplyDelete
  12. would you be able to do this on Wednesday?

    ReplyDelete
  13. wednesday is good. please email me on vireshdoshi@time2test.co.uk to arrange a time.

    ReplyDelete

Thank you for your comment
- Time2test Team