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
Padrões e Boas Práticas de Teste de Tela
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Celso Crivelaro
March 31, 2018
Programming
0
430
Padrões e Boas Práticas de Teste de Tela
Python Sudeste 2018
Celso Crivelaro
March 31, 2018
Tweet
Share
More Decks by Celso Crivelaro
See All by Celso Crivelaro
Sistemas de Recomendação
celsocrivelaro
2
230
Big Data para Gerentes de Projetos
celsocrivelaro
0
66
FileSystems em Ruby com FUSE
celsocrivelaro
2
72
Projeto de APIs
celsocrivelaro
0
160
Testing Network Conditions with ToxiProxy
celsocrivelaro
1
390
Testing Network Conditions with ToxiProxy
celsocrivelaro
0
83
Actor Model in Ruby
celsocrivelaro
0
260
Separando as regras de negócios do Rails
celsocrivelaro
0
180
InfluxDB + Grafana
celsocrivelaro
0
260
Other Decks in Programming
See All in Programming
手戻りゼロ? Spec Driven Developmentとは@KAG AI week
tmhirai
1
170
NOT A HOTEL - 建築や人と融合し、自由を創り出すソフトウェア
not_a_hokuts
2
590
Go Conference mini in Sendai 2026 : Goに新機能を提案し実装されるまでのフロー徹底解説
yamatoya
0
530
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
250
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
460
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
170
CSC307 Lecture 15
javiergs
PRO
0
230
Claude Codeセッション現状確認 2026福岡 / fukuoka-aicoding-00-beacon
monochromegane
4
400
AHC061解説
shun_pi
0
340
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
230
日本だけで解禁されているアプリ起動の方法
ryunakayama
0
370
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
300
Featured
See All Featured
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
140
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
Building AI with AI
inesmontani
PRO
1
770
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
150
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.1k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
310
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Prompt Engineering for Job Search
mfonobong
0
180
BBQ
matthewcrist
89
10k
Transcript
Padrões e boas práticas para testes de Tela Celso Crivelaro
@celsocrivelaro
$ whoiam
Tech Lead @ Professor @
None
None
O que você verá nesta talk
Porque fazer testes de tela Causos com testes de telas
Design Patterns para testes Boas práticas
Esta é uma história sobre um time...
Débora Guilherme Fernanda Desenvolvedores
None
None
None
Em um dia comum, subiram uma alteração...
None
None
None
None
#chatiado
Por que isso ocorreu?
None
Como evitar isso?
None
Érico Especialista QA
None
None
https://martinfowler.com/bliki/TestPyramid.html
Página de Entrada Página de Retorno Entrada de Dados Controller
Regras de Negócio Models Integrações
Chrome Driver Código de Teste Firefox Driver
http://selenium-python.readthedocs.io/
https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver
$ pip install selenium
None
None
None
None
Confiabilidade
https://martinfowler.com/bliki/TestPyramid.html
None
None
Entretanto alguns problemas ocorreram...
Os testes ficaram muito lentos
Inserir novos testes e funcionalidades ficou mais difícil
Testes Instáveis
#chatiado
None
Problema 1: Testes Lentos
None
None
None
Mas se os outros casos quebrarem?
None
None
None
None
None
None
None
None
None
None
Tunning do banco para testes
https://docs.mongodb.com/manual/core/in memory/ https://dev.mysql.com/doc/refman/5.5/en/memo ry-storage-engine.html https://www.postgresql.org/docs/curre nt/static/non-durability.html Tunning para testes
NUNCA use em produção
None
None
Problema 2: Novos testes e leitura
Dificuldade de novas funcionalidades / testes Dificuldade no entendimento
Time fazendo código de produção
Time fazendo código de produção Time fazendo código de testes
Código dos testes precisa ser tão bom quanto o de
produção
Testes mal arquitetados
None
Builder para Setups Complexos
None
http://factoryboy.readthedocs.io/en/latest/
None
Command para testes longos
Unitário Entrada Saída ABC DFE 123 222
Aceitação Checar Tela 1 Clicar Link Checar Tela 2 Checa
Produto Checar Tela 3 Checar Produto cadastrado Preenche Form Clicar Submit Pipeline
Proxies para integrações externas
ProxyPagamento Integração Fluxo de Pagamento ENV=production ProxyPagamento Mock
ProxyPagamento Fluxo de Pagamento ENV=test ProxyPagamento Mock Integração
Dificuldade de entender testes antigos
None
Onde terminam e começam as páginas?
Page Objects
Objeto que representa uma página
Checagens e Ações usando métodos
Preencher campo A com valor "B" Entrar na página XYZ
Clicar em "Enviar" Ir para página ABC Exibir "Dado Cadastrado" Ações Resultados esperados
CadastroUsuario ResultadoCadastro
CadastrarUsuario
CadastrarUsuario Métodos de Ação
CadastrarUsuario Métodos de Verificação
ResultadoCadastro
Teste
Teste Objetos mostram as transições de páginas
Boa Prática: Separar Page Objects dos Testes
Expressividade
Encapsulamento e Reutilização
Qualquer interação: • API REST • Troca de Mensagens •
Email
Problema 3: Testes Instáveis
Ordem
Esperado Resultado
Ordem de armazena mento no banco Checagem Armazenamento
Forçar ordem na listagem Checagem Armazenamento
Tempo de tela
None
http://selenium-python.readthedocs.io/waits.html Implicit Wait
http://selenium-python.readthedocs.io/waits.html Explicit Wait
http://selenium-python.readthedocs.io/waits.html Explicit Wait
Tempo de tela-sistema
None
None
Espere interações de Tela iniciarem e terminarem
Todos Felizes
Consequências Indiretas
Aumento de produtividade
Melhorou o código de produção
None
Scrappers
Obrigado! Celso Crivelaro @celsocrivelaro http://crivelaro.me