www.lambdatest.com Open in urlscan Pro
104.18.4.65  Public Scan

URL: https://www.lambdatest.com/blog/what-is-jenkins/
Submission: On January 24 via manual from BE — Scanned from DE

Form analysis 2 forms found in the DOM

<form style="display:none;position:relative;width:360px;margin-left:25px;" id="testing_form"><input type="email" name="email" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+.[a-z]{2,}$" placeholder="Your email address"
    style="border:1px solid #CDCFDA;width:100%;text-align:center;height:38px;font-weight:normal;font-size:13px;border-radius:5px;" value=""><button type="submit"
    style="position:absolute;right:3px;background:#1266E5;height:31px;font-size:20px;color:#fff;width:28px;top:3px;line-height:0px;border-radius:5px;padding:0px; border:none">→</button></form>

POST

<form class="form" id="whitepaper" method="POST">
  <div class="form-group animated fadeInRightShort  ">
    <input type="email" id="NewsletterEmail" name="email" placeholder="Enter your email" class="input-lg form-control" required="">
  </div>
  <button type="submit" class="btn whitepaper-btn" name="subscribe">GET WHITEPAPER</button>
</form>

Text Content

We love to hear your feedback: Review us and get $10 gift card - Write a Review
>>

X
Platform


 * ONLINE BROWSER TESTING
   
   Manual live-interactive cross browser testing


 * SELENIUM TESTING
   
   Run Selenium scripts on cloud-based infrastructure


 * CYPRESS TESTING
   
   Run Cypress scripts on cloud-based infrastructure


 * PLAYWRIGHT TESTING
   
   Run Playwright scripts on cloud-based infrastructure


 * HYPEREXECUTE
   
   Blazing fast next-gen Automation Testing Cloud


 * ON-PREMISE SELENIUM GRID
   
   Our cloud infrastructure paired with security of your firewall


 * NATIVE APP TESTING
   
   Live-interactive app testing on Android and iOS devices


 * REAL DEVICES CLOUD
   
   Test websites and applications on real devices


 * VISUAL REGRESSION CLOUD
   
   Pixel-by-pixel comparison among images


 * TEST AT SCALE
   
   Open source test selection and flaky test management platform


 * AUTOMATION TESTING CLOUD
   
   Run automation test on a scalable cloud-based infrastructure


 * SMART TV TESTING CLOUD
   
   Automate app testing on Smart TV with LambdaTest cloud


TOOLS

All Tools


 * UNDERPASS
   
   A GUI desktop application for secure localhost testing


 * LT BROWSER
   
   Next-gen browser to build, test & debug responsive websites


 * LT DEBUG
   
   Chrome extension to debug web issues and accelerate your development


INTEGRATIONS

See all 120+
 * 
 * 
 * 
 * 
 * 
 * 

 * Automation tools
 * 
 * 
 * 
 * 
 * 
 * 
 * 
 * 
 * 

Enterprise
Resources


LEARN


 * BLOG
   
   Blogs on Selenium automation testing, CI/CD, and more


 * WEBINARS
   
   Live virtual workshops around test automation


 * LEARNING HUB
   
   End-to-end guides on Selenium, cross browser testing, CI/CD, and more


 * VIDEOS
   
   Video tutorials around automation testing and LambdaTest


 * CUSTOMER STORIES
   
   Read the success stories of industry leaders


 * COMMUNITY & SUPPORT
   
   Learn about our programs and get support


ENGAGE


 * DOCUMENTATION
   
   Step-by-step guides to get started with LambdaTest


 * API
   
   Extract, delete & modify data in bulk using LambdaTest API


 * NEWSLETTER
   
   Testing insights and tips delivered weekly


 * COMMUNITY
   
   Connect, ask & learn with tech-savvy folks


 * CERTIFICATIONS
   
   Advance your career with LambdaTest Certifications


 * WRITE FOR US
   
   Join the guest blogger program to share insights


WHAT’S NEW

Expecting the Unexpected: 2023 Technology Trends

Join Tariq King as he dives into what to expect in tech in 2023. After a brief
review of the last two years in software, Tariq will share his ideas and
thoughts on future trends in the industry and how individuals and organizations
can position themselves to navigate the year successfully.

Register Now
Developers


GET STARTED


 * SELENIUM
   
   Run first Selenium test on LambdaTest Grid


 * CYPRESS
   
   Run first Cypress test on LambdaTest Grid


 * MOBILE APP TESTING
   
   Test native apps on 50+ devices


 * REAL TIME WEB TESTING
   
   Test websites or web apps on 3000+ browsers


GUIDES


 * CHANGELOG
   
   All LambdaTest announcements


 * DOCUMENTATION
   
   Step-by-step guides to get started with LambdaTest


 * API
   
   Extract, delete & modify data in bulk using LambdaTest API


 * GITHUB REPOSITORIES
   
   Check GitHub repos for ready-to-run code


LANGUAGES & FRAMEWORKS

Java
Node.js
C#
PHP
Python
Ruby
See all


 * FAQS


 * SELENIUM GUIDE


 * CYPRESS GUIDE


 * WEB TECHNOLOGIES COMPATIBILITY


 * AUTOMATION TESTING ADVISOR


 * MOBILE TESTING ADVISOR

Pricing
 * Login
 * Book A Demo
 * Sign Up

〈 Back To Blog


CONTINUOUS TEST ORCHESTRATION AND EXECUTION PLATFORM ONLINE

Perform automated and live-interactive testing on 3000+ real desktop and mobile
devices online.

Start Free Testing Book a Demo

• CI/CD • Automation

FacebookTwitterLinkedIn


WHAT IS JENKINS USED FOR?


HIMANSHU SHETH

Posted On: September 2, 2020

176663 Views

30 Min Read

 * Home
 * >
 * Blog
 * >
 * What Is Jenkins Used For?

This article is a part of our Content Hub. For more in-depth resources, check
out our content hub on Jenkins Tutorial.

Continuous Integration & Continuous Delivery are integral parts of DevOps, as
they are used for integrating multiple stages of the methodology. There are many
CI/CD tools in the market but Jenkins; the Java-based open-source CI/CD tool
tops the popularity list. A small survey conducted by us further escalates
Jenkins’ popularity, leading up to the occasional query of ‘What is Jenkins?’



Source



In this blog as we try to answer ‘what is Jenkins’, we also deep dive into what
is Jenkins pipeline, how does Jenkins work, and more. We would also demonstrate
continuous testing with Jenkins using the Jenkins Maven project and Jenkins
pipelines. As you finish this blog, you’ll not only find out what is Jenkins,
you will also gain sufficient confidence to use Jenkins for continuous testing
in DevOps.

TABLE OF CONTENT

 * What Is Jenkins?
 * How Does Jenkins Work?
 * How To Install Jenkins?
 * How To Configure Jenkins?
 * How To Setup Master & Agent(s) In Jenkins?
 * What Is Jenkins Pipeline?
 * Demonstration Of Jenkins
 * Advantages & Shortcomings Of Jenkins


WHAT IS JENKINS?



Jenkins is an open-source server that is written entirely in Java. It lets you
execute a series of actions to achieve the continuous integration process, that
too in an automated fashion.

This CI server runs in servlet containers such as Apache Tomcat. Jenkins
facilitates continuous integration and continuous delivery in software projects
by automating parts related to build, test, and deployment. This makes it easy
for developers to continuously work on the betterment of the product by
integrating changes to the project.

