12.1 Appium Installation (Jenkins)

12.1 Appium Installation (Jenkins):
Jenkins is a free and open source automation server. Jenkins helps to automate the non-human part of the software
development process, with continuous integration and facilitating technical aspects of continuous delivery. It is a
server-based system that runs in servlet containers such as Apache Tomcat.
1. Run Jenkins.war from downloaded folder using cmd command:
e.g. cd C:\Users\xxxxx\Downloads\java -jar jenkins.war -httpPort=8080

2. Open your browser and enter http://localhost:8080/.
3. login with valid credentials.

4. After login you will see Jenkins Dashboard and wher click on manage jenkins

5. Click on Global tool configuration. Global configuration is like system variables on local machine

6. Click on JDK and then add Name and JAVA_HOME Path


7. Scroll down to Maven and click on maven installations. Add Name and Maven Home.


8. Click on Save button.
9. Click on New Item for New Job.
10. Enter item name and select freestyle project and then click on OK button

11. In order to run project from local click on advanced button in general tab


12. Mark Use custom workspace as check and in directory name add
$(JENKINS_HOME)/Mavenjava


13. In your local machine add Maven project folder using path.
C:\Users\mharis\.jenkins


10. In order to pass pom.xml, scroll to build tab and click on invoke top-level maven targets option.
11. Select Maven Versions and add command to run maven test in Goals field in Jenkins is:
test -Psuiteid
e.g. test -PSanity

12. Click on Save button and in order to run a build click on Build Now option.
13. The build will start and after it is done click on it and then click on console output option.

14.  Now to run project using Github then integrates Github using plugin. Add repository link from Github in specified field 


c. Create new public repository in GitHub as shown below.


d. After push on GitHub copy the repository link.







                                             e. Paste repository link in Jenkins Job configuration as shown below.



                                                          f. In Pre steps add, pom.xml and job goals as shown below.






g. Now, Save and apply.
15. Open Global configuration tool of Jenkins and adds the following:
i. JDK path
II. Maven plugin path.
iii. Allure plugin path 
View Allure on the plugin site for more information. This plugin allows to automatically generate Allure Report and attach it to build during Jenkins job run. Plugin builds are located here: https://ci.qameta.io/job/allure-plugin.



Cross check git path:



16. Pre-steps and build:

17. Post-build for allure results

And then apply and save. 

No comments:

Post a Comment

Cypress from beginning