Table of Contents
ABOUT JENKINS:
- Jenkins is a server side application that can be used by Developers, QA engineers, DevOps engineers
- Jenkins is referred to as CI CD CT tool
- CI → Continuous Integration → This is the process where different sets of code written by different dev teams shall be integrated together for integration testing purposes by Jenkins tool. Actors involved in the CI phase are front-end developers, back-end developers.
- CD → Continuous Deployment → This is the process where the Jenkins tool shall automatically deploy the unit testing code which has passed the integration tests from Dev server to the QA server and rejects the failed code so that QA team & Dev team are notified about the deployment status and CI testing status. Actors involved in the CD phase are the DevOps team.
- CT → Continuous Testing → This is the process where the Jenkins tool shall trigger automated tests to execute on the build generated by Jenkins tool using CD and then the passed code shall be deployed to the next env such as UAT env or prod env. Actors involved in the CT phase are QA Engineers.
- CD → Continuous Delivery → This is the process where the Jenkins tool shall deploy the passed code into the production servers for real uses to access the application. Actors involved in the CD phase are the DevOps team
- Jenkins workflow is CI → CD → CT → CD
- Jenkins is built on java
- Prerequisite for Jenkins: Java JDK v11 or v17 or v21 https://www.jenkins.io/doc/book/platform-information/support-policy-java/
- Download java v17 from https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html
- Jenkins is usually installed on servers and not on client machines
- Jenkins tool is used by Developers, QA engineers as well as DevOps teams
- Visit https://www.jenkins.io/ for more details about Jenkins
- Download Jenkins from https://www.jenkins.io/download/
- Download jenkins generic java war package (.war)
- To start jenkins, run the below command from jenkins.war path on your laptop:


java -jar jenkins.war
- In the logs, observe for the UN & PWD and make a note of it [default UN: admin]
- Wait until you see this message ‘Jenkins is fully up & running’

- You can find your jenkins password at this location as well: C:\Users\Kiran\.jenkins\secrets\initialAdminPassword
- To launch jenkins on your browser, visit http://localhost:8080
- Complete the jenkins setup process by entering admin password


- In the next page, click on ‘Install suggested plugins’ and wait until the plugins installation is completed
- In the next screen, Jenkins will prompt you to create another user account. We can click on Skip and continue as admin



- In the next screen, you will see Jenkins configuration details i.e., URL to launch Jenkins tool. Click on Save and Finish

- In the next screen, click on Start using Jenkins

- Now, the user will be taken to the home page of Jenkins where we can create Jenkins job/project to work on Continuous Testing process

- Click on New item → enter the project name → click on Free style project → click on OK → Enter the description (optional) → under ‘Source code management’, select ‘None’ option → enter the cron job as * * * * * → this cron job will run our accessibility test for every 1 minute → see below screenshot
- Use the below build triggers to run the jenkins project automatically

@hourly → this will run jenkins project every 1 hour
@daily → this will run jenkins project once in a day
@weekly → this will run jenkins project once in a week
@monthly → this will run jenkins project once in a month
@yearly → this will run jenkins project once in a year
* * * * * → this will run jenkins project every 1 minute
- Under Build Environment, select ‘Add timestamps to the Console Output’
- Under build steps, select ‘Execute Windows batch command’ → enter the required command based on the tool used for accessibility testing (eg. see below screenshot)→ click on apply → click on save


- Observe that Jenkins will run the job/project as per configured Build Triggers
- Observe the ‘Build history’ → Click on the Build number → Click on Console Output to view the console logs of the automation code test execution



- To trigger emails from Jenkins, configure SMTP email server details in Manage Jenkins → System → Email notification as shown below → The below SMTP details are needed to configure : SMTP server name, User Name, Password, SMTP port number
- Click on ‘Test configuration by sending test email’ to check if the configuration done is working or not
- Configure Post-build actions in Jenkins job → Email notification

