Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
450
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Padrões e Boas Práticas de Teste de Tela
Python Sudeste 2018
Celso Crivelaro
March 31, 2018
More Decks by Celso Crivelaro
See All by Celso Crivelaro
Sistemas de Recomendação
celsocrivelaro
2
250
Big Data para Gerentes de Projetos
celsocrivelaro
0
75
FileSystems em Ruby com FUSE
celsocrivelaro
2
77
Projeto de APIs
celsocrivelaro
0
180
Testing Network Conditions with ToxiProxy
celsocrivelaro
1
400
Testing Network Conditions with ToxiProxy
celsocrivelaro
0
92
Actor Model in Ruby
celsocrivelaro
0
270
Separando as regras de negócios do Rails
celsocrivelaro
0
200
InfluxDB + Grafana
celsocrivelaro
0
270
Other Decks in Programming
See All in Programming
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
120
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
540
アクセシビリティから考える情報設計
high_g_engineer
0
420
一人だけ、Kiroが静止する日
hideg
0
130
MCP Appsでつくるチャット駆動な地図アプリ
nakamori1024
0
110
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
3
390
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
200
Webの地図
yosuke_furukawa
PRO
6
4.8k
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
8.7k
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
130
AI活用は、個人から組織へ|マルチプレイヤーエージェントハーネス「QM」の社内活用事例 / AI use is moving from individuals to orgs
rkaga
1
270
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
310
Featured
See All Featured
Chasing Engaging Ingredients in Design
codingconduct
0
340
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
250
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Docker and Python
trallard
47
4.2k
First, design no harm
axbom
PRO
2
1.3k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
A designer walks into a library…
pauljervisheath
211
25k
Code Review Best Practice
trishagee
74
20k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
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