Jenkins Basics

Install Jenkins 
Open Command Prompt and Type"java -jar path of jenkins.war file"
Create account
Use "http://localhost:8080"  to access jenkins

Steps To Demo Jenkins
1)Create Test Project
1a)Right click on java file and TestNG->Convert to TestNG
2)open cmd and go to project folder ex. cd C:\AndroidDemoworkspace\JenkinsAppium
3)Set Classpath ex. set classpath=C:\AndroidDemoworkspace\JenkinsAppium\lib\*;C:\AndroidDemoworkspace\JenkinsAppium\bin;
4)Run Test ex. java org.testng.TestNG testngappium.xml and Check Test Script working or not.
5)Create batch file . Open notepad file -> enter "java -cp bin;lib/* org.testng.TestNG testngappium.xml" and save as 
   "run.bat"

6)Open Jenkins console and login
7)Create new job. Click on Item ->Name of Item, select freestyle project and save it
8)Click on advanced setting and tick custom workspace and enter project path ex. C:\AndroidDemoworkspace\JenkinsAppium, 
   select build with execute Windows batch file , apply and Save it.

9)Build now and click on build history ->console , We will get output

Note:- No UI appears while executing Test case ex browser actions 

Run Test through command Line

    cd C:\AbcAutomation\AbcTestJenkin       // set our Project location
    set classpath=C:\AbcAutomation\AbcTestJenkin\lib\*;C:\AbcAutomation\AbcTestJenkin\bin\example\*;
                    \\ set lib and bin folder path
    java -cp bin;lib/* org.testng.TestNG testng.xml  //execute testng file of project