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
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
790
夫婦で子育てするための育児標準化
codmoninc
PRO
0
400
スキマバイトという雇用形態は存在しないので、雇用期間1日のアルバイト契約を事業者とワーカーが結ぶ手続きを支えるのがタイミーなんです
akitoshiga
0
200
Rustuna: Rustによる高速なOptuna実装
pfn
PRO
0
190
Classmethod Company Deck
satoshi7
1
710
サブエージェントと Claude Mods で作る独自 Advisor ツールの話
kenichiodo
2
160
PHPカンファレンス関西の招待状 / Invitation to PHP Conference Kansai
ykanoh
0
140
Local CI × GitHub Actions
gogutan
2
220
How to Design Configuration for Rails Applications
willnet
1
820
PagerDuty Tech Hub-鳴らすけれど、人は動かない
ezaki
0
180
AI導入は済んだ。次は統制を作り替える番だ_AI×開発組織 Summit 2026
techtekt
PRO
0
300
今さら理解するウェブフォントver.2026
takanorip
3
880
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
570
ラッコキーワード サービス紹介資料
rakko
1
5.4M
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
540
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
So, you think you're a good person
axbom
PRO
2
2.2k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Are puppies a ranking factor?
jonoalderson
2
4.1k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
800
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
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/