Working with Jenkins Plugins
Last Updated :
28 Mar, 2025
Jenkins plugins are essential for enhancing the functionality of the Jenkins CI/CD tool, allowing seamless integration with various tools, frameworks, and systems. This guide delves into the significance of plugins in Jenkins, their role in automation testing, and how to use popular plugins to streamline processes.
What are Jenkins Plugins?
Jenkins plugins extend the core capabilities of Jenkins, enabling integration with additional tools and technologies. They allow developers and testers to customize Jenkins based on specific project requirements.
- Purpose: To simplify automation processes, enhance test reporting, and improve integration with tools like Maven, Cucumber, and TestNG.
- Source: Plugins are either developed by the Jenkins community or the Jenkins team.
Why are Jenkins Plugins Important?
Plugins significantly improve the efficiency of Jenkins workflows:
Jenkins workflows of plugins1. Test Execution Integration
- Integrates with tools like Selenium, Cucumber, TestNG, and JUnit.
- Automatically generates and publishes test reports.
2. Reporting
- Provides detailed insights into test results with plugins like Allure and HTML Publisher.
- Visualizes build trends, pass/fail ratios, and test execution details.
3. CI/CD Integration
- Accelerates feedback loops.
- Identifies defects early by integrating tools like Git and Maven.
4. Notification and Collaboration
- Sends automated alerts using email or communication tools like Slack and Microsoft Teams.
- Accessing Plugins in Jenkins
How to Install and Manage Jenkins Plugins
To install or manage plugins in Jenkins, follow these steps:
1. Open Jenkins Dashboard
2. Go to Manage Jenkins → Plugin Manager
3. Click on Available Plugins to search and install new ones
4. Check Installed Plugins to see what’s already there
5. Go to Updates and update outdated plugins
6. Restart Jenkins to apply changes
Keeping your plugins updated ensures that you get better security, improved performance, and new features.
For complete installation refer - Jenkins Plugin
Key Plugins for Test Automation
The following are the key plugins used for Test Automation:
Key Plugins for Test Automation1. JUnit Plugin
- Publishes test results from JUnit or other xUnit test frameworks.
- Displays test reports in the Jenkins UI and tracks test pass/fail history across builds.
2. TestNG Results Plugin
- Publishes and displays results for TestNG-based tests.
- Includes detailed reports on passed, failed, and skipped tests.
3. Maven Integration Plugin
- Automates building and testing for Maven projects.
- Manages the build lifecycle, dependencies, and report generation.
4. HTML Publisher Plugin
- Allows Jenkins to publish and display custom HTML reports, such as those generated by frameworks like Selenium or JUnit.
- Useful for visualizing test automation results.
5. Allure Report Plugin
- Integrates with Allure to generate detailed and visually appealing reports for various test frameworks, including JUnit, TestNG, and Selenium.
- Provides insights into test execution, including duration, environment, and failure analysis.
Manage Jenkins Plugins
- Navigate to Manage Jenkins > Plugins.
Manage Jenkins > Plugins.Installed Plugins
- Lists pre-installed plugins (e.g., Git, JUnit).
Available Plugins
- Search for and install additional plugins.
Updates
- Check for updates to keep plugins up-to-date.
- Popular Jenkins Plugins for Automation Testing
Plugin Purpose
- JUnit Plugin Parses test results from JUnit and displays pass/fail statistics in Jenkins.
- TestNG Plugin Integrates TestNG results with Jenkins, showing method-level execution statistics.
- Maven Integration Simplifies the creation of Maven-based Jenkins jobs.
- HTML Publisher Publishes HTML reports generated by automation frameworks.
- Allure Reports Generates visually appealing and detailed test execution reports.
- Cucumber Reports Publishes JSON-based Cucumber reports in an easy-to-read HTML format.
- Git Plugin Integrates Jenkins with Git repositories.
- Email Extension Sends email notifications based on test results or build statuses.
How to Use Jenkins Plugins (Step-by-Step Guides)
Publishing Cucumber Reports
Objective: Generate a readable report from Cucumber's JSON output.
Install the Cucumber Reports Plugin
- Install Cucumber Reports Plugin:
- Navigate to Available Plugins and search for "Cucumber Reports."
Available Plugins and search for "Cucumber Reports."Configure Jenkins Job
- Firstly check the cucumber project run locally as expected
cucumber project run locally- Add a build step to execute your Cucumber project.
build step to execute your Cucumber project.- Copy the project from existing project which you are already created:
Copy the project from existing project- Updates the goal as per our requirement:
Updates the goal as per our requiremen- Ensure the test runner generates a cucumber.json file.
Post-Build Actions
Select Cucumber Reports- After that save the project and build the project.
Run the Job
- View the generated report in the Jenkins dashboard.
Output
- A detailed HTML report showing:
- Passed, failed, and skipped steps.
generated report in the Jenkins dashboard- Execution time for each step.
- Overall test summary.
Integrating jenkins with TestNG
Objective: Visualize TestNG execution results in Jenkins.
Steps
- Install TestNG Results Plugin:
- Search for "TestNG Results" in Available Plugins and install it.
TestNG Results pluginConfigure Job
- Execute TestNG tests and ensure the results are saved in XML format in locally first
Configure Job- Create a new project in jenkins.
create a new testng job in jenkins- Use the same as last we used copy the project using the last project configuration which we used.
copy the project using the last projectUse this Repository URL for the Project: Repository
- Update the Repository URL in the Jenkins project configuration
Update the Repository URL- The goals and options of the project is like these:
The goalsPost-Build Action
- Select Publish TestNG Results.
Select Publish TestNG Results- Provide the path to the TestNG results file.
Run Job
- View method-level statistics and overall execution details.
Output:
Run Job- Execution trends and test statuses displayed in Jenkins.
- Here are the testNG results :
testNG results3. Publishing HTML Reports
Objective: Display custom HTML reports generated by automation frameworks.
Steps
- Install HTML Publisher Plugin:
- Search for "HTML Publisher" and install the plugin.
Configure Job
Create a new job- Copy the same project which we last used:
Copy the same projectWe used all configuration of the last project only we change the report template with the HTML publisher:
- Select Publish HTML Reports.
- Provide the directory and file path.
report template with the HTML publisher- Ensure your automation framework generates an HTML report.
- Specify the report directory and file name (e.g., target/surefire-reports/index.html).
Specify the report directory and file name Run Job
- Access the HTML report from the Jenkins dashboard.
Output
Access the HTML report- Fully formatted HTML reports, accessible via Jenkins.
Conclusion
Plugins are the backbone of Jenkins, enabling it to adapt to diverse project needs. By leveraging plugins for reporting, automation, and integration, teams can streamline their CI/CD workflows and enhance efficiency. Whether it’s generating detailed test reports or automating notifications, plugins make Jenkins a powerful tool for developers and testers.
Similar Reads
Jenkins Plugins Jenkins is an open-source automation server that facilitates the automation of several stages of the software development lifecycle, including application development, testing, and deployment. Operating within servlet containers like Apache Tomcat, the technology is server-based. Continuous delivery
5 min read
Jenkins Tutorial Whether you're a developer, DevOps engineer, or IT professional, mastering Jenkins can revolutionize how you build, test, and deploy applications. In this Jenkins tutorial, we'll start from the basics, explaining what Jenkins is and how it works. We'll guide you through setting up Jenkins, creating
10 min read
Docker | Jenkins plugin Combining Jenkins with Docker in CI/CD is a powerful duo. Jenkins, an open-source automation server, is used in the application development process to facilitate the implementation of CI/CD processes. Docker is a platform for developers to bundle their applications into containers, which are used to
4 min read
What Is JaCoCo Plugin In Jenkins? The name JaCoCo stands for Java code coverage it will help the developers measure, while testing the code, how much code was executed during the testing of the code. The code that is measured using jaCoCo Plugin is known as code coverage The higher code coverage indicates that a greater portion of y
5 min read
Using Ansible in Jenkins Pipelines In the fast-paced software development scene, DevOps practices have become significant for associations expecting to convey excellent software quickly and dependably. DevOps underscores collaborations, automation, and continuous integration and delivery (CI/CD) to smooth out the software development
6 min read