SlideShare ist ein Scribd-Unternehmen logo
1 von 8
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)
Dennys Hsieh
 

Was ist angesagt? (20)

Continuous integration in games development
Continuous integration in games developmentContinuous integration in games development
Continuous integration in games development
 
Automation Testing
Automation TestingAutomation Testing
Automation Testing
 
GitHub Actions for 5 minutes
GitHub Actions for 5 minutesGitHub Actions for 5 minutes
GitHub Actions for 5 minutes
 
[English][Test Girls] Zero to Hero: Start Test automation with Cypress
[English][Test Girls] Zero to Hero: Start Test automation with Cypress[English][Test Girls] Zero to Hero: Start Test automation with Cypress
[English][Test Girls] Zero to Hero: Start Test automation with Cypress
 
Let’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkinsLet’s start Continuous Integration with jenkins
Let’s start Continuous Integration with jenkins
 
Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)Continuous Integration (Jenkins/Hudson)
Continuous Integration (Jenkins/Hudson)
 
Continuous Delivery for Front-End Engineers
Continuous Delivery for Front-End EngineersContinuous Delivery for Front-End Engineers
Continuous Delivery for Front-End Engineers
 
Welcome to Jenkins
Welcome to JenkinsWelcome to Jenkins
Welcome to Jenkins
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
 
Setup Build & Deploy with Jenkins CI
Setup Build & Deploy with Jenkins CISetup Build & Deploy with Jenkins CI
Setup Build & Deploy with Jenkins CI
 
Jenkins Pipelining and Gatling Integration
Jenkins Pipelining and  Gatling IntegrationJenkins Pipelining and  Gatling Integration
Jenkins Pipelining and Gatling Integration
 
Jenkins presentation
Jenkins presentationJenkins presentation
Jenkins presentation
 
Testing desktop apps with selenium
Testing desktop apps with seleniumTesting desktop apps with selenium
Testing desktop apps with selenium
 
Using CI for continuous delivery Part 1
Using CI for continuous delivery Part 1Using CI for continuous delivery Part 1
Using CI for continuous delivery Part 1
 
Fastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS AppsFastlane - Automation and Continuous Delivery for iOS Apps
Fastlane - Automation and Continuous Delivery for iOS Apps
 
Jenkins CI presentation
Jenkins CI presentationJenkins CI presentation
Jenkins CI presentation
 
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
 
Introduction to jenkins
Introduction to jenkinsIntroduction to jenkins
Introduction to jenkins
 
Automated-Testing-inside-containers
Automated-Testing-inside-containersAutomated-Testing-inside-containers
Automated-Testing-inside-containers
 
Graphql usage
Graphql usageGraphql usage
Graphql usage
 

Andere mochten auch

Andere mochten auch (7)

Continous UI testing with Espresso and Jenkins
Continous UI testing with Espresso and JenkinsContinous UI testing with Espresso and Jenkins
Continous UI testing with Espresso and Jenkins
 
Testing android apps with espresso
Testing android apps with espressoTesting android apps with espresso
Testing android apps with espresso
 
Ui testing with espresso
Ui testing with espressoUi testing with espresso
Ui testing with espresso
 
Android Espresso
Android EspressoAndroid Espresso
Android Espresso
 
Espresso testing
Espresso testingEspresso testing
Espresso testing
 
Automated UI Testing Frameworks
Automated UI Testing FrameworksAutomated UI Testing Frameworks
Automated UI Testing Frameworks
 
Packaging Your Story: Social Media for B2Bs
Packaging Your Story: Social Media for B2BsPackaging Your Story: Social Media for B2Bs
Packaging Your Story: Social Media for B2Bs
 

Ähnlich wie Automated android testing using jenkins ci

Jazoon12 355 aleksandra_gavrilovska-1
Jazoon12 355 aleksandra_gavrilovska-1Jazoon12 355 aleksandra_gavrilovska-1
Jazoon12 355 aleksandra_gavrilovska-1
Netcetera
 
