Vous êtes sur la page 1sur 3

Introduction

 Jenkins is an open-source, continuous integration tool developed by Hudson lab.


 It is cross-platform and can be used on Windows, Linux, Mac OS environments.
 Jenkins is written in Java.
 Jenkin’s usage is to monitor any job which can be SVN checkout or any application states.
 Jenkin’s used to automate the built of your projects at a scheduled time or when a trigger is raised or
when the user requests it.
 The automated, continuous build can help a lot in increasing the productivity and reducing conflicts.

Prerequisites
 Ecllipse with TestNG
 Create XML file and Run Script
 Convert XML file to .bat file
Creating of.bat file
Take a notepad and set the class path for java and selenium jar file and save it with .bat extension
Eg: set classpath=E: \Keerthi\JavaExercise Files\SeleniumAutomation\bin; D:\Softwares\Library*;
java org.testng.TestNG createAcc.xml

Installation and Configuration


1. Go to http://jenkins-ci.org/ and download correct package for your OS.
2. Unzip Jenkins to specified folder and Install Jenkins.
3. Once installation is done, navigate to the Jenkins Dashboard (http://localhost:8080 by default) in the
browser.
4. Now go to Manage Jenkins-> configure system -> set JDK, Maven values as set below.
JDK: Uncheck “install automatically” to get Java_Home field.
Give Jdk name and Java_home as shown below:

5. If you are using Maven Uncheck “install automatically” to get Maven_Home field.
Give Name & Maven_Home path here.
6. Provide the below details for Email Notification:

Now click on “save” & “apply” button

Setup Build
Create Jenkins Project:
1. Go to the Jenkins dashboard and Click on New Item
2. In the next screen, enter the Item name, for example HMS. Choose the ‘Freestyle project option’ and
click OK
3. It will be redirected to configuration page where you can specify the details of the job
4. Now go to Advanced-> Click-on use custom workspace and give the workspace path in directory

Then go to Build and Click-on Execute Windows Batch Command here we needs to .bat file->Click on
Apply and save Buttons

5. Once saved, you can click on the Build Now option and build is scheduled, it will run.
The Build history section shows that a build is in progress.

6. The build is completed, a status of the build will show if the build was successful or not. Click on the #1
in the Build history to bring up the details of the build -> Console Output link to see the details of the
build

Apart from the steps shown above there are just so many ways to create a build job, which makes Jenkins such
a fantastic continuous deployment tool

=========================================================================================

Vous aimerez peut-être aussi