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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Alex Soares de Siqueira
October 11, 2019
Programming
0
28
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
190
Modularização, porque devemos pensar nisso?
alexsoaresdesiqueira
1
220
Segurança para Android, o que eu preciso saber?
alexsoaresdesiqueira
0
62
Other Decks in Programming
See All in Programming
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
250
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
330
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
OTP を自動で入力する裏技
megabitsenmzq
0
110
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
9
2.9k
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
190
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
560
モダンOBSプラグイン開発
umireon
0
130
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
110
Fundamentals of Software Engineering In the Age of AI
therealdanvega
1
260
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
510
AI時代でも変わらない技術コミュニティの力~10年続く“ゆるい”つながりが生み出す価値
n_takehata
2
750
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
290
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
110
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
400
Crafting Experiences
bethany
1
87
The SEO identity crisis: Don't let AI make you average
varn
0
420
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
140
Making the Leap to Tech Lead
cromwellryan
135
9.8k
Fireside Chat
paigeccino
42
3.8k
Into the Great Unknown - MozCon
thekraken
40
2.3k
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