In the two previous tutorials in the Selenium series, we discussed the two most important build tools – ANT and Maven. We talked about their significance and practical importance.
In our previous tutorial in the DevOps series, we learned about Integration of Jenkins with Selenium.
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 tutorial from our Selenium online training series, we will discuss a continuous integration tool known as Hudson.
Read Through => Exemplary Guide on DevOps
Note: This tutorial is a part of Selenium as well as DevOps tutorial series. Click the appropriate links to navigate to the concerned series.
We will study the importance of Hudson and the benefits we get from any continuous integration tool. We will explore Hudson from its installation to its advanced settings.
What You Will 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
In many projects, developers and testers work on different modules, creating executables that are integrated at regular intervals. This process is known as Continuous Integration (CI). CI helps identify and address defects or errors as soon as possible in the development lifecycle.
Continuous Integration systems, like Hudson, build and test applications as soon as fresh or changed code is committed to the Source Control Management (SCM) system.
Hudson – Continuous Integration Tool
Hudson is a widely known Java-based open source Continuous Integration tool. It allows teams to trigger builds and tests with every change in the SCM.
Hudson supports various SCM tools, such as CVS, Subversion (SVN), Git, and more. It can build ANT-based and Maven-based projects, execute shell scripts and Windows batch commands, and send reports and notifications via Email, SMS, Skype, etc.
Hudson Installation
Pre-requisites:
- Source Code Repository (SVN/Git/CVS, etc.)
- Build Script (Ant/Maven, etc.)
Installation:
Hudson can be easily installed on both Linux and Windows machines. It is distributed as a package specific to the OS type for different Linux flavors. Hudson can be run as a standalone application or within a Servlet Container. In this tutorial, we will explain the Hudson installation on a Windows machine using a WAR file.
Follow these steps:
- Download the Hudson WAR file from Hudson’s official website – “http://hudson-ci.org/”.
- Save the WAR file in the desired location.
- Open a command prompt and go to the folder where the Hudson war file is saved.
- Type “java -jar hudson-3.0.1.war –httpPort=8099” to start the initial setup on the Hudson Dashboard.
- Access the Hudson window by opening your browser and launching Hudson using “http://localhost:8099/”.
- Select the desired plugins and click on the Finish button to complete the installation.
Hudson Configuration
After setting up the Hudson Dashboard, you need to configure Hudson. Follow these steps:
- Click on the “Manage Hudson” link in the left menu.
- Click on the “Configure System” link.
- Configure the necessary settings in each section, such as JDK, Ant, and other connection parameters.
- Save the changes.
Configuring Email Notification
In the Email Notification section, configure the necessary fields, such as SMTP server, email addresses, Hudson URL, SMTP authentication, etc. Make sure to set up the SMTP server and provide valid email addresses for notifications.
Creating the Hudson Project
To create a new Hudson Project, click on the “New Job” option in the left menu. Choose the desired project style, such as a free-style or multi-configuration job, and provide a name for the job. Click OK to create the project.
Configuring Hudson Project
Once the project is created, you can configure its settings. Modify the general job settings, advanced options, source code management settings, build triggers, build steps, and post-build actions as per your requirements.
Configuring Source Code Management
If your project uses a Source Code Management (SCM) system, configure the SCM settings by selecting the SCM option and providing the necessary information, such as the repository URL. In this tutorial, we configure Subversion (SVN) as the SCM.
Selecting Build Triggers
Choose the build triggers that initiate the build execution. You can set triggers for other jobs, periodic builds, SCM polling, and more. Configure the required additional information for each trigger type.
Invoking Build Steps
Add build steps to define the build process. For example, if you’re using ANT, you can configure the build step by invoking the ANT build.xml file.
Configuring Post-build Actions
Configure post-build actions that are triggered after the build execution. Specify actions like aggregating downstream test results, publishing JUnit test result reports, archiving artifacts, and sending email notifications.
Conclusion
In this tutorial, you learned about Continuous Integration and the role of tools like Hudson in the software development lifecycle. You also explored the installation and configuration process of Hudson. By configuring various settings, build triggers, build steps, and post-build actions, you can customize and automate your project’s build process using Hudson.
Next Tutorial #26: In the next tutorial, we will dive into advanced Selenium concepts that optimize the automation framework and provide more visibility to the users. We will explore features like logging, debugging, and more.