Thursday, January 27, 2011

Continuous Integration with Hudson-Selenium

Continuous Integration with Hudson:

Hudson monitors executions of repeated jobs, such as building a software project or jobs run by cron.

Install and Launch Hudson:

User can install and launch Hudson only with follow of below steps:

a. Download Hudson.war file from following location

Go through the URL http://hudson-ci.org/download/war/ and download the latest war file just only clicking on 1.375 links.

b. Save the downloaded file into any specific location

c. Execute the .war file

d. Wait till all the initialization process is completed.

e. Open any browser and open http://systemname:8081/, user would see following screen:

f. If using selenium grid so we need Selenium Grid plugin to install now.

Click Manage Hudson link from Hudson dashboard

Click Manage Plugins link

Click Available tab.

Select Selenium Grid option which you would see on the page, after selection click Install button which exists at the bottom of the page.

After installation you need to Restart the Hudson.war execution to make the installation effective

User can do this if he uses Ctrl+c command on the terminal from where we did launch Hudson

After shutting Down the Hudson user needs to restart the Hudson with the help of same command java –jar Hudson.war --httpPort=8081

Refresh the url http://systemname:8081 into your browser

Now user would see Selenium Grid link on the dashboard, see the below screens as reference:

You can verify Selenium Grid plugin installation if you open url http://localhost:4444/console into the browser window.

Launch some instances of selenium grid on different-2 ports as I mentioned into the above document.


g. Creating a JOB:

. Click on New Job link

. Enter a Job name into the Job Name field

. Select Build a free-style software project radio option

. Click Ok

. Now our motive is to execute Ant targets, follow the below pasted Screen1:

. When user would choose Invoke Ant option then need to enter inputs according to same, follow the below pasted Screen2:

. Save the Job form

. After saving the form you would see screen something like I have pasted into the screen3, to see the same screen you need to come back on Dashboard using Back to Dashboard link.

. Click on the Job name link, then you would see screen something like as below pasted Screen4

. If you want that your script will execute at a defined scheduled time on daily basis, then see the inputs as I have given into the below pasted Screen5.

Hope this helps in understanding and implementation of Hudson with your automation framework. Please feel free to discuss if any queries.

Thanks,

Rohit Singh


1 comments: