SlideShare a Scribd company logo
Sveinung Kval Bakken (sveinungkb)
JavaZone 2011


AUTOMATED ANDROID TESTING USING JENKINS


                            Sveinung Kval Bakken
Why Jenkins/<other CI>?
Automated testing

Unattended build & distribution

Will eventually find the last digit of 


                Sveinung Kval Bakken
Problem




 Sveinung Kval Bakken
Prerequisites
– Install Jenkins
– Install Android SDK
– Install Apache Ant
– Create an Android project
– Add to PATH:
   • <path>android-sdk-windowstools
   • <path>android-sdk-windowsplatform-tools
   • <path>apache-ant-xxbin



                     Sveinung Kval Bakken
Coding: build with ant
• Preparations
  – android update test-project –m <rel.path to main project> –p <path>
  – android update project –p <path>

• Add test runner
• Pull report




                             Sveinung Kval Bakken
Hello Jenkins!
•   Get http://bit.ly/dDXQBy
•   java –jar jenkins.war
•   http://localhost:8080
•   Install «Emma plugin»
•   Create jobs
    – run-tests
    – coverage
    – release

                      Sveinung Kval Bakken
Pull report from device
Change AndroidManifest.xml to:
<instrumentation android:targetPackage="no.glt" android:name="com.neenbedankt.android.test.InstrumentationTestRunner" />



<!– Add to test project’s build.xml after setup task -->
<target name="test-and-pull-report" depends="run-tests">
<property name="test.path.to.report.device" value="/data/data/${tested.manifest.package}/files/TEST-all.xml"/>
<property name="test.path.to.report.local" value="TEST-all.xml"/>
    <echo>Pulling JUnit test report file ${test.path.to.report.device} into local directory ${test.path.to.report.local}</echo>
    <exec executable="${adb}" failonerror="true">
      <arg line="${adb.device.arg}" />
      <arg value="pull" />
      <arg value="${test.path.to.report.device}" />
      <arg value="${test.path.to.report.local}" />
    </exec>
</target>


Add to build.properties:
test.runner=com.neenbedankt.android.test.InstrumentationTestRunner




                                                      Sveinung Kval Bakken
Q&A
  Jobs, projects or questions?
sb@giantleap.no / sveinungkb




           Sveinung Kval Bakken

More Related Content

What's hot (20)

PDF
Automation Testing
RomSoft SRL
 
PPTX
GitHub Actions for 5 minutes
Svetlin Nakov
 
PDF
[English][Test Girls] Zero to Hero: Start Test automation with Cypress
Test Girls
 
PDF
Let’s start Continuous Integration with jenkins
Tomohide Kakeya
 
PPT
Continuous Integration (Jenkins/Hudson)
Dennys Hsieh
 
PDF
Continuous Delivery for Front-End Engineers
Sergey Bolshchikov
 
PDF
Welcome to Jenkins
Somkiat Puisungnoen
 
PDF
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
Troublemaker Khunpech
 
PDF
Setup Build & Deploy with Jenkins CI
walming
 
ODP
Jenkins Pipelining and Gatling Integration
Knoldus Inc.
 
PPTX
Jenkins presentation
Valentin Buryakov
 
PDF
Testing desktop apps with selenium
Filip Braun
 
PDF
Using CI for continuous delivery Part 1
Vishal Biyani
 
PDF
Fastlane - Automation and Continuous Delivery for iOS Apps
Sarath C
 
PPTX
Jenkins CI presentation
Jonathan Holloway
 
PDF
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
CloudBees
 
PPTX
Introduction to jenkins
Abe Diaz
 
PDF
Automated-Testing-inside-containers
Manoj Kumar Kumar
 
PDF
Graphql usage
Valentin Buryakov
 
PDF
Continuous Updating with VersionEye at code.talks 2014
Robert Reiz
 
Automation Testing
RomSoft SRL
 
GitHub Actions for 5 minutes
Svetlin Nakov
 
[English][Test Girls] Zero to Hero: Start Test automation with Cypress
Test Girls
 
Let’s start Continuous Integration with jenkins
Tomohide Kakeya
 
Continuous Integration (Jenkins/Hudson)
Dennys Hsieh
 
Continuous Delivery for Front-End Engineers
Sergey Bolshchikov
 
Welcome to Jenkins
Somkiat Puisungnoen
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
Troublemaker Khunpech
 
Setup Build & Deploy with Jenkins CI
walming
 
Jenkins Pipelining and Gatling Integration
Knoldus Inc.
 
Jenkins presentation
Valentin Buryakov
 
Testing desktop apps with selenium
Filip Braun
 
Using CI for continuous delivery Part 1
Vishal Biyani
 
Fastlane - Automation and Continuous Delivery for iOS Apps
Sarath C
 
Jenkins CI presentation
Jonathan Holloway
 
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
CloudBees
 
Introduction to jenkins
Abe Diaz
 
Automated-Testing-inside-containers
Manoj Kumar Kumar
 
Graphql usage
Valentin Buryakov
 
Continuous Updating with VersionEye at code.talks 2014
Robert Reiz
 

Viewers also liked (7)

PDF
Continous UI testing with Espresso and Jenkins
Sylwester Madej
 
PPTX
Testing android apps with espresso
Édipo Souza
 
PDF
Ui testing with espresso
Droidcon Spain
 
PDF
Android Espresso
Armando Picón Z.
 
PDF
Espresso testing
vodqancr
 
PDF
Automated UI Testing Frameworks
TestObject - Mobile Testing
 
PDF
Packaging Your Story: Social Media for B2Bs
The Espresso Group
 
