SlideShare uma empresa Scribd logo
1 de 40
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

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

Mais procurados (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
 

Semelhante a 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
 

Semelhante a 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
 

Mais de 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
 

Mais de 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
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+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@
 
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
 
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
 

Último (20)

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
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
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...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
+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...
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
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, ...
 

Test pyramid in an Android Agile Project - TDC2013