During the last two tutorials in our Selenium series, ANT and Maven, the two paramount build software, were outlined. We discussed their relevance and practical application.
In the previous chapter of our DevOps series, we learned about Jenkins and Selenium Integration.
Recommended IPTV Service Providers
- IPTVGREAT – Rating 4.8/5 ( 600+ Reviews )
- IPTVRESALE – Rating 5/5 ( 200+ Reviews )
- IPTVGANG – Rating 4.7/5 ( 1200+ Reviews )
- IPTVUNLOCK – Rating 5/5 ( 65 Reviews )
- IPTVFOLLOW -Rating 5/5 ( 48 Reviews )
- IPTVTOPS – Rating 5/5 ( 43 Reviews )
In this episode of our Selenium online training series, the topic of interest is a continuous integration tool known as Hudson.
Dive In => A Comprehensive Guide to DevOps
Important: This tutorial belongs to both the Selenium and DevOps tutorial series. Use the relevant links to navigate to the desired series.
We’ll delve into the relevance of Hudson and the advantages continuous integration tools can offer. We’ll journey from Hudson’s installation to its advanced configurations.
What You’ll Learn:
- Continuous Integration
- Hudson – Continuous Integration Tool
- Hudson Installation
- Hudson Configuration
- Configuring Email Notification
- Creating the Hudson Project
- Configuring Hudson Project
- Configuring Source Code Management
- Selecting Build Triggers
- Invoking Build Steps
- Configuring Post-build Actions
- Conclusion
Continuous Integration
Often in many projects, coders and testers operate on separate modules, creating executables that are integrated periodically. This procedure is identified as Continuous Integration (CI). CI aids in recognizing and resolving defects or issues at an early stage in the development lifecycle.
Continuous Integration systems, such as Hudson, build and test software as new or modified code is committed to the Source Control Management (SCM) system.
Hudson – Continuous Integration Tool
Hudson is a popular Java-based open-source Continuous Integration tool. It enables tea to initiate builds and tests with every change committed to the SCM.
Hudson supports various SCM tools like CVS, Subversion (SVN), Git, among others. It has the capability to build ANT-based and Maven-based projects, execute shell scripts and Windows batch commands, and deliver reports and notifications via Email, SMS, Skype, etc.
Hudson Installation
Prerequisites:
- Source Code Repository (SVN/Git/CVS, etc.)
- Build Script (Ant/Maven, etc.)
Installation Procedure:
Easy to install on both Linux and Windows platforms, Hudson comes as a package specific to the platform type for various Linux distributions. It can be operated as a standalone application or within a Servlet Container. This tutorial discusses Hudson installation on a Windows machine using a WAR file.
You simply need to:
- Download the Hudson WAR file from the official site – “http://hudson-ci.org/”.
- Store the WAR file in your desired path.
- Go to command prompt and navigate to the folder where Hudson war file is stored.
- Type “java -jar hudson-3.0.1.war –httpPort=8099” to initiate the primary setup on the Hudson Dashboard.
- To access the Hudson window, launch Hudson using “http://localhost:8099/” on your browser.
- Choose the required plugins and click the Finish button to wrap up the installation.
Hudson Configuration
Once the Hudson Dashboard is ready, it’s time to configure Hudson. Follow these steps:
- Select the “Manage Hudson” link in the left menu.
- Click on the “Configure System” link.
- In each panel, configure the appropriate parameters such as JDK, Ant, and other connection parameters.
- Preserve changes.
Configuring Email Notification
Configure necessary fields such as SMTP server, email addresses, Hudson URL, SMTP authentication, etc. in the Email Notification panel. Remember to set up the SMTP server and provide valid email addresses for notifications.
Creating the Hudson Project
To initiate a new Hudson Project, click on the “New Job” in the left menu. Decide your preferred project style, be it free-style or multi-configuration job, and name the job. Click OK to create the project.
Configuring Hudson Project
After the project is set, its settings can be modified. Customize general job settings, advanced options, source code management settings, build triggers, build steps, and the actions to be performed post-build according to your requirements.
Configuring Source Code Management
If your project requires a Source Code Management (SCM) system, configure the SCM settings by choosing the SCM option and filling in the necessary details, for example, the repository URL. In this guide, we configure Subversion (SVN) as the SCM.
Selecting Build Triggers
Choose the build triggers that prompt the build execution process. Options like other jobs, periodic builds, SCM polling, and more can be set. Configure the essential additional data for each trigger type.
Invoking Build Steps
Define the build process by adding build steps. If using ANT, you can configure the build step by calling the ANT build.xml file.
Configuring Post-build Actions
Decide the post-build actions that are triggered once the build is executed. Actions such as aggregating downstream test results, publishing JUnit test result reports, archiving artifacts, and sending email notifications can be specified.
Conclusion
In this guide, we covered Continuous Integration and the role of tools like Hudson in the software development lifecycle. We have also explored Hudson’s installation and configuration process. By customizing various settings, build triggers, build steps, and post-build actions, you can personalize and automate your project’s build process using Hudson.
Next Tutorial #26: In the following tutorial, we will delve deeper into advanced Selenium concepts that improve the automation framework and provide better visibility to users. We will examine features like logging, debugging, and more.