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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
240
Big Data para Gerentes de Projetos
celsocrivelaro
0
73
FileSystems em Ruby com FUSE
celsocrivelaro
2
75
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
190
InfluxDB + Grafana
celsocrivelaro
0
270
Other Decks in Programming
See All in Programming
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
7.2k
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
3
550
setup-vp GitLab対応の裏側
naokihaba
0
100
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
100
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
1
560
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
120
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
590
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
140
巨大モノリシックアプリ モダン化大作戦
ktcryomm
1
1k
Are APIs Still Relevant in the AI Era?
soyuka
0
230
Family mrubyの進捗
kishima
1
120
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
4
690
Featured
See All Featured
For a Future-Friendly Web
brad_frost
183
10k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
390
Being A Developer After 40
akosma
91
590k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
230
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
From π to Pie charts
rasagy
1
370
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Claude Code のすすめ
schroneko
67
230k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
700
The Limits of Empathy - UXLibs8
cassininazir
1
670
Chasing Engaging Ingredients in Design
codingconduct
0
310
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