SlideShare ist ein Scribd-Unternehmen logo
1 von 40
Downloaden Sie, um offline zu lesen
Test Pyramid
in an

Android
Agile Project

PORTELA
GHISI

How to balance your android test
suite to have a good feedback,
from units to end-to-end tests.
[	
  

Tests,	
  seriously?	
  It’s	
  a	
  mobile	
  app...	
  

]	
  
15+	
  
Shared	
  codebases	
  
40+	
  
Devs,	
  QAs	
  and	
  Ops	
  	
  
h6p://mar:nfowler.com/bliki/TestPyramid.html	
  
Unit Test
• 

Verify small pieces individually

• 

Run fast

• 

Run a lot of times during development

• 

Feedback instantly

	
  
Feedback	
  
Android?	
  It’s	
  Java,	
  let’s	
  TDD.	
  
Android TDD
Android SDK classes are not trivial
huge	
  API	
  

eyes	
  on	
  docs	
  

java.lang.Run:meExcep:on:	
  Stub!	
  

	
  
test object

result()

assert(expected, obj.result())

Humm,	
  	
  
	
  	
  I’ve	
  seen	
  that..	
  
	
  
The	
  ‘2	
  +	
  2	
  =	
  4’	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  example!	
  	
  
the object u’re looking at

dependencies
getData()

saveSomething()
when(stub.getData()).thenReturn(data)

getData()

saveSomething()
verify(mock).saveSomething()
mock	
  
stub	
  
double	
  
h6p://mar:nfowler.com/ar:cles/mocksArentStubs.html	
  
Unit	
  Tests	
  
with	
  
Dependency	
  	
  
injec:on	
  

Roboguice	
  
DI	
  

Mocks	
  

Robolectric	
  
Android	
  Shadows	
  

jUnit	
  
@Test	
  
Func:onal	
  
Test	
  

UI testing [with full stack]

• 

Tests user flow

• 

BDD, ATDD

• 

*not	
  a	
  strict	
  defini:on	
  

• 

Feedback after a coffee

sounds	
  perfect	
  
business	
  likes	
  that	
  ;)	
  	
  
Cucumber
+
Honeydew
step definitions in Ruby
wraps UIAutomator

]

=

github.com/amplify-­‐educa:on/honeydew	
  

☺
Cucumber	
  feature	
  file	
  
Honeydew	
  steps	
  
why	
  
cucumber?	
  
https://speakerdeck.com/nicholaspufal/why-bdd-is-misunderstood
[	
  

Cool..	
  write	
  as	
  much	
  user-­‐like	
  tests	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  as	
  you	
  can..	
  	
  	
  PERFECT!!	
  

]	
  
Unit	
  tests	
  results	
  history	
  
UI	
  test	
  results	
  history	
  (1)	
  
UI	
  test	
  results	
  history	
  (2)	
  
Slow	
  
Flaky	
  	
  	
  
Costy	
  
Feedback	
  
	
  
the	
  build	
  keeper	
  
some	
  UI	
  tests	
  	
  
Where	
  are	
  you?	
  

h6p://www.mountaingoatsoXware.com/blog/the-­‐forgo6en-­‐layer-­‐of-­‐the-­‐test-­‐automa:on-­‐pyramid	
  
h6p://fabiopereira.me/blog/2012/03/18/introducing-­‐depth-­‐of-­‐test-­‐dot/	
  
backend	
  
external	
  services	
  
libs	
  
API	
  contracts	
  validaJon	
  
PACTO	
  
h6ps://github.com/thoughtworks/pacto	
  
h6ps://speakerdeck.com/marcosccm/evoluindo-­‐ecossistemas-­‐com-­‐consumer-­‐driven-­‐contracts	
  
[	
  

Annnnd..	
  the	
  manual	
  tests?	
  

]	
  
http://blog.kalistick.com/Agile/harden-testing-pyramid/
http://lisacrispin.com/2011/11/08/using-the-agile-testing-quadrants/
Feedback	
  
Thank you! ;)
Questions?
Feedback?
A beer?
PORTELA
@rafaelportela
rportela@thoughtworks.com
GHISI
@thiagoghisi
tghisi@thoughtworks.com

Weitere ähnliche Inhalte

Was ist angesagt?

Presentation_C++UnitTest
Presentation_C++UnitTestPresentation_C++UnitTest
Presentation_C++UnitTest
Raihan Masud
 