Continuos integration for iOS projects
Continuos integration for iOS projectsContinuos integration for iOS projects
Continuos integration for iOS projects
Aleksandra Gavrilovska
 
The Peanut Butter Cup of Web-dev: Plack and single page web apps
The Peanut Butter Cup of Web-dev: Plack and single page web appsThe Peanut Butter Cup of Web-dev: Plack and single page web apps
The Peanut Butter Cup of Web-dev: Plack and single page web apps
John Anderson
 
Using Maven to build Java & Android program
Using Maven to build Java & Android programUsing Maven to build Java & Android program
Using Maven to build Java & Android program
Mu Chun Wang
 

Ähnlich wie Automated android testing using jenkins ci (20)

Jenkins, pipeline and docker
Jenkins, pipeline and docker Jenkins, pipeline and docker
Jenkins, pipeline and docker
 
Jazoon12 355 aleksandra_gavrilovska-1
Jazoon12 355 aleksandra_gavrilovska-1Jazoon12 355 aleksandra_gavrilovska-1
Jazoon12 355 aleksandra_gavrilovska-1
 
Continuos integration for iOS projects
Continuos integration for iOS projectsContinuos integration for iOS projects
Continuos integration for iOS projects
 
Antons Kranga Building Agile Infrastructures
Antons Kranga   Building Agile InfrastructuresAntons Kranga   Building Agile Infrastructures
Antons Kranga Building Agile Infrastructures
 
Performance testing as part of Agile - Continius Delivery solution
Performance testing as part of Agile - Continius Delivery solutionPerformance testing as part of Agile - Continius Delivery solution
Performance testing as part of Agile - Continius Delivery solution
 
Jenkins Pipelines Advanced
Jenkins Pipelines AdvancedJenkins Pipelines Advanced
Jenkins Pipelines Advanced
 
Continuous Delivery - Devoxx Morocco 2016
Continuous Delivery - Devoxx Morocco 2016Continuous Delivery - Devoxx Morocco 2016
Continuous Delivery - Devoxx Morocco 2016
 
RichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesRichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile Devices
 
Riga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationRiga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous Integration
 
Agile Swift
Agile SwiftAgile Swift
Agile Swift
 
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
Jenkins Days - Workshop - Let's Build a Pipeline - Los AngelesJenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
Jenkins Days - Workshop - Let's Build a Pipeline - Los Angeles
 
Jenkins days workshop pipelines - Eric Long
Jenkins days workshop  pipelines - Eric LongJenkins days workshop  pipelines - Eric Long
Jenkins days workshop pipelines - Eric Long
 
The Peanut Butter Cup of Web-dev: Plack and single page web apps
The Peanut Butter Cup of Web-dev: Plack and single page web appsThe Peanut Butter Cup of Web-dev: Plack and single page web apps
The Peanut Butter Cup of Web-dev: Plack and single page web apps
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
Using Maven to build Java & Android program
Using Maven to build Java & Android programUsing Maven to build Java & Android program
Using Maven to build Java & Android program
 
Iac d.damyanov 4.pptx
Iac d.damyanov 4.pptxIac d.damyanov 4.pptx
Iac d.damyanov 4.pptx
 
Continuous Delivery - Voxxed Days Thessaloniki 21.10.2016
Continuous Delivery - Voxxed Days Thessaloniki 21.10.2016Continuous Delivery - Voxxed Days Thessaloniki 21.10.2016
Continuous Delivery - Voxxed Days Thessaloniki 21.10.2016
 
Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!
 
#dddsw - Modernizing .NET Apps with Docker
#dddsw - Modernizing .NET Apps with Docker#dddsw - Modernizing .NET Apps with Docker
#dddsw - Modernizing .NET Apps with Docker
 
Ansible benelux meetup - Amsterdam 27-5-2015
Ansible benelux meetup - Amsterdam 27-5-2015Ansible benelux meetup - Amsterdam 27-5-2015
Ansible benelux meetup - Amsterdam 27-5-2015
 

Kürzlich hochgeladen

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 

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? sb@giantleap.no / sveinungkb Sveinung Kval Bakken