Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Teste no Android. Porque? Como? O que utilizar?
Search
Alex Soares de Siqueira
October 11, 2019
Programming
0
23
Teste no Android. Porque? Como? O que utilizar?
Um breve resumo sobre testes no android, como fazer e o que utilizamos.
Alex Soares de Siqueira
October 11, 2019
Tweet
Share
More Decks by Alex Soares de Siqueira
See All by Alex Soares de Siqueira
Engenharia reversa no android
alexsoaresdesiqueira
0
160
Modularização, porque devemos pensar nisso?
alexsoaresdesiqueira
1
210
Segurança para Android, o que eu preciso saber?
alexsoaresdesiqueira
0
56
Other Decks in Programming
See All in Programming
PHPUnitの限界をPlaywrightで補完するテストアプローチ
yuzneri
0
240
Git Sync を超える!OSS で実現する CDK Pull 型デプロイ / Deploying CDK with PipeCD in Pull-style
tkikuc
4
390
Goで作る、開発・CI環境
sin392
0
270
バイブコーディング超えてバイブデプロイ〜CloudflareMCPで実現する、未来のアプリケーションデリバリー〜
azukiazusa1
2
630
AI駆動のマルチエージェントによる業務フロー自動化の設計と実践
h_okkah
0
250
ソフトウェア設計とAI技術の活用
masuda220
PRO
22
6.1k
MySQL9でベクトルカラム登場!PHP×AWSでのAI/類似検索はこう変わる
suguruooki
1
160
可変変数との向き合い方 $$変数名が踊り出す$$ / php conference Variable variables
gunji
0
200
Porting a visionOS App to Android XR
akkeylab
0
840
High-Level Programming Languages in AI Era -Human Thought and Mind-
hayat01sh1da
PRO
0
910
コーディングエージェント概観(2025/07)
itsuki_t88
0
100
猫と暮らす Google Nest Cam生活🐈 / WebRTC with Google Nest Cam
yutailang0119
0
180
Featured
See All Featured
Bash Introduction
62gerente
613
210k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
750
Agile that works and the tools we love
rasmusluckow
329
21k
Code Reviewing Like a Champion
maltzj
524
40k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.2k
Making the Leap to Tech Lead
cromwellryan
134
9.4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
Scaling GitHub
holman
460
140k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.4k
Transcript
None
Alex Soares Desenvolvedor Android @a.soares.siqueira /alex-soares-siqueira /AlexSoaresDeSiqueira
Teste no android Porque? Como? O que utilizar?
Quantas pessoas aqui escrevem testes para suas aplicações?
None
Porque testar?
Garantir qualidade do código
Entrega de valor ao cliente
Documentação
Teste + android
Testes unitários Locais
Testes unitários locais ⇢ JVM
Testes unitários locais ⇢ JVM ⇢ Regras de negócio
Testes unitários locais ⇢ JVM ⇢ Regras de negócio ⇢
JUnit
Testes unitários locais ⇢ JVM ⇢ Regras de negócio ⇢
JUnit ⇢ Rápido
Testes unitários locais ⇢ JVM ⇢ Regras de negócio ⇢
JUnit ⇢ Rápido ⇢ src/teste/
Como fazer? ⇢ Sufixo Test
Como fazer? ⇢ Sufixo Test ⇢ @Test
Como fazer? ⇢ Sufixo Test ⇢ @Test ⇢ @Before
Como fazer? ⇢ Sufixo Test ⇢ @Test ⇢ @Before ⇢
@After
Como fazer? ⇢ Sufixo Test ⇢ @Test ⇢ @Before ⇢
@After ⇢ [nome do metodo]_[retorno esperado]_[input esperado]
Como fazer? ⇢ Sufixo Test ⇢ @Test ⇢ @Before ⇢
@After ⇢ [nome do metodo]_[retorno esperado]_[input esperado] ⇢ GIVEN WHEN THEN
None
None
None
None
None
None
None
None
None
Testes unitários Intrumentados
Testes unitários instrumentados ⇢ android
Testes unitários instrumentados ⇢ android ⇢ Ui
Testes unitários instrumentados ⇢ android ⇢ Ui ⇢ Espresso
Testes unitários instrumentados ⇢ android ⇢ Ui ⇢ Espresso ⇢
Demorado em relação ao teste local
Testes unitários instrumentados ⇢ android ⇢ Ui ⇢ Espresso ⇢
Demorado em relação ao teste local ⇢ src/androidTest/
Como fazer? ⇢ Sufixo Test
Como fazer? ⇢ Sufixo Test ⇢ Anotações do JUnit
Como fazer? ⇢ Sufixo Test ⇢ Anotações do JUnit ⇢
[ação]_[retorno esperado]
Como fazer? ⇢ Sufixo Test ⇢ Anotações do JUnit ⇢
[ação]_[retorno esperado] ⇢ View -> procure -> Ação
None
None
None
None
None
None
None
None
None
None
Robot Pattern
Robot Pattern
Robot Pattern
Robot Pattern
Robot Pattern
Robot Pattern
Robot Pattern
Robot Pattern
Robot Pattern
Robot Pattern
Robot Pattern
Robot Pattern
Robot Pattern
Framework externos
Frameworks externos
Frameworks externos
Frameworks externos
Frameworks externos
Frameworks externos
Code Coverage
Dedicar um tempo a mais de desenvolvimento garante uma melhor
experiência para o cliente Insight
Quando o teste Passa!!!!!!
Dúvidas?
Muito obrigado! /alex-soares-siqueira /AlexSoaresDeSiqueira
None
Referências Projeto https://github.com/AlexSoaresDeSiqueira/TestSample-TDC Robot Pattern https://jakewharton.com/testing-robots/ GIVEN WHEN THEN https://martinfowler.com/bliki/GivenWhenThen.html
Espresso https://developer.android.com/training/testing/espresso Teste Unitario Local https://developer.android.com/training/testing/unit-testing/local-unit-tests