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
Testando Frontend
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Fernando Fabricio dos Santos
September 17, 2015
Technology
0
26
Testando Frontend
Testando seu front utilizando ferramentas para teste javascript
Fernando Fabricio dos Santos
September 17, 2015
Tweet
Share
More Decks by Fernando Fabricio dos Santos
See All by Fernando Fabricio dos Santos
Motivos e custos para se manter o PHP atualizado
ferfabricio
0
66
Motivações para se testar o software
ferfabricio
0
27
Other Decks in Technology
See All in Technology
ブロックテーマでサイトをリニューアルした話 / 2026-01-31 Kansai WordPress Meetup
torounit
0
460
予期せぬコストの急増を障害のように扱う――「コスト版ポストモーテム」の導入とその後の改善
muziyoshiz
1
1.8k
インフラエンジニア必見!Kubernetesを用いたクラウドネイティブ設計ポイント大全
daitak
1
340
生成AIを活用した音声文字起こしシステムの2つの構築パターンについて
miu_crescent
PRO
2
180
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
13k
プロダクト成長を支える開発基盤とスケールに伴う課題
yuu26
4
1.3k
AIと新時代を切り拓く。これからのSREとメルカリIBISの挑戦
0gm
0
880
コスト削減から「セキュリティと利便性」を担うプラットフォームへ
sansantech
PRO
3
1.4k
ブロックテーマ、WordPress でウェブサイトをつくるということ / 2026.02.07 Gifu WordPress Meetup
torounit
0
170
Webhook best practices for rock solid and resilient deployments
glaforge
1
280
Agile Leadership Summit Keynote 2026
m_seki
1
580
FinTech SREのAWSサービス活用/Leveraging AWS Services in FinTech SRE
maaaato
0
130
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Balancing Empowerment & Direction
lara
5
880
Making Projects Easy
brettharned
120
6.6k
Making the Leap to Tech Lead
cromwellryan
135
9.7k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
Un-Boring Meetings
codingconduct
0
200
Facilitating Awesome Meetings
lara
57
6.8k
Become a Pro
speakerdeck
PRO
31
5.8k
Fireside Chat
paigeccino
41
3.8k
Statistics for Hackers
jakevdp
799
230k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
210
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.6k
Transcript
Testando frontend Utilizando ferramentas JS
https://slimerjs.org/ http://phantomjs.org/ CasperJS Script de navegação e testes para PhantomJS
e SlimerJS http://casperjs.org/
None
Pensando seu teste • O que vai ser testado? •
É um fluxo padrão? É possível reproduzir? • É realmente necessário este teste? Vai adicionar valor ao produto?
Mapeando o fluxo a ser testado • Qual página devo
abrir? • Qual o http-code esperado? • Quais elementos deveriam aparecer na tela? • Qual o comportamento esperado ao clicar em algum elemento?
None
Formulando um caso de teste 1. http-code 200 2. Título
da página igual a: 'Fernando Fabricio' 3. Tag h1 com o conteúdo: 'Fernando Fabricio'
Criando o teste begin(String description, Number planned, Function suite) begin(String
description, Function suite) begin(String description, Number planned, Object config) begin(String description, Object config)
Estrutura do teste start(String url[, Function then]) run(fn onComplete[, int
time])
Assertions assert() assertDoesntExist() assertEquals() assertEval() assertEvalEquals() assertElementCount() assertExists() assertFalsy() assertField()
assertFieldName() assertFieldCSS() assertFieldXPath() assertHttpStatus() assertMatch() assertNot() assertNotEquals() assertNotVisible() assertRaises() assertSelectorDoesntHaveText() assertSelectorHasText() assertResourceExists() assertTextExists() assertTextDoesntExist() assertTitle() assertTitleMatch() assertTruthy() assertType() assertInstanceOf() assertUrlMatch() assertVisible()
Exemplo de teste
Executando o teste casper test <seu arquivo JS> Resultado do
teste formulado:
setUP e tearDown
None
Exemplo de teste
None
Screenshot
None
http://casperjs.readthedocs.org/