Thursday, September 25, 2014

Setup Android Test Environment in macmini

 Setup Test Environment in mac
1. Install JDK
2. Install jenkins
3. Install Android studio
4. Install gradle, maven
5. Install firefox, chrome -> disable all warnings, disable auto update
6. Jenkins -> Manage Jenkins -> Manage Plugins -> Install the plugins Android emulator, dashboard view, Email-ext , git, gradle, groovy, Junit attachments, mailer, maven project, selenium plugin
7. Install Virtual Box, Geny motion(Android emulator) and keep the emulator open always
8. Jenkins -> Manage Jenkins -> Configure system
a). Selenium grid port should be 4444
b). Android SDK root should be /Users/Shared/Jenkins/android
c). JDK -> Set JAVA_HOME path /Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home
d). Git -> set path to git executable /usr/bin/git
e). Gradle -> Install automatically
f). Maven -> Set MAVEN_HOME path  /usr/local/apache-maven-3.1.1
g). Extended email Notification
i).  Set SMTP server -> smtp.gmail.com (If you use gmail account to send mails from)
ii). Click use SMTP Authentication -> Enter username and password
9. Setup Selenium Grid: Jenkins -> Selenium Grid -> Configurations -> New Configuration
a). Type -> Custom webdriver node configuration
    i).  Preferred port 5555
    ii). Firefox -> Maximun instances 10
    iii). Chrome -> Maximun instances- 5 , Version- 34.0.1847.116, Chrome binary path-  /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    iv). Add Browser -> Safari -> Maximun instances- 5 , Version- 6.0.5
b) Jenkins -> Selenium Grid -> Hub Management -> Restart
10. To get customised emails, follow the below steps while confiuring the job
a). Editable email Notification section -> Content Type -> HTML
b). Editable email Notification section -> Default Content-> ${SCRIPT, template="custom_final.groovy"}
Jenkins will refer the template in the path /Users/Shared/Jenkins/Home/email-templates/custom_final.groovy
You can use the above template to receive customised mails.
b). Editable email Notification section -> Attchments ->  **/target/surefire-reports/emailable-report.html
11. Configure jobs to point to git repo git@git.com:YourRepository.git and under Build keep Root POM as parameterisedpom.xml
12. Make Build trigger to build periodically "15 7 * * * " this build the job at 7.15 am everyday.

No comments:

Post a Comment