Continous UI testing with Espresso and Jenkins
Sylwester Madej
 
Testing android apps with espresso
Édipo Souza
 
Ui testing with espresso
Droidcon Spain
 
Android Espresso
Armando Picón Z.
 
Espresso testing
vodqancr
 
Automated UI Testing Frameworks
TestObject - Mobile Testing
 
Packaging Your Story: Social Media for B2Bs
The Espresso Group
 
Ad

Similar to Automated android testing using jenkins ci (20)

PPTX
Building High Quality Android Applications
Leif Janzik
 
PPTX
Instrumentation 101
Apkudo
 
PDF
Cracking android app. Мокиенко Сергей
Alina Dolgikh
 
PPTX
Android developer's toolbox
Alex Verdyan
 
PDF
Testing With Open Source
Matthias Käppler
 
PDF
Android Automation Using Robotium
Mindfire Solutions
 
PPTX
Android testing
JinaTm
 
PPTX
Continuous Mobile - Testing Using Jenkins - A How To Guide
KeynoteSystems
 
PPTX
Continuous Mobile Testing Using Jenkins - A How To Guide
KeynoteSystems
 
PPTX
Android testing
Bitbar
 
PDF
Testing on Android
Ari Lacenski
 
PPTX
Android Apps Testing in 2019
Ivan Katunou
 
PDF
Testing Android applications with Maveryx
Maveryx
 
PDF
Android Building, Testing and reversing
Enrique López Mañas
 
PDF
MBLTDev15: Brigit Lyons, Soundcloud
e-Legion
 
PDF
Testing and Building Android
Droidcon Berlin
 
PDF
Testing at the Speed of Mobile: Adopting Continuous Integration with Agile
Keynote Mobile Testing
 
PPTX
CI in the mobile world
Godfrey Nolan
 
PDF
Unit testing on Android (Droidcon Dubai 2015)
Danny Preussler
 
ODP
Testing in Android: automatici, di integrazione, TDD e scenari avanzati
Alfredo Morresi
 
Building High Quality Android Applications
Leif Janzik
 
Instrumentation 101
Apkudo
 
Cracking android app. Мокиенко Сергей
Alina Dolgikh
 
Android developer's toolbox
Alex Verdyan
 
Testing With Open Source
Matthias Käppler
 
Android Automation Using Robotium
Mindfire Solutions
 
Android testing
JinaTm
 
Continuous Mobile - Testing Using Jenkins - A How To Guide
KeynoteSystems
 
Continuous Mobile Testing Using Jenkins - A How To Guide
KeynoteSystems
 
Android testing
Bitbar
 
Testing on Android
Ari Lacenski
 
Android Apps Testing in 2019
Ivan Katunou
 
Testing Android applications with Maveryx
Maveryx
 
Android Building, Testing and reversing
Enrique López Mañas
 
MBLTDev15: Brigit Lyons, Soundcloud
e-Legion
 
Testing and Building Android
Droidcon Berlin
 
Testing at the Speed of Mobile: Adopting Continuous Integration with Agile
Keynote Mobile Testing
 
CI in the mobile world
Godfrey Nolan
 
Unit testing on Android (Droidcon Dubai 2015)
Danny Preussler
 
Testing in Android: automatici, di integrazione, TDD e scenari avanzati
Alfredo Morresi
 
Ad

Recently uploaded (20)

PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
Advancing WebDriver BiDi support in WebKit
Igalia
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
July Patch Tuesday
Ivanti
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Advancing WebDriver BiDi support in WebKit
Igalia
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 

Automated android testing using jenkins ci

  • 1. Sveinung Kval Bakken (sveinungkb) JavaZone 2011 AUTOMATED ANDROID TESTING USING JENKINS Sveinung Kval Bakken
  • 2. Why Jenkins/<other CI>? Automated testing Unattended build & distribution Will eventually find the last digit of Sveinung Kval Bakken
  • 4. Prerequisites – Install Jenkins – Install Android SDK – Install Apache Ant – Create an Android project – Add to PATH: • <path>android-sdk-windowstools • <path>android-sdk-windowsplatform-tools • <path>apache-ant-xxbin Sveinung Kval Bakken
  • 5. Coding: build with ant • Preparations – android update test-project –m <rel.path to main project> –p <path> – android update project –p <path> • Add test runner • Pull report Sveinung Kval Bakken
  • 6. Hello Jenkins! • Get http://bit.ly/dDXQBy • java –jar jenkins.war • http://localhost:8080 • Install «Emma plugin» • Create jobs – run-tests – coverage – release Sveinung Kval Bakken
  • 7. Pull report from device Change AndroidManifest.xml to: <instrumentation android:targetPackage="no.glt" android:name="com.neenbedankt.android.test.InstrumentationTestRunner" /> <!– Add to test project’s build.xml after setup task --> <target name="test-and-pull-report" depends="run-tests"> <property name="test.path.to.report.device" value="/data/data/${tested.manifest.package}/files/TEST-all.xml"/> <property name="test.path.to.report.local" value="TEST-all.xml"/> <echo>Pulling JUnit test report file ${test.path.to.report.device} into local directory ${test.path.to.report.local}</echo> <exec executable="${adb}" failonerror="true"> <arg line="${adb.device.arg}" /> <arg value="pull" /> <arg value="${test.path.to.report.device}" /> <arg value="${test.path.to.report.local}" /> </exec> </target> Add to build.properties: test.runner=com.neenbedankt.android.test.InstrumentationTestRunner Sveinung Kval Bakken
  • 8. Q&A Jobs, projects or questions? [email protected] / sveinungkb Sveinung Kval Bakken