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
Testando Frontend
Search
Fernando Fabricio dos Santos
September 17, 2015
Technology
26
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Testando Frontend
Testando seu front utilizando ferramentas para teste javascript
Fernando Fabricio dos Santos
September 17, 2015
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
67
Motivações para se testar o software
ferfabricio
0
27
Other Decks in Technology
See All in Technology
継続的なAIコスト最適化
bgpat
1
340
Classmethod Company Deck
satoshi7
1
710
夫婦で子育てするための育児標準化
codmoninc
PRO
0
370
Benchmarking Disaggregated Serving on vLLM + Dynamo with a Real Coding-Agent Workload
nttcom
1
190
大型犬好きによるPugの紹介
yamanoku
1
160
触りたくないデータに、どう触るか AI時代のRBACアクセスガバナンス
ivry_presentationmaterials
0
270
DGX Spark でどこまでハッキングができるのか?
kash1064
3
1.3k
Tofu-Controller lightning talk @ Containerday 2026
gionn
0
120
二歩目のフロントエンド・ウェブアクセシビリティ
camiha
2
640
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
780
CTO Night|NotionのAIエージェントとFDE
kzkhykw1991
0
160
『SAR衛星データ解析入門』のご紹介とその応用
syuchimu
0
120
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
77
5.6k
The untapped power of vector embeddings
frankvandijk
2
1.9k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
330
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Unsuck your backbone
ammeep
672
58k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Design in an AI World
tapps
1
350
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
800
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
59k
Mobile First: as difficult as doing things right
swwweet
225
10k
Optimizing for Happiness
mojombo
378
71k
The browser strikes back
jonoalderson
0
1.8k
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/