Was ist angesagt? (20)

IoT 개발자를 위한 Embedded C에서 Test Coverage를 추출해보자
IoT 개발자를 위한 Embedded C에서 Test Coverage를 추출해보자IoT 개발자를 위한 Embedded C에서 Test Coverage를 추출해보자
IoT 개발자를 위한 Embedded C에서 Test Coverage를 추출해보자
 
Presentation_C++UnitTest
Presentation_C++UnitTestPresentation_C++UnitTest
Presentation_C++UnitTest
 
Unit Testing your React / Redux app (@BucharestJS)
Unit Testing your React / Redux app (@BucharestJS)Unit Testing your React / Redux app (@BucharestJS)
Unit Testing your React / Redux app (@BucharestJS)
 
openCV with python
openCV with pythonopenCV with python
openCV with python
 
Clojure Debugging - Den of Clojure (May '18)
Clojure Debugging - Den of Clojure (May '18)Clojure Debugging - Den of Clojure (May '18)
Clojure Debugging - Den of Clojure (May '18)
 
Front end unit testing using jasmine
Front end unit testing using jasmineFront end unit testing using jasmine
Front end unit testing using jasmine
 
Test driving QML
Test driving QMLTest driving QML
Test driving QML
 
STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...
STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...
STAMP, or Test Amplification to DevTestOps service, OW2con'18, June 7-8, 2018...
 
Testing in FrontEnd World by Nikita Galkin
Testing in FrontEnd World by Nikita GalkinTesting in FrontEnd World by Nikita Galkin
Testing in FrontEnd World by Nikita Galkin
 
Test driving-qml
Test driving-qmlTest driving-qml
Test driving-qml
 
Improving your Gradle builds
Improving your Gradle buildsImproving your Gradle builds
Improving your Gradle builds
 
Golang for PHP Developers: Dependency management with Glide
Golang for PHP Developers: Dependency management with GlideGolang for PHP Developers: Dependency management with Glide
Golang for PHP Developers: Dependency management with Glide
 
Why your build matters
Why your build mattersWhy your build matters
Why your build matters
 
Racing car katas Ⅲ - Static Cling
Racing car katas Ⅲ - Static ClingRacing car katas Ⅲ - Static Cling
Racing car katas Ⅲ - Static Cling
 
Unit Testing - The Whys, Whens and Hows
Unit Testing - The Whys, Whens and HowsUnit Testing - The Whys, Whens and Hows
Unit Testing - The Whys, Whens and Hows
 
Eclipse Buildship JUG Hamburg
Eclipse Buildship JUG HamburgEclipse Buildship JUG Hamburg
Eclipse Buildship JUG Hamburg
 
iOS for Android Developers (with Swift)
iOS for Android Developers (with Swift)iOS for Android Developers (with Swift)
iOS for Android Developers (with Swift)
 
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
 
iOS Unit Testing
iOS Unit TestingiOS Unit Testing
iOS Unit Testing
 
Debugging tricks you wish you knew - Tamir Dresher
Debugging tricks you wish you knew  - Tamir DresherDebugging tricks you wish you knew  - Tamir Dresher
Debugging tricks you wish you knew - Tamir Dresher
 

Ähnlich wie Test pyramid in an Android Agile Project - TDC2013

Testing and Building Android
Testing and Building AndroidTesting and Building Android
Testing and Building Android
Droidcon Berlin
 
Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)
Babul Mirdha
 

Ähnlich wie Test pyramid in an Android Agile Project - TDC2013 (20)

Testing and Building Android
Testing and Building AndroidTesting and Building Android
Testing and Building Android
 
Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)
 
Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?
 
Mastering the NDK with Android Studio 2.0 and the gradle-experimental plugin
Mastering the NDK with Android Studio 2.0 and the gradle-experimental pluginMastering the NDK with Android Studio 2.0 and the gradle-experimental plugin
Mastering the NDK with Android Studio 2.0 and the gradle-experimental plugin
 
Test-Driven Development In Action
Test-Driven Development In ActionTest-Driven Development In Action
Test-Driven Development In Action
 
Tdd is not about testing (OOP)
Tdd is not about testing (OOP)Tdd is not about testing (OOP)
Tdd is not about testing (OOP)
 
Android Building, Testing and reversing
Android Building, Testing and reversingAndroid Building, Testing and reversing
Android Building, Testing and reversing
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
 
