Jenkins Overview for Continuous Testing
Aug 16, 2023
Jenkins Overview for Continuous Testing
For Technical Support and QA Related training’s and Job openings, join Obsqura WhatsApp Group https://chat.whatsapp.com/DLq1X0223aM … Our Mission is to help you to develop a Data-Driven Framework test automation framework from scratch. We are currently providing Online Selenium Test Automation training for working professionals across the globe. Thereby you could upscale your technical skills and climb your career ladder. For more details about the Online Selenium training, please feel free to reach us at +91-8078116766 or write to us at [email protected] . Do visit us at www.obsqurazone.com Follow us on Facebook: https://www.facebook.com/obsqurazone/ LinkedIn : https://www.linkedin.com/in/obsqurazone Instagram: https://www.instagram.com/obsqura_z
Content
0.4 -> let's talk about uh jenkins so what
is jenkins so why it is required
7.36 -> so let's uh we already discussed stability
is something that is very important in agile
12.56 -> and how it is connected with the jenkins or why
do you want this tool so i will uh so i'll come
21.04 -> to that so basically what is jenkins jenkins is
an orchestration tool orchestration tool which
28.32 -> connects different technologies or different
tools in a single platform so why it is used
34.96 -> this tool is used to handle the continuous
delivery pipelines of every every project so
43.36 -> every organization will be having their own cacd
tool typically jenkins is one of the popular tool
50.08 -> so we have other options like git club is another
option so bamboo is another option so these are
56.56 -> some of the tools available so what exactly we
can perform with this tool so there are a lot of
62.48 -> tools if you look at any project you'll be using
different kinds of tools for various purpose for
68.4 -> code and commit there will be a lot of tools used
whether it can be visual studio eclipse intellij
74.72 -> or whatever so there will be built-in
configuration tools there will be uh scanning
80 -> and monitoring tools so sometimes there will
be tools for monitoring the status of different
86.88 -> servers or different services that is running
in your application or running in your project
92.48 -> so there will be release management tools or for
managing releases there are different tools used
98.32 -> so there are tools for the deployment or or
to get the released under different tools
104.8 -> so these tools can be indicated in a single
platform so let me tell you one simple example
113.04 -> okay so most of the tech games like um
amazon uh google or facebook you can see
120.8 -> they they continuously make changes to their
application and you can see uh if you're using
126.8 -> a smartphone you can see most of the apps there
you'll get notifications okay there is an update
133.04 -> okay so it is getting updated continuously or
these tech gains are continuously making changes
139.76 -> to their applications so they're releasing
the changes or reaching their functionalities
144.64 -> so how is it made possible of course it is it
can be made possible but how can we maintain
150.48 -> that quality so in order to maintain quality so
you have to indicate several tools and check that
157.2 -> whether the the end outcome or the end product
is having quality or not so this is taken care by
164.32 -> ccd tools okay so um let's have a quick demo how
so let's think from automation perspective so we
174.4 -> talked about lot of tools so from as an automation
in here you don't need to understand or you need
180.4 -> to get expertise on these tools but what i need
to understand is how automation is connected with
185.92 -> jenkins so let's say um you're having your uh
so let's say let's take a very simple example
194 -> imagine you are having a your project team is
building a web application and and the developers
200.48 -> are making the changes or the development has
developers have created some functionalities
206 -> and they are going to push their code from the
development environment to testing environment
212.72 -> to perform testing okay so here uh if you are
having automation okay you can say okay you
220.08 -> can say hey jenkins uh run the smog suit and check
whether the quality is good or not so jenkins what
228.32 -> it does whenever the developer push their changes
from the development environment to testing
235.36 -> the tests the smart test will be triggered so the
small text will run and what will be the result
241.68 -> if the result is passed okay it will continue to
deploy the code if it is a failure what happens
248.64 -> it will uh it will stop the deployment and will
say okay this it will it so you will send the
255.12 -> information to the developers saying okay this
code has got serious problems you have to fix it
260.88 -> so developers will continuously make changes like
this let's say if you're having a regression suit
266.56 -> and uh you know the code is uh available in
qa environment you can tell jenkins to run the
273.52 -> regression suit maybe in a in a freaking
manner or in a nightly basis and you can
279.44 -> intimidate the entire team okay whether the test
fields or the functionalities are good or not
285.76 -> so this will help to give a real time feedback
about the quality of your application so that is
292.24 -> exactly what jenkins does in uh from a testing
perspective or from an automation perspective
304.96 -> so now let's see um so i have started jenkins
in my um jenkins instance in my local machine
312.88 -> so of course uh in a typical uh enterprise
environment you will be having that in a server
319.04 -> but right for now i created uh how started
the instance in my locker machine for the
323.84 -> demonstration and we have created a project the
same bdd hyphen project we have created here
331.2 -> so let's look and see what exactly we have
configured here so so once you open the project
339.68 -> you can find a configuration configure option at
the in the left pane so once you click on that
346.16 -> you can see okay you can see uh yeah so you can
see the details what exactly is configured here
354.4 -> so let's just look into that one by one so
there is another option where you can give
358.72 -> the basic details about the project
so and there are a few other options
364.56 -> okay so uh the next option is source code
management so this is extremely important so
371.6 -> source code management uh as we talked earlier so
our code is there in the github okay so whatever
378.64 -> joke that jenkins is going to perform that will be
typically happening uh by connecting to the github
386.16 -> okay so we have to give the github url and uh
the credentials which we need to connect to the
393.92 -> github okay so and also uh so we have given the
repository url and the credentials here and also
402.32 -> the branch which we need to women uh trigger
so which you need to use so now next thing is
409.44 -> uh build triggers so right now we have created
a project inside jenkins so we have to tell
415.84 -> jenkins okay what when this project needs to be
triggered so that is called as a build trigger
422.56 -> so there are different options by which we can
trigger the execution from jkins so you can see
430.32 -> you can trick it remotely from scripts
if you are using any uh scripts you can
435.44 -> trigger it remotely using that and also you
have the options to um to periodically run
441.6 -> that so what is what is a periodic run so say
for example if you want to run your scripts
447.2 -> on a nightly basis or or in every wednesday
if you are run the regression you can click
452.8 -> on that uh build periodic uh option periodically
student okay so there is another option for uh
459.92 -> paul scm so this it will call source control
management system like um here we are using github
469.28 -> so it will continuously check the github and check
what whether there is any changes happening to
475.84 -> the repository if it identifies a change has
happened it will trigger the script based on
481.28 -> that so these are some of the different ways
by which you can handle triggers from jenkins
488.72 -> and similarly uh we have built environments
if you have any environments we can suspect
495.04 -> here now there is a build option so basically
we are using a maven project so we have added
502.8 -> a build command here so here clean install
is a maven command which is required to
510.16 -> do the execution or to perform the
execution so that you can update it here now
518.48 -> so this is basically a part of maven
gods this is available as a player game
522.88 -> now uh we have possible directions pause build
actions means what you want to perform once the
530.96 -> build operation is completed say for example as
we are dealing with the automation framework once
536.8 -> the automation run is completed we'll get the
report will the report will be generated in a
542.24 -> particular folder so we can say jenkins to copy
the folder to some location to archive that and
549.36 -> keep it for later reference so these are the some
of some of the options which you can ah you can do
558.48 -> okay so you can uh you can also um add the
generated report folder uh to archive to some
566.8 -> location or you can add if
you are using junit you can
570.64 -> export the junit result you can configure it
here other plugins are available for integrating
576.56 -> testing g another thing is email notification
so let's say if once the jgin's run is completed
584.56 -> if you want to intimidate the
entire team about the status of this
589.2 -> the quality run or this execution we can configure
the email here so you can say okay uh if that test
596.56 -> script well you can intimidate the team saying
that okay so the the bill has got some problem and
602.8 -> these are the reports so this kind of email
notifications can be configured uh from jenkins
611.2 -> okay so so let's go back to the project view
and let's trigger the the project so the jenkins
621.2 -> project which we have created so typically so once
you open the project the left pane you can see
629.52 -> an option to build built now so once you click
on that you can see here uh the build has started
637.92 -> okay so it is progressing on the left side we
can see a console output where so you can see
646.32 -> the sequence sequence of events that are happening
okay so first of all it will try to connect to the
652.64 -> github and it will check out the code into
the machine where the execution happens
660.88 -> so it will compare it it's the same code
that you have previously executed it will
666.08 -> connect to the github repository so here you
can see the maven command that we are using
670.4 -> clean install so it will it will if
the dependencies are not available it
675.76 -> will download the dependencies from
maven in order to build the project
685.52 -> so basically jenkins support a lot of
tools there are a lot of plugins available
691.12 -> in uh in the seconds jenkins marketplace
okay here you can see the regression tab
697.04 -> okay so it is executing the same regression
scenarios which we have executed previously
707.04 -> so as i said earlier there are a lot of
710.4 -> the plugins which you can
try to integrate with jenkins
732 -> so you can you can go for headless mode of
execution if you want you can configure that
736.8 -> in the jenkins so right now you can see the ui if
740.24 -> you're going with headless mode
you'll not see the chrome opening
753.92 -> so once the execution is completed what it does it
will uh so we have configured to copy the report
761.28 -> okay we have configured to copy the html report
and keep it for reference so what you have done
768.96 -> once the execution is completed will go back
and check whether the report has copied or not
775.76 -> at any point of time say for example if you look
if you are the oxygen is already completed if you
782.56 -> want to look later okay you can go and check the
build number and you can navigate to the results
788.88 -> so you can find the reports from there okay now
the build is successful so now um now let's go
796.16 -> back to the the project view and see where the
report has been generated and how to view that
820.56 -> okay let's refresh the url
827.6 -> okay so go back to the project so
here you can see um the build number
834.88 -> and in the results section you can see
workspace okay click on the workspace you
839.44 -> can see oh yeah there is a target folder
where we have the report to click on the
845.84 -> the folder you can see generated hyphen
reports where we have the html report okay
852.64 -> so this report you can either read from here
or you can download this as a zip file okay so
859.28 -> now right now we'll download the file to the local
machine okay so the file is getting downloaded
869.44 -> and you can you can unzip the folder and just
open the folder you can see the html file
Source: https://www.youtube.com/watch?v=V0JUtBUjrTk