Git Hub
Git Hub
framework in one place .so that it can be shared easily with multiple engineers
working on the same project in different location.
Advantages:
1.De-centralised repository
2.cloud repository
6.Master copy of the frame work available in github,so that we can perform batch
execution any time easily.
1>GitHUb--server
2)Git client
a.git desktop
b.git bash
c.git Gui
d.E-git
Q. How to store existing Project (Framework) in to Git? (How Frame work
developer put the frame work in Github for the first time)
Select the project [right click] team push brand master click
provide github 'url' & UN & PW click on check box ‘store in secure Store
click on next click on force over right check box then click next -next -next(ok) &
finish .
Q. How to get the framework from github global rep to Local System(importing
or cloning)
How to get the framework from github global repository to local system
go to eclipse file import click & expand git folder select & click project
from git next select on clone URI and click next
provide git url,un & password click on next,and next.(by default master will be
selected in the checkbox)click next(local repository folder name will be choosen by
the syatem by default)next and .finish.
<<A HREF>>
== ==
Maven
It is a popular open source build creating and testing tool used by developers and
automation test engineers.
Dependency is a feature available in Maven which is used to connect global repository automatically and download all
the jars into local repository and eclipse project as well.
In order to handle dependency go to pom.xml file inside maven project and write dependency code for all the jars like
TestNG,WebDriver,apache Poi and surefire plugin for running testing.xml inside pom.xml file
== ==
<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>Elf</groupId>
<artifactId>Elf</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.14.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.17</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.7</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.21.0</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
</plugins>
</build>
</project>
Maven command Line Pulgin: It is a plugin which is used to handle maven project in command line.
In order to handle maven project in command line ,we should follow maven build life cycle.
mvn validate validate the project and download the all the jar (dependency)
Click on apache-Maven-3.6.3-bin-zip
Set the Path of Maven as shown below (2 types of path should be set)
Go inside the folder & copy the bin location (including the bin) c:\Selenium.ocmm-32\apache-maven-3.6.1\bin>
Go to local system environment variable window -edit the “path” in system variable & paste the location of the apache
Maven bin folder ‘;’ after this
JAVA-HOME=c:\programfiles\Java\Jdk1.8.0-51
NOTE: In order to check Maven installation ->go to command line &check (Type) mvn -Version .
In order to execute go to the location where pom.xml is present and open the command prompt and type mvn test for
executing all the test case.
EX : E:\sandeep\eclipse-workspace\seleniumExp\Actitime1>mvn test
== ==
Jenkins is a popular Open Sources CI & CD Tool which is used by developer & Automation test Engineers.
-> In case of developement Jenkins will be used to continuos developement - It means whenever developement
of source code is completed Jenkins automatically get the source code from the github & create a build, then
install the build in testing environment,staging and production environment automatically..
In case of automation Jenkin will be used for continous integration, It means jenkins continuosly monitors the
build (Framewrork)in git Location. Then Automatically starts the execution based on configuration of the
Jenkins(or whenever there is change ).
iii) Pole SCM execute based on keeps on monitor the git or build
(means Monitors the build in Github then automatically executes whenever there is a change in the framework).
Advantage of Jenkins-->
i)Monitor the build system or is location then execute testscripts- When ever New Build or arrive & send out the
email Notification.
ii)Monitors the build in Git Location then send out an email if build fails(if modification,addition,deletion done)
===================================================
Steps to install Jenkins:-
4)unzip the file, then double click on exe. file& install the jenkins.
6)password—go to--programfile/jenkins/secrets/intialpassword-
=============================================================
In Order to create Maven Project in Jenkins we should mandatory install below plugin
->In Order to install above plugin go to jenkin menu & click on manage Jenkin-> then click on Manage Plugin
Note:- In order to download Maven From Git location & execute Maven Project in Jenkin Server.
===========================================================
->Go to Jenkins & click on Manage Jenkins-> Click On global tool congiguration-> Add JDK->Name-
>Java_Home path of JDK with bin(till bin).
->go to Maven
Name:Maven_Home
Maven_Home:C:Selenium\....\Pom.xml
=========================================================================
====
1) [Add JDK] [Go to (Global Tool Configuration) and click add jdk]
[ADD MAVEN]
Path to Git Executable: C:/program files/Git/bin/git.exe(This is not in system variable(or)Local System only .A
jenkins)
3)Git Variable
=============================================================
| | | | |---Aug/23/2019(5-
friday)9.04pm(or 21.04)
(0-59) Month
(1-31)
Poll SCM:- * * * * *->Executes when ever any one changes the frame work in the github
================================================================
Step1:-> New Item-> Select Maven project -> get Inside Project->Click on configure-> click on git & provide
path of repository from clone.
or
=======================================================
1)Login to jenkins,click on New Item and select maven project and provide the name for the project & click on ok.
2)Provide a project description, select github project & provide github project url.
credentials.
1)Login to jenkins, select the project ->click on configure ->select build periodically checkbox & put schedule in
5* pattern.
Note:[Under Build and Root POM]: \git Project Name\POM.xml(ex: \SDET Project\POM.xml )
1)Login to jenkins-> select the project -> click on configure ->under Build settings, provide a recipient mail
address and click on save...