Grails unit testing
Grails unit testingGrails unit testing
Grails unit testing
 
Coding Naked 2023
Coding Naked 2023Coding Naked 2023
Coding Naked 2023
 
Testing of React JS app
Testing of React JS appTesting of React JS app
Testing of React JS app
 
NET Code Testing
NET Code TestingNET Code Testing
NET Code Testing
 
Testing on Android
Testing on AndroidTesting on Android
Testing on Android
 
Android TDD
Android TDDAndroid TDD
Android TDD
 
Tdd is not about testing (C++ version)
Tdd is not about testing (C++ version)Tdd is not about testing (C++ version)
Tdd is not about testing (C++ version)
 
Testing with Express, Mocha & Chai
Testing with Express, Mocha & ChaiTesting with Express, Mocha & Chai
Testing with Express, Mocha & Chai
 
Binary Studio Academy: .NET Code Testing
Binary Studio Academy: .NET Code TestingBinary Studio Academy: .NET Code Testing
Binary Studio Academy: .NET Code Testing
 
Stopping the Rot - Putting Legacy C++ Under Test
Stopping the Rot - Putting Legacy C++ Under TestStopping the Rot - Putting Legacy C++ Under Test
Stopping the Rot - Putting Legacy C++ Under Test
 
[Ultracode Munich #4] Short introduction to the new Android build system incl...
[Ultracode Munich #4] Short introduction to the new Android build system incl...[Ultracode Munich #4] Short introduction to the new Android build system incl...
[Ultracode Munich #4] Short introduction to the new Android build system incl...
 
The real beginner's guide to android testing
The real beginner's guide to android testingThe real beginner's guide to android testing
The real beginner's guide to android testing
 

Mehr von Thiago Ghisi

QA Reviews, Kick-offs e Desk Checks por estória: três práticas que podem prev...
QA Reviews, Kick-offs e Desk Checks por estória: três práticas que podem prev...QA Reviews, Kick-offs e Desk Checks por estória: três práticas que podem prev...
QA Reviews, Kick-offs e Desk Checks por estória: três práticas que podem prev...
Thiago Ghisi
 
Introdução a testes automatizados
Introdução a testes automatizadosIntrodução a testes automatizados
Introdução a testes automatizados
Thiago Ghisi
 
ExpertsGoToWeb: Shell para desenvolvimento de sistemas especialistas na web
ExpertsGoToWeb: Shell para desenvolvimento de sistemas especialistas na webExpertsGoToWeb: Shell para desenvolvimento de sistemas especialistas na web
ExpertsGoToWeb: Shell para desenvolvimento de sistemas especialistas na web
Thiago Ghisi
 

Mehr von Thiago Ghisi (7)

Agile não é pra todo mundo: os desafios não técnicos
Agile não é pra todo mundo: os desafios não técnicosAgile não é pra todo mundo: os desafios não técnicos
Agile não é pra todo mundo: os desafios não técnicos
 
The Test Pyramid
The Test PyramidThe Test Pyramid
The Test Pyramid
 
Honeydew: a Ruby driver for UIAutomator which enables automated testing of An...
Honeydew: a Ruby driver for UIAutomator which enables automated testing of An...Honeydew: a Ruby driver for UIAutomator which enables automated testing of An...
Honeydew: a Ruby driver for UIAutomator which enables automated testing of An...
 
QA Reviews, Kick-offs e Desk Checks por estória: três práticas que podem prev...
QA Reviews, Kick-offs e Desk Checks por estória: três práticas que podem prev...QA Reviews, Kick-offs e Desk Checks por estória: três práticas que podem prev...
QA Reviews, Kick-offs e Desk Checks por estória: três práticas que podem prev...
 
Introdução a testes automatizados
Introdução a testes automatizadosIntrodução a testes automatizados
Introdução a testes automatizados
 
DojoTuba 01
DojoTuba 01DojoTuba 01
DojoTuba 01
 
ExpertsGoToWeb: Shell para desenvolvimento de sistemas especialistas na web
ExpertsGoToWeb: Shell para desenvolvimento de sistemas especialistas na webExpertsGoToWeb: Shell para desenvolvimento de sistemas especialistas na web
ExpertsGoToWeb: Shell para desenvolvimento de sistemas especialistas na web
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
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
 

Kürzlich hochgeladen (20)

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
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
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
 
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
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
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
 

Test pyramid in an Android Agile Project - TDC2013