Jenkins automates the software builds in a continuous manner and lets the
developers know about the errors at an early stage. A strong Jenkins community
is one of the prime reasons for its popularity. Jenkins is not only extensible
but also has a thriving plugin ecosystem.

Some of the possible steps that can be performed using Jenkins are:

 * Software build using build systems such as Gradle, Maven, and more.
 * Automation testing using test frameworks such as Nose2, PyTest, Robot,
   Selenium, and more.
 * Execute test scripts (using Windows terminal, Linux shell, etc.
 * Achieve test results and perform post actions such as printing test reports,
   and more.
 * Execute test scenarios against different input combinations for obtaining
   improved test coverage.
 * Continuous Integration (CI) where the artifacts are automatically created and
   tested. This aids in identification of issues in the product at an early
   stage of development.

At the time of what is Jenkins blog, it had close to 1500+ plugins contributed
by the community. Plugins help in customizing the experience with Jenkins, along
with providing support for accelerating activities related to building,
deploying, and automating a project.


HISTORY OF JENKINS

Jenkins has an early mover advantage since it has been in development since
2011. Kohsuke Kawaguchi created Jenkins (then called ‘Hudson’) while working at
Sun Microsystems. Hudson was created in the summer of 2004 and the first release
was in February 2005.

After the acquisition of Sun Microsystems by Oracle, a proposal was approved by
the Hudson community for creating the Jenkins project. In February 2011, Oracle
intended that the development of Hudson should continue hence, Hudson was forked
instead of renaming it to Jenkins.

Though Hudson and Jenkins were being developed independently, Jenkins acquired
significantly more projects & contributors than Hudson. Consequently, Hudson is
no longer maintained by the community.


JENKINS RELEASE CYCLE

Like other open-source projects, Jenkins also produces two release lines – LTS
(Long-Term Support) and Weekly (regular) releases. Jenkins is very good with
releases, as stable releases happen every four weeks.

At the time of this ‘, what is Jenkins’ article, the latest version of Jenkins
LTS was 2.235.2, and Jenkins Weekly was 2.249.


SALIENT FEATURES OF JENKINS

Jenkins is more functionality-driven rather than UI-driven hence, there is a
learning curve involved in getting to know what is Jenkins. Here are the
powerful developer-centric features offered by Jenkins:

1. EASY INSTALLATION & CONFIGURATION

Jenkins is a self-contained Java program that is agnostic of the platform on
which it is installed. It is available for almost all the popular operating
systems such as Windows, different flavors of Unix, and Mac OS.

It is available as a normal installer, as well as a .war file. Once installed,
it is easy to configure using its web interface.

2. OPEN-SOURCE

As it is open-source, it is free for use. There is a strong involvement of the
community which makes it a powerful CI/CD tool. You can take support from the
Jenkins community, whether it is for extensibility, support, documentation, or
any other feature related to Jenkins.

3. THRIVING PLUGIN ECOSYSTEM

The backbone of Jenkins is the community and the community members have been
instrumental in the development (and testing) of close to 1500+ plugins
available in the Update Center.

4. EASY DISTRIBUTION

Jenkins is designed in such a manner that makes it relatively easy to distribute
work across multiple machines and platforms for the accelerated build, testing,
and deployment.

This Jenkins Tutorial for beginners and professionals will help you learn how to
use Jenkins, one of the most popular CI/CD tools used in DevOps.




HOW DOES JENKINS WORK?

In this section of the What is Jenkins blog, we look at the internal functioning
of Jenkins i.e. what happens once the developer commits changes to the
repository and how CI/CD is realized in Jenkins. We also look at the
Master-Agent architecture in Jenkins.


ARCHITECTURE OF JENKINS

Before we dive into how does Jenkins works, we must understand the architecture
of Jenkins. These are the series of steps that outlines the interaction between
different elements in Jenkins:

 * Developers do the necessary modifications in the source code and commit the
   changes to the repository. A new version of that file will be created in the
   version control system that is used for maintaining the repository of source
   code.
 * The repository is continuously checked by the Jenkins CI server for any
   changes (either in the form of code or libraries) and changes are pulled by
   the server.
 * In the next step, we ensure that the build with the ‘pulled changes’ is going
   through or not. The Build server performs a build with the code and an
   executable is generated if the build process is successful. In case of a
   build failure, an automated email with a link to build logs and other build
   artifacts is sent to the developer.
 * In case of a successful build, the built application (or executable) is
   deployed to the test server. This step helps in realizing continuous testing
   where the newly built executable goes through a series of automated tests.
   Developers are alerted in case the changes have caused any breakage in
   functionality.
 * If there are no build, integration, and testing issues with the checked-in
   code, the changes and tested application are automatically deployed to the
   Prod/Production server.

Here is the diagrammatic representation of the Jenkins architecture:



A single Jenkins server might not be sufficient to realize the following
requirements:

 * Testing needs to be performed on different environments (i.e. code written
   using different languages e.g. Java, Python, C, etc. are committed to the
   version control system), where a single server might not suffice the
   requirement.
 * A single Jenkins server might not be sufficient to handle the load that comes
   with large-scale software projects.

In such scenarios, the distributed (or Master-Agent) architecture of Jenkins is
used for continuous integration and testing. Diving deeper into how does Jenkins
works, we take a look at the architecture of Jenkins.


MASTER- AGENT ARCHITECTURE IN JENKINS

The master-agent (or distributed) architecture in Jenkins is used for managing
distributed builds. The Master and Agent(s) communicate through the TCP/IP
protocol.

These are the roles and responsibilities of the Jenkins Master and Agent(s):

JENKINS MASTER

The main server in Jenkins is the Master. Here are the jobs handled by Jenkins
Master:

 * Schedule build jobs
 * Choosing the appropriate agent in the master-agent ecosystem for dispatching
   the builds.
 * Monitor agents and take them online/offline as and when required.
 * Presenting the build results (and reports) to the developer.

The Jenkins master can also execute the jobs directly but it is always
recommended to select the appropriate agent(s) for build and execution-related
tasks.

JENKINS AGENT(S)

A agent is a remote machine that is connected to the Master. Depending on the
project and build requirements, you could opt for ‘N’ number of agents. agents
can run on different operating systems and depending on the ‘type of build
request’, the appropriate Agent is chosen by the Master for build execution and
testing.

Here are the jobs handled by the Jenkins Agent(s):

 * Listen to commands from the Jenkins Master.
 * Execute build jobs that are dispatched by the Master.
 * Developers have the flexibility to run the build and execute tests on a
   particular agent or a particular type of Agent. The default option is Jenkins
   Master selecting the best-suited Agent for the job.

Here is a simple diagrammatic representation of how does Jenkins work, with
multiple Jenkins Agents connected to the Jenkins Master:




HOW DOES JENKINS WORK IN MASTER-AGENT ARCHITECTURE?

In the previous section of the What is Jenkins blog, we touched upon the brief
responsibilities of Master and Agent(s) in Jenkins. Let’s look at exactly how
does Jenkins works in the Master-Agent (or distributed) architecture:

In the Jenkins Master-Agent architecture shown below, there are three Agents,
each running on a different operating system (i.e. Windows 10, Linux, and Mac
OS).



 * Developers check-in their respective code changes in ‘The Remote Source Code
   Repository’ that is depicted on the left-hand side.
 * Only the Jenkins master is connected to the repository and it checks for
   code-changes (in the repository) at periodic intervals. All the Jenkins
   Agents are connected to the Jenkins Master.
 * Jenkins master dispatches the request (for build and test) to the appropriate
   Jenkins Agent depending on the environment required for performing the build.
   This lets you perform builds and execute tests in different environments
   across the entire architecture.
 * The Agent performs the testing, generates test reports, and sends the same to
   the Jenkins Master for monitoring.

As developers keep pushing code, Jenkins Agents can run different builds
versions of the code for different platforms. Jenkins Master (or Master Node)
controls how the respective builds should operate.

In subsequent sections of the What is Jenkins blog, we would look at the steps
for setting up Jenkins Master and Agents.


HOW TO INSTALL JENKINS?

In this section of What is Jenkins blog, we will show you how to install Jenkins
on Windows 10. Jenkins is available for download for other operating systems
like different flavors of Unix (e.g. UBuntu, Gentoo, FreeBSD, etc.), as well as
Mac OS. You can also put Jenkins in the Docker Container. Please visit
https://www.jenkins.io/download/ to download the required Jenkins installer.

Jenkins installer is also available as a generic Java Package (.war). If you are
using Jenkins with Selenium for performing cross browser testing, we recommend
using the .war file, as you can witness the execution of the test scenarios with
automated tests executing on browsers in the non-headless mode.


PREREQUISITES FOR JENKINS INSTALLATION

 1. If JDK (Java SE Development Kit) is not present on the machine, download JDK
    8 as per the configuration of your system (i.e. 32-bit or 64-bit). At the
    time of this article, the latest version of JDK for Windows was
    jdk-8u261-windows*.
 2. Add the JDK installation path in the System Environment variable. This also
    needs to be done for JRE (Java Runtime Environment).
 3. Add environment variable JAVA_HOME pointing to the location where JDK 8 is
    installed.



Read – How To Set Jenkins Pipeline Environment Variables?


STEPS TO INSTALL JENKINS (USING JENKINS INSTALLER) ON WINDOWS 10

 1. Download the stable version of Jenkins for Windows
 2. Unzip the downloaded file and start the installation process. Just follow
    the steps mentioned on the installer screen until the installation is
    complete. You might be prompted to enter username and password, you can
    simply logon with the administrator account in your system and follow these
    steps.
 3. By default, Jenkins listens on port 8080. When the installation is complete,
    you would be required to enter the initialAdminPassword present in <
    installation-directory >\Jenkins\secrets\ initialAdminPassword
 4. You would be prompted to create an Admin User. These credentials can be used
    for logging into Jenkins (instead of using initialAdminPassword).
 5. Jenkins is ready for usage.
 6. Optional Step (Changing port associated with Jenkins service)

In case some other service (in the machine where Jenkins is installed) is using
the port 8080, Jenkins might face issues in starting up. You can either stop the
service (on port 8080) using net stop command or change the port number
associated with Jenkins.

Changing the port number is a better option since the services on port 8080 can
still function along with Jenkins. For changing the port used by Jenkins, go to
< Jenkins-installation-folder >\Jenkins\jenkins.xml

Search for httpPort in the file and change from 8080 to a preferred port of
choice (e.g. 9090 in our case). As we mentioned in step-2 above, you need to
have admin rights to perform this change.

Jenkins Jenkins This service runs a Jenkins automation server. <!-- if you'd
like to run Jenkins with a specific version of Java, specify a full path to
java.exe. The following value assumes that you have java in your PATH. -->
%BASE%\jre\bin\java -Xrs -Xmx256m
-Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar
"%BASE%\jenkins.war" --httpPort=9090 --webroot="%BASE%\war"
1
2
3
4
5
6
7
  Jenkins
  Jenkins
  This service runs a Jenkins automation server.
  
  <!-- if you'd like to run Jenkins with a specific version of Java, specify a
full path to java.exe. The following value assumes that you have java in your
PATH. -->
  %BASE%\jre\bin\java
  -Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar
"%BASE%\jenkins.war" --httpPort=9090 --webroot="%BASE%\war"

Once changes are done, restart the Jenkins service and open
localhost:port-number (e.g. localhost:9090) in the web browser. Login using the
user-name and password (created in step-4).




STEPS TO INSTALL JENKINS (USING .WAR) ON WINDOWS 10

 1. Download Jenkins installer in the .war format
 2. Jenkins can start directly from the command line (or terminal) by executing
    the following command:
    
    java -Dhudson.model.DirectoryBrowserSupport.CSP="sandbox allow-scripts
    allow-popups allow-popups-to-escape-sandbox; style-src 'unsafe-inline' *;"
    -Dsvnkit.http.sslProtocols=TLSv1 -jar Jenkins.war --httpPort=9090
    1
    java -Dhudson.model.DirectoryBrowserSupport.CSP="sandbox allow-scripts
    allow-popups allow-popups-to-escape-sandbox; style-src 'unsafe-inline' *;"
    -Dsvnkit.http.sslProtocols=TLSv1 -jar Jenkins.war --httpPort=9090
    
    
    By default, Jenkins uses port 8080 but in the command shown above, we start
    Jenkins at port 9090. You can use a port number that is not used for any
    other service.
    
    
    
    

 3. Once the Jenkins service starts, you should visit localhost:9090 in the web
    browser to start using Jenkins.
    
    In this ‘what is Jenkins’ blog, we would be using Jenkins in the .war format
    as cross browser tests can be executed in the non-headless mode only with
    this format of Jenkins.




HOW TO CONFIGURE JENKINS?

In this section of the ‘what is Jenkins’ blog, we look at how to do user
management in Jenkins, assigning roles to users, and setting up Master and
Agents in Jenkins.


USER MANAGEMENT IN JENKINS

To manage users in Jenkins, you should navigate to Manage Jenkins ? Configure
Global Security. The ideal option is to let Jenkins’ own user database. You can
create a user Anonymous that has only read access. Create entries for users you
intend to add in the next step.

 1. In the Authorization strategy, select ‘Matrix-based security’.
 2. Click on the ‘Add user or group’ button and enter the intended user/group
    name in the next box.
 3. On the login page, you should create an account for the newly created user
    (e.g. Himanshu Sheth in our case) that was just given access.


ASSIGN ROLES TO USERS IN JENKINS

For creating a role-based authorization strategy, Role-based Authorization
Strategy plugin needs to be installed. For installing the plugin-

 1. Go to Manage Jenkins ? Manage Plugins ? Enter ‘Role-based Authorization
    Strategy’ under Available tab. Click ‘Install’ to install the plugin.
 2. Before assigning roles, it is important to change the Authorization strategy
    to Role-Based Strategy instead of Matrix-based security.
 3. In ‘Manage Jenkins’, you would see ‘Manage and Assign Roles’ as shown below.
 4. Create a new global role e.g. developer and select the permissions that you
    intend to assign to the role.
    
    You can now assign Project Roles, Item roles, or Node roles. In our case,
    the role ‘developer’ should be able to access build jobs that start with L.
    Pattern is the Regex value of the job name and it should be [L]?.* Here is
    an example of item roles for the role titled ‘developer’.
    
    


HOW TO SETUP MASTER & AGENT(S) IN JENKINS?

Earlier in this ‘what is Jenkins’ blog section titled Master- Agent Architecture
in Jenkins, we had a look at the architecture of Jenkins. Here, we will
demonstrate the creation of Jenkins Agents (or Nodes) on Windows 10 to further
understand how does Jenkins work.

PREREQUISITES FOR AGENT CREATION

Before we go ahead with the creation of Agent Node, the following settings have
to be changed in the ‘Global Security’ settings in Jenkins:

 1. Go to ‘Manage Jenkins’ ? Configure Global Security and change the below
    settings:
 2. Go to ‘Authentication’ ? ‘Security Realm’ and change settings to ‘Jenkins’
    own user database’.
 3. Go to ‘Authorization’ ? Strategy and change to ‘Project-based Matrix
    Authorization Strategy’. Enable ‘Read’ and ‘SystemRead’ properties for user
    ‘Anonymous users’. Enable ‘Connect’ in the ‘Agent section’ for user
    ‘Anonymous users’.
 4. Go to ‘Agents’ ? ‘TCP port for inbound agents’ and change the setting to
    ‘Random’.
    
 5. Go to ‘Agent ? Master Security’ and enable ‘Enable Agent → Master Access
    Control’. Change setting for ‘SSHD Port’ in ‘SSH Server’ section to
    ‘Disable’.
 6. Click on Apply and Save to save these settings.

STEPS TO CREATE AGENT(S) IN JENKINS

 1. With the completion of the prerequisites for Agent (or Node) creation, we go
    to the ‘Manage Jenkins’ section and go to ‘Manage Nodes and Clouds’.
 2. Click on New Node and give an appropriate name (e.g. Agent) to the Node.
    Enable the setting ‘Permanent Agent’ so that the agent is permanent to
    Jenkins.
 3. In this step, you need to enter the details of the node agent machine. No
    (#) of executors is the number of jobs that the agent can run in parallel.
    We keep this setting as 2. Labels is the identifier for the agent and is
    useful if you want to execute jobs on that particular agent (through a
    Jenkins Pipeline).The Remote Root Directory is the location where the
    agent.jar will be stored and it could point to any directory in your
    machine. In our case, we set Remote Root Directory to C:\Jenkins_Agent.
    
    
    
    In Usage, you can select ‘Use this node as much as possible’. As shown
    below, there are different ways in which the Agent can be launched but we
    select the option ‘Launch agent by connecting to the Master’.
    
    
    
    In Availability, you can keep ‘Keep this agent online as much as possible’
    Rest of the settings can be kept in the default state. Click ‘Save’ to
    create the node named ‘Agent’.
    
    

 4. The new node named ‘Agent’ is created but its status is offline.
    
    Click on the node named ‘Agent’ and you would be presented with different
    ways through which it can connect to Jenkins.
    
    
    
    Click on the Launch button and save slave-agent.jnlp in the designated
    directory (i.e. in our case it is C:\Jenkins_Agent). Click on agent.jar
    (mentioned in the option ‘If the agent is headless’) and save agent.jar in
    the same location. This jar will be used if you want to use the browser for
    testing in the headless mode.
    
    

 5. To start the newly created Agent named ‘Agent’, go to the terminal and
    execute the following command:
    
    
    
    javaws http://localhost:9090/computer/Agent/slave-agent.jnlp
    1
    javaws http://localhost:9090/computer/Agent/slave-agent.jnlp
    
    This would open the application named ‘Jenkins Remoting Agent’. Click on Run
    to start the application.
    
    
    
    As you can see, the status of the node named ‘Agent’ is connected. The same
    can be verified by looking at the status of the corresponding Node.
    
    
    
    
    
    Alternatively, you can execute the following command if the agent is to be
    used in the headless mode.
    
    java -jar agent.jar -jnlpUrl
    http://localhost:9090/computer/Agent/slave-agent.jnlp -workDir
    "c:\Jenkins_Agent"
    1
    java -jar agent.jar -jnlpUrl
    http://localhost:9090/computer/Agent/slave-agent.jnlp -workDir
    "c:\Jenkins_Agent"
    
    Here is the execution snapshot:
    
    
    
    The third option to start the Agent node is by invoking slave-agent.jnlp by
    double-clicking on the same.
    
    
    As seen below, the status of the ‘Agent’ node is online.
    

 6. Since a new agent is up & running, you can now execute jobs on the ‘Agent’
    node.


WHAT IS JENKINS PIPELINE?

Pipeline in Jenkins is a group of jobs (or events) that are interlinked in a
particular sequence. Jenkins Pipeline is a set or suite of plugins that provides
support for implementation and integration of Continuous Delivery pipelines into
Jenkins.

The Pipeline also provides a set of tools that are useful for modeling simple as
well as complex delivery pipelines ‘as code’ through ‘Pipeline Domain-Specific
Language (DSL)’ syntax.

Every job in the Jenkins pipeline has some dependency on one or more events.
Continuous delivery pipeline in Jenkins consists of four states – Build, Deploy,
Test, and Release. Each of these states consist of events that execute in a
sequence.



WHAT IS JENKINSFILE?

Now that you understand what is Jenkins pipeline, we can dive deeper into the
concept. The entire definition of a Jenkins Pipeline is written into a text file
called Jenkinsfile. It contains the steps required for running a Jenkins
Pipeline. ‘Pipeline as code’ can be implemented using Jenkinsfile and Domain
Specific Language (DSL) is used for defining the same.

Jenkinsfile can also be committed to the source control repository of the
project. With Jenkinsfile, the CD Pipeline is also treated as a part of the
application that is versioned, committed, and reviewed like any other piece of
code.

Some of the major benefits of Jenkinsfile are:

 * Single Jenkinsfile can be used for creating a Pipeline build process for all
   the branches and executing pull requests.
 * The implementation in a Pipeline can be reviewed like normal source code.
 * Audit trail of the Pipeline.
 * Singular source for the Pipeline can be viewed as well as edited by multiple
   members associated with the project.

Though Pipeline can be defined either in web UI or with a Jenkinsfile, it is
recommended to define what is Jenkins Pipeline in a Jenkinsfile and maintain the
same in a source control repository.


SYNTAX FOR DEFINING A JENKINSFILE

To define what is Jenkins pipeline, Jenkinsfile can be written using the
following types of Syntax:

A. DECLARATIVE

Declarative Pipeline is a recent feature of Jenkins Pipeline that makes reading
and writing the Pipeline code a lot easier. Unlike Scripted Syntax with
Pipelines, Declarative Syntax helps in controlling different aspects of the
Pipeline in a simplistic manner.

B. SCRIPTED

Scripted Pipeline is a more traditional way of writing a Jenkins Pipeline as
code. It uses traditional Groovy-based syntax. The Web UI of Jenkins is normally
used for writing the Scripted Pipeline in a Jenkinsfile.


IMPORTANT CONCEPTS OF JENKINS PIPELINE

Moving on with what is Jenkins pipeline, here are some basic concepts that need
to be well-understood if you are planning to use the Jenkins Pipeline:

A. PIPELINE

The Pipeline consists of a set of instructions written as code. It defines the
entire build process, which ideally consists of different stages for building,
testing, and delivering the application.

B. NODE

A node is a machine that is a part of the Jenkins environment. The Jenkins
Pipeline executes on a node block that is usually a part of the Scripted
Pipeline syntax.

C. STAGE

Stage in a Jenkins Pipeline consists of a unique subset of tasks such as Build,
Test, Deploy, etc. The Stage block is used by many plugins for providing the
visualization of Jenkins status (and progress).

D. STEP

Step is a single task that tells Jenkins what exactly needs to be done. For
example, setting an environment variable can be done in a step, executing a
build command can also be a step. On the whole, a Jenkins Pipeline constitutes a
series of steps.


ADVANTAGES OF USING JENKINS PIPELINE

Jenkins Pipeline is instrumental in adding a rich set of automation tools onto
Jenkins. Hence, Jenkins can be used for simple continuous integration as well as
for comprehensive CD pipelines.

These are some of the primary reasons for using the Jenkins Pipeline:

 * As the Jenkins Pipeline is implemented as code, it can be checked in the
   source control repository. Teams can view, edit, as well as iterate upon the
   delivery pipeline.
 * Jenkins Pipelines are robust. A Pipeline is automatically resumed in case the
   server witnesses an unplanned restart.
 * Pipeline process can pause and wait for input for any input from the user.
 * Pipelines are versatile as they can be used for realizing complex CD
   requirements, including performing work in parallel.
 * Jenkins Pipelines are extensible by plugin developers and users with Pipeline
   Shared Libraries.


DECLARATIVE PIPELINE SAMPLE

Here is a simple example of a Declarative Pipeline-

pipeline { agent any stages { stage('Build') { steps { } } stage('Test') { steps
{ } } stage('Deploy') { steps { } } } }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pipeline {
    agent any
    stages {
        stage('Build') {
            steps {
            }
        }
        stage('Test') {
            steps {
            }
        }
        stage('Deploy') {
            steps {
            }
        }
    }
}

The pipeline blocks define the work that has been done through the defined
Pipeline. Listed down here are some of the essential details of this Pipeline:

 1. 1. Agent ‘any’ means the Pipeline stages can be executed on any available
       Agent.
    2. ‘Build’, ‘Test’, and ‘Deploy’ are the different stages in the pipeline.
       Each of them will run in a sequential manner.
    3. Instructions inside ‘Steps’ indicates the work that needs to be performed
       as a part of a particular ‘Stage’. For example, sh ‘build command’ can be
       used for triggering a build command in the ‘Build’ stage.

We have not covered the Scripted Pipeline, as that is beyond the scope of this
blog. In the later part of the What is Jenkins blog, we would demonstrate the
usage of the Declarative Pipeline for the Maven project.


DEMONSTRATION OF JENKINS

We hope the above sections have helped to answer the following questions- what
is Jenkins, how does Jenkins work, and what is Jenkins Pipeline. In this
section, we demonstrate the usage of Jenkins with the Maven project and Pipeline
project.

TEST SCENARIO

 1. Navigate to https://lambdatest.github.io/sample-todo-app/
 2. Choose the first two of the checkboxes
 3. Type ‘Happy Testing at LambdaTest’ in the textbox with an id
    ‘sampletodotext’
 4. Select the ‘Add’ Button and check whether the text has been added or not

Implementation

The TestNG test framework is used for performing Selenium test automation. For a
quick recap on TestNG, you can refer to this guide for creating TestNG Project
In Eclipse.



This file contains bidirectional Unicode text that may be interpreted or
compiled differently than what appears below. To review, open the file in an
editor that reveals hidden Unicode characters. Learn more about bidirectional
Unicode characters
Show hidden characters

package org.selenium4; import org.openqa.selenium.chrome.ChromeDriver; import
org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.openqa.selenium.By; import
org.openqa.selenium.WebElement; import java.util.Map; import java.util.*; import
io.github.bonigarcia.wdm.WebDriverManager; public class CrossBrowserTest {
protected static ChromeDriver driver; String URL =
"https://lambdatest.github.io/sample-todo-app/"; @BeforeClass public void
testSetUp() { WebDriverManager.chromedriver().setup(); driver = new
ChromeDriver(); } @Test public void test_Selenium4_ToDoApp() throws
InterruptedException { driver.navigate().to(URL);
driver.manage().window().maximize(); try { /* Let's mark done first two items in
the list. */ driver.findElement(By.name("li1")).click();
driver.findElement(By.name("li2")).click(); /* Let's add an item in the list. */
driver.findElement(By.id("sampletodotext")).sendKeys("Happy Testing at
LambdaTest"); driver.findElement(By.id("addbutton")).click(); /* Let's check
that the item we added is added in the list. */ String enteredText =
driver.findElement(By.xpath("/html/body/div/div/div/ul/li[6]/span")).getText();
if (enteredText.equals("Happy Testing at LambdaTest")) {
System.out.println("Demonstration of Jenkins is complete"); } } catch (Exception
e) { System.out.println(e.getMessage()); } } @AfterClass public void tearDown()
{ if (driver != null) { driver.quit(); } } }

view raw testng.java hosted with ❤ by GitHub





This file contains bidirectional Unicode text that may be interpreted or
compiled differently than what appears below. To review, open the file in an
editor that reveals hidden Unicode characters. Learn more about bidirectional
Unicode characters
Show hidden characters

<?xml version="1.0" encoding="UTF-8"?> <project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>org.selenium4.SeleniumGrid4</artifactId>
<version>1.0-SNAPSHOT</version> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties>
<dependencies> <!--
https://mvnrepository.com/artifact/com.github.lambdatest/lambdatest-tunnel-binary
--> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId>
<version>6.9.10</version> <scope>test</scope> </dependency> <dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId> <version>4.0.0-alpha-6</version>
</dependency> <dependency> <groupId>org.testng</groupId>
<artifactId>testng</artifactId> <version>6.8.8</version> </dependency>
<dependency> <groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId> <version>4.0.0-alpha-6</version>
</dependency> <dependency> <groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId> <version>RELEASE</version>
<scope>test</scope> </dependency> <!--
https://mvnrepository.com/artifact/org.slf4j/slf4j-nop --> <dependency>
<groupId>org.slf4j</groupId> <artifactId>slf4j-nop</artifactId>
<version>1.7.28</version> <scope>test</scope> </dependency> </dependencies>
<build> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version> <configuration> <source>1.8</source> <target>1.8</target>
</configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <version>2.12.4</version>
</plugin> </plugins> </build> </project>

view raw pom.xml hosted with ❤ by GitHub



We have used IntelliJ for development. You could use Eclipse or any preferred
IDE for development.

Code WalkThrough

The implementation under the @BeforeClass annotation sets the browser
capabilities for the Chrome browser.

@BeforeClass public void testSetUp() { WebDriverManager.chromedriver().setup();
driver = new ChromeDriver();
1
2
3
4
@BeforeClass
    public void testSetUp() {
        WebDriverManager.chromedriver().setup();
        driver = new ChromeDriver();

The test case test_Selenium4_ToDoApp() is implemented under the @Test
annotation. Selenium methods such as find_element_by_name(),
driver.find_element_by_id(), etc. are used for locating the web elements on
which operations have to be performed. Selenium commands such as click(),
sendKeys(), etc. are applied on the necessary web elements.

@Test public void test_Selenium4_ToDoApp() throws InterruptedException {
driver.navigate().to(URL); driver.manage().window().maximize(); try {
............... ............... }
1
2
3
4
5
6
7
8
9
@Test
    public void test_Selenium4_ToDoApp() throws InterruptedException {
        driver.navigate().to(URL);
        driver.manage().window().maximize();

    try {
            ...............
            ...............
        }




DECLARATIVE PIPELINE EXAMPLE IN JENKINS

In this section of What is Jenkins blog, we demonstrate the usage of the
Declarative Jenkins pipeline for Maven project.

SETTING UP THE PROJECT

Perform the following steps to setup the project:

 1. Create a ‘new Item’ after logging in to Jenkins. Enter the item name
    ‘Jenkins Declarative Pipeline Demonstration’. Select Pipeline as the Project
    Type.
 2. The following Jenkins Plugins are installed by navigating to the
    pluginManager i.e. localhost:/pluginManager/
    * Blue Ocean Plugin – https://plugins.jenkins.io/blueocean
    * Blue Ocean Pipeline Editor Plugin –
      https://plugins.jenkins.io/blueocean-pipeline-editor
    * Configuration as a Code Plugin –
      https://plugins.jenkins.io/config-file-provider
    * JUnit Plugin – https://plugins.jenkins.io/junit/
    * HTML Publisher Plugin – https://plugins.jenkins.io/htmlpublisher
    * Maven Integration Plugin – https://plugins.jenkins.io/maven-plugin
    * Maven Info Plugin – https://plugins.jenkins.io/maven-info
    * Maven SureFire Plugin –
      https://maven.apache.org/surefire/maven-surefire-plugin/
    * Pipeline implementation for Blue Ocean Plugin –
      https://plugins.jenkins.io/blueocean-pipeline-api-impl
    * Pipeline Maven Integration Plugin –
      https://plugins.jenkins.io/pipeline-maven
 3. Configure the global settings and paths (for Java and Maven) by navigating
    to ‘Configure System’ in the System Configuration section.
    
    Navigate to the configuration item titled ‘Global properties’ and add the
    following environment variables:
    
    * JAVA_HOME – < Location where JDK is installed >
    * MAVEN_HOME – < Location where Maven is installed >
    
    In our case the entries are as below:
    
    * JAVA_HOME – C:\Program Files\Java\jdk1.8.0_251
    * MAVEN_HOME – C:\apache-maven\apache-maven-3.6.3\
    
    Click on Apply and Save.

 4. The added environment variables will be used in the Pipeline.

Adding these environment variables in the System Configuration section makes the
settings public (i.e. it can be used across different jobs in Jenkins).

With this, we are all set to write our first declarative Pipeline!

WRITING THE DECLARATIVE PIPELINE

In the project titled ‘Jenkins Declarative Pipeline Demonstration’, click on
Configure. In the project configuration window, click on the Pipeline Tab.



Under Pipeline ‘Definition’, select Pipeline Script. Paste the contents of the
following Jenkinsfile in the Script box. Click on Apply and Save.



This file contains bidirectional Unicode text that may be interpreted or
compiled differently than what appears below. To review, open the file in an
editor that reveals hidden Unicode characters. Learn more about bidirectional
Unicode characters
Show hidden characters

pipeline { agent any tools { maven 'MAVEN_3.6.3' jdk 'JDK_1.8.0_251' } stages {
stage('Build') { environment { PROJECT_DIR =
"C:\\Users\\Lenovo\\IdeaProjects\\CrossBrowserTest" } steps { echo 'maven clean'
bat ' mvn -f %PROJECT_DIR%\\pom.xml clean install' } } } post { success { echo
'Now Archiving' junit allowEmptyResults: true, testResults:
'**/surefire-reports/*.xml' } } }

view raw definition.xml hosted with ❤ by GitHub



PIPELINE WALKTHROUGH

 1. This particular Jenkins job can run on any Agent.
    
    pipeline { agent any
    1
    2
    pipeline {
        agent any

 2. The section defining tools directive lists the tools that have to be
    auto-installed. The same is also added to the PATH variable. This section
    will be ignored if agent none is specified.
    
    tools { maven 'MAVEN_3.6.3' jdk 'JDK_1.8.0_251' }
    1
    2
    3
    4
    tools {
            maven 'MAVEN_3.6.3'
            jdk 'JDK_1.8.0_251'
        }
    
    
    On my machine, JDK version 1.8.0_251 and Maven version 3.6.3 is installed.
    Hence, alias maven and jdk pointing to the respective Maven and JDK versions
    are added under the tools directive.
 3. There is only one stage ‘Build’ in the Pipeline. Using the environment
    directive, we define an environment variable that points to the directory
    that contains the Java project. The defined environment variable (i.e.
    PROJECT_DIR) will be usable for all steps or stage-specific steps, as it is
    defined within the Stage ‘Build’.
    
    stage('Build') { environment { PROJECT_DIR =
    "C:\\Users\\Lenovo\\IdeaProjects\\CrossBrowserTest" }
    1
    2
    3
    4
    stage('Build') {
                environment {
                    PROJECT_DIR =
    "C:\\Users\\Lenovo\\IdeaProjects\\CrossBrowserTest"
                }

 4. This step is the most important in defining what is Jenkins Pipeline as
    build is performed in this step. The command mvn clean install is executed
    on the pom.xml present in the project directory. Since our build machine is
    Windows hence, we are invoking the build command through bat (or batch).
    
    steps { echo 'maven clean' //ABC indicates the folder name where the pom.xml
    file resides bat ' mvn -f %PROJECT_DIR%\\pom.xml clean install' }
    1
    2
    3
    4
    5
    steps {
                    echo 'maven clean'
                    //ABC indicates the folder name where the pom.xml file
    resides
                    bat ' mvn -f %PROJECT_DIR%\\pom.xml clean install'  
                }

 5. A post-build action has been added under the ‘post’ directive. The action
    will only be invoked if the build process is successful since the actions
    are under ‘success’. The junit plugin is used for preparing the test report.
    
    post { success { echo 'Now Archiving' junit allowEmptyResults: true,
    testResults: '**/surefire-reports/*.xml' } } }
    1
    2
    3
    4
    5
    6
    7
    post {
                success {
                            echo 'Now Archiving'
                            junit allowEmptyResults: true, testResults:
    '**/surefire-reports/*.xml'
                    }
            }
    }

Once we have added the Pipeline to the Jenkinsfile, click on ‘Open Blue Ocean’
link to run the job. Alternatively, you could also issue a Build by clicking on
the ‘Build Now’ option, in which case you need not install the Blue Ocean
plugin.



Click on ‘Run’ to run the job.



As shown below, the configuration of tools (i.e. JDK and Maven) was successful.



The Steps ‘Build’ and post-build action ran without any issues.



This is the Stage View of the current Jenkins pipeline. The Declarative Tools
install stage completed in 2 seconds and the Build stage took 3 minutes and 25
seconds.



You can hover to any stage and have a look at the logs of that particular stage.
As shown in the Console Output, the test scenario was executed successfully
where the Chrome WebDriver was instantiated and required actions were performed
on the webpage under test.



Truncated Console Logs are below:

[INFO] --- maven-compiler-plugin:3.0:testCompile (default-testCompile) @
org.selenium4.CrossBrowserTest --- [INFO] Changes detected - recompiling the
module! [INFO] Compiling 1 source file to
C:\Users\Lenovo\IdeaProjects\CrossBrowserTest\target\test-classes [INFO] [INFO]
--- maven-surefire-plugin:2.12.4:test (default-test) @
org.selenium4.CrossBrowserTest --- [INFO] Surefire report directory:
C:\Users\Lenovo\IdeaProjects\CrossBrowserTest\target\surefire-reports
------------------------------------------------------- T E S T S
------------------------------------------------------- Running
org.selenium4.CrossBrowserTest Configuring TestNG with:
org.apache.maven.surefire.testng.conf.TestNG652Configurator@299a06ac Starting
ChromeDriver 84.0.4147.30
(48b3e868b4cc0aa7e8149519690b6f6949e110a8-refs/branch-heads/4147@{#310}) on port
45010 Only local connections are allowed. Please see
https://chromedriver.chromium.org/security-considerations for suggestions on
keeping ChromeDriver safe. ChromeDriver was started successfully.
[1595945821.200][WARNING]: Timed out connecting to Chrome, retrying... Jul 28,
2020 7:47:03 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO:
Detected dialect: W3C Demonstration of Jenkins is complete Tests run: 1,
Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 93.655 sec Results : Tests
run: 1, Failures: 0, Errors: 0, Skipped: 0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[INFO] --- maven-compiler-plugin:3.0:testCompile (default-testCompile) @
org.selenium4.CrossBrowserTest ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to
C:\Users\Lenovo\IdeaProjects\CrossBrowserTest\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @
org.selenium4.CrossBrowserTest ---
[INFO] Surefire report directory:
C:\Users\Lenovo\IdeaProjects\CrossBrowserTest\target\surefire-reports

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.selenium4.CrossBrowserTest
Configuring TestNG with:
org.apache.maven.surefire.testng.conf.TestNG652Configurator@299a06ac
Starting ChromeDriver 84.0.4147.30
(48b3e868b4cc0aa7e8149519690b6f6949e110a8-refs/branch-heads/4147@{#310}) on port
45010
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for
suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
[1595945821.200][WARNING]: Timed out connecting to Chrome, retrying...
Jul 28, 2020 7:47:03 PM org.openqa.selenium.remote.ProtocolHandshake
createSession
INFO: Detected dialect: W3C
Demonstration of Jenkins is complete
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 93.655 sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0




MAVEN PROJECT EXAMPLE IN JENKINS

Next up in this what is Jenkins blog, we dive into using Maven with Jenkins.
Maven project in Jenkins takes advantage of the POM files and reduces the
overall effort spent on the configuration of the project.

SETTING UP THE PROJECT

Perform the following steps to setup the Maven project:

 1. Create a ‘new Item’ after logging in to Jenkins. Enter the item name
    ‘Jenkins Maven Demonstration’. Select Maven project as the project type and
    click OK.
 2. The following Jenkins Plugins are installed by navigating to the
    pluginManager i.e. http://localhost:< port_associated_with_Jenkins
    >/pluginManager/. The same set of plugins were also installed for the
    Jenkins Pipeline demonstration.
    * Blue Ocean Plugin – https://plugins.jenkins.io/blueocean
    * Blue Ocean Pipeline Editor Plugin –
      https://plugins.jenkins.io/blueocean-pipeline-editor
    * Configuration as a Code Plugin –
      https://plugins.jenkins.io/config-file-provider
    * JUnit Plugin – https://plugins.jenkins.io/junit/
    * HTML Publisher Plugin – https://plugins.jenkins.io/htmlpublisher
    * Maven Integration Plugin – https://plugins.jenkins.io/maven-plugin
    * Maven Info Plugin – https://plugins.jenkins.io/maven-info
    * Maven SureFire Plugin –
      https://maven.apache.org/surefire/maven-surefire-plugin/
    * Pipeline implementation for Blue Ocean Plugin –
      https://plugins.jenkins.io/blueocean-pipeline-api-impl
    * Pipeline Maven Integration Plugin –
      https://plugins.jenkins.io/pipeline-maven
 3. Now, go to the Build Tab and enter the details in Root POM and Goals &
    Options. In Root POM, enter the location of the directory where project
    pom.xml is located. We enter clean test in Goals & Options so that a clean
    build is performed.
    * Root POM – < Project-Directory >\pom.xml
    * Goals and Options – clean test
    
    
    
    Post build, if a test report is required, you can add the relevant ‘Add
    post-build step’ in the Post Steps tab.

 4. Click on Apply and Save. Click on Build Now (or choose the same project from
    ‘Open Blue Ocean’) to start the build process.

As seen in the Console Logs, the test was executed successfully.

[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @
org.selenium4.CrossBrowserTest --- [INFO] Using 'UTF-8' encoding to copy
filtered resources. [INFO] skip non existing resourceDirectory
C:\Users\Lenovo\IdeaProjects\CrossBrowserTest\src\test\resources [INFO] [INFO]
--- maven-compiler-plugin:3.0:testCompile (default-testCompile) @
org.selenium4.CrossBrowserTest --- [INFO] Changes detected - recompiling the
module! [INFO] Compiling 1 source file to
C:\Users\Lenovo\IdeaProjects\CrossBrowserTest\target\test-classes [INFO] [INFO]
--- maven-surefire-plugin:2.12.4:test (default-test) @
org.selenium4.CrossBrowserTest --- [INFO] Surefire report directory:
C:\Users\Lenovo\IdeaProjects\CrossBrowserTest\target\surefire-reports
------------------------------------------------------- T E S T S
------------------------------------------------------- Running
org.selenium4.CrossBrowserTest Configuring TestNG with:
org.apache.maven.surefire.testng.conf.TestNG652Configurator@299a06ac Starting
ChromeDriver 84.0.4147.30
(48b3e868b4cc0aa7e8149519690b6f6949e110a8-refs/branch-heads/4147@{#310}) on port
39047 Only local connections are allowed. Please see
https://chromedriver.chromium.org/security-considerations for suggestions on
keeping ChromeDriver safe. ChromeDriver was started successfully.
[1595948996.334][WARNING]: Timed out connecting to Chrome, retrying...
[1595949004.487][WARNING]: Timed out connecting to Chrome, retrying... Jul 28,
2020 8:40:15 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO:
Detected dialect: W3C Demonstration of Jenkins is complete Tests run: 1,
Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 94.51 sec Results : Tests run:
1, Failures: 0, Errors: 0, Skipped: 0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @
org.selenium4.CrossBrowserTest ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
C:\Users\Lenovo\IdeaProjects\CrossBrowserTest\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.0:testCompile (default-testCompile) @
org.selenium4.CrossBrowserTest ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to
C:\Users\Lenovo\IdeaProjects\CrossBrowserTest\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @
org.selenium4.CrossBrowserTest ---
[INFO] Surefire report directory:
C:\Users\Lenovo\IdeaProjects\CrossBrowserTest\target\surefire-reports

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.selenium4.CrossBrowserTest
Configuring TestNG with:
org.apache.maven.surefire.testng.conf.TestNG652Configurator@299a06ac
Starting ChromeDriver 84.0.4147.30
(48b3e868b4cc0aa7e8149519690b6f6949e110a8-refs/branch-heads/4147@{#310}) on port
39047
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for
suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
[1595948996.334][WARNING]: Timed out connecting to Chrome, retrying...
[1595949004.487][WARNING]: Timed out connecting to Chrome, retrying...
Jul 28, 2020 8:40:15 PM org.openqa.selenium.remote.ProtocolHandshake
createSession
INFO: Detected dialect: W3C
Demonstration of Jenkins is complete
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 94.51 sec
Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0




ADVANTAGES & SHORTCOMINGS OF JENKINS

We hope this ‘what is Jenkins’ blog helped you in understanding the CI server in
a more practical sense. Before you jump on the Jenkins bandwagon, it is
essential to understand its advantages and shortcomings. We have listed them
down to make the choice easier for you-


ADVANTAGES OF JENKINS

In this section of what is Jenkins tutorial, let’s look at some of the
significant advantages of using Jenkins:

 * Jenkins is open-source and free to use. It is a preferred CI/CD tool by
   early-stage startups as well as large corporations since it has been under
   development since a long time.
 * It is a rich plugin ecosystem. At the time of this article, there were close
   to 1500+ plugins available for use.
 * Jenkins can be integrated with popular cloud platforms such as Amazon EC2,
   Google Cloud, VMWare vSphere, Digital Ocean, and more.
 * Jenkins Pipelines can be extremely useful for realizing CD requirements for
   large-scale projects.


SHORTCOMINGS OF JENKINS

Jenkins also its own share of shortcomings (not necessarily disadvantages).
These are some of the major shortcomings of Jenkins:

 * As a product, Jenkins is more ‘feature’ driven and ‘developer’ centric. Users
   who are obsessed with user interfaces may have to go through a learning curve
   to use Jenkins.
 * Setting changes (including plugin installations) might result in issues such
   as Jenkins not starting up, etc. In such scenarios, you have to search online
   for a solution and fortunately you would find one as Jenkins has a large
   user-base!

Overall, Jenkins is a powerful CI/CD tool that is truly built for developers!


IT’S A WRAP

We appreciate your effort to stay glued to this lengthy ‘what is Jenkins’ blog
and reaching this far! Jenkins is an excellent CI/CD tool that has excellent
functionalities and the best part is that it is free to use. Based on what we
discussed in this what is Jenkins blog, we can conclude that Jenkins has
features that boost release agility by providing CI services.

Jenkins Pipeline is another feature that enhances the offerings of Jenkins, as
it lets you implement a Pipeline as Code using Domain Specific Language (DSL).
Though there are other CI/CD tools in the market, Jenkins thrives on its
community and powerful set of features (particularly Jenkins Pipeline) that
offers faster feedback through CI tools.

Plugins, extensibility, and online community are the core USPs of Jenkins. To
improve the usability and functionality of tools like Jenkins, you can use
cloud-based cross browser testing platforms. One such platform is LambdaTest
that also offers a Jenkins Plugin to accelerate your automated browser testing
activities. With LambdaTest, you can perform tests on 3000+ combinations of
browsers, operating systems, and devices.

Happy Testing!



HIMANSHU SHETH

Himanshu Sheth is a seasoned technologist and blogger with more than 15+ years
of diverse working experience. He currently works as the ‘Lead Developer
Evangelist’ and ‘Senior Manager [Technical Content Marketing]’ at LambdaTest. He
is very active with the startup community in Bengaluru (and down South) and
loves interacting with passionate founders on his personal blog (which he has
been maintaining since last 15+ years).

See author's profile




AUTHOR’S PROFILE


HIMANSHU SHETH

Himanshu Sheth is a seasoned technologist and blogger with more than 15+ years
of diverse working experience. He currently works as the 'Lead Developer
Evangelist' and 'Senior Manager [Technical Content Marketing]' at LambdaTest. He
is very active with the startup community in Bengaluru (and down South) and
loves interacting with passionate founders on his personal blog (which he has
been maintaining since last 15+ years).

BLOGS: 129






Got Questions? Drop them on LambdaTest Community. Visit now

TEST YOUR WEBSITES, WEB-APPS OR MOBILE APPS SEAMLESSLY WITH LAMBDATEST.

 * Selenium, Cypress, Playwright & Puppeteer Testing
 * Real Devices Cloud
 * Native App Testing
 * Appium Testing
 * Live Interactive Testing
 * Smart Visual UI Testing

Book a Demo



RELATED ARTICLES

A Complete Guide To Selenium Page Load Strategy


VIPUL GUPTA

January 23, 2023

4527 Views

16 Min Read

Automation | Selenium WebDriver |

How To Test NodeJS Modules With Mocha [Mocha NodeJS Tutorial]


KAYODE OLUWASEGUN

January 16, 2023

54009 Views

15 Min Read

Selenium JavaScript | Automation |

Playwright vs Selenium vs Cypress: A Detailed Comparison


KAILASH PATHAK

January 12, 2023

74040 Views

57 Min Read

Automation |

Best 15 Test Automation Trends For 2023


MYTHILI RAJU

January 10, 2023

249211 Views

17 Min Read

Automation |

How To Refresh Page Using Selenium C# [Complete Tutorial]


ANDREEA DRANICEANU

January 6, 2023

113848 Views

8 Min Read

Selenium C# | Automation |

How To Write End-To-End Tests Using Cypress App Actions


ENRIQUE



117665 Views

15 Min Read

Cypress Testing | Automation |


 * Book a Demo
 * Call Us
 * Chat with Us Contact Us

 * Help & Support
 * +1-(866)-430-7087
 * support@LambdaTest.com

PRODUCTS & FEATURES

 * Automation Testing
 * Cross Browser Testing
 * Real Device Cloud
 * Mobile App Testing
 * Smart TV testing
 * HyperExecute
 * LT Browser
 * LT Debug
 * Local Page Testing
 * Automated Screenshots
 * Geo-Location Testing
 * Accessibility Testing
 * Responsive Testing
 * Localization Testing
 * Visual Regression Testing
 * Integrations
 * Test Analytics

BROWSER AUTOMATION

 * Selenium Testing
 * Selenium Grid
 * Cypress Testing
 * Playwright Testing
 * Puppeteer Testing
 * Taiko Testing

TEST ON

 * List of Browsers
 * Internet Explorer
 * Firefox
 * Chrome
 * Safari
 * Microsoft Edge
 * Opera
 * Yandex
 * Mac OS
 * Mobile Devices
 * iOS Simulator
 * Android Emulator
 * Browser Emulator

MOBILE APP AUTOMATION

 * Appium Testing
 * Espresso Testing
 * XCUITest Testing

RESOURCES

 * Conferences
 * Blogs
 * Community
 * Certifications
 * Product Updates
 * Newsletter
 * Webinars
 * Videos
 * FAQ
 * Web Technologies
 * Automation Testing Advisor
 * Free Online Tools
 * Sitemap
 * Status

   LEARNING HUB

    * Selenium Tutorial
    * Cypress Tutorial
    * Playwright Tutorial
    * Puppeteer Tutorial
    * Jest Tutorial
    * Mocha Tutorial
    * TestCafe Tutorial
    * Appium Tutorial
    * Espresso Tutorial
    * XCUITest Tutorial
    * More Learning Hubs



COMPANY

 * About Us
 * Careers
 * Customers
 * Press
 * Reviews
 * Community & Support
 * Partners
 * Open Source
 * Write for Us
 * Become an Affiliate
 * Terms of service
 * Privacy Policy
 * Trust
 * Team
 * Contact Us

WHAT’S NEW

 * Changelog

 * Celebrate New Year
 * December ‘22 Updates
 * LambdaTest Year In Review: 2022 Recap
 * Coding Jag - Issue 122
 * Expecting the Unexpected:2023 Technology Trends [Webinar]
 * Whatfix [Case Study]
 * Software Testing [Glossary]
 * Stress Testing Testing [Tutorial]
 * Jasmine Unit Testing [Tutorial]
 * Test managers, start managing now! [Thought Leadership]
 * Playwright vs Selenium vs Cypress: A Detailed Comparison [Blog]
 * Playwright 102 [Certification]

© 2023 LambdaTest. All rights reserved

Cross Browser Testing Cloud Built With For Testers

 * 
 * 
 * 
 * 
 * 
 * 




TRY LAMBDATEST FOR FREE×

See how 1 Million+ QAs and Devs
accelerate their release cycles with
LambdaTest.

Sign up with GoogleSign up with Email
→

Based on 1,000+ reveiws on




×


DOWNLOAD WHITEPAPER

You'll get your download link by email.


GET WHITEPAPER



Don't worry, we don't spam!

X

We use cookies to give you the best experience. Cookies help to provide a more
personalized experience and relevant advertising for you, and web analytics for
us. Learn More in our Cookies policy, Privacy & Terms of service.

Allow Cookie Cancel
✓
Thanks for sharing!
AddToAny
More…