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
古い指輪から広がった JAVA コミュニティ とのつながり
yamad
0
120
M5Stackで作る BLEマウス GPSログの世界
tomokusaba
PRO
0
430
Classmethod Company Deck
satoshi7
1
710
その Valkey 使いこなしていますか?
onk
PRO
5
1.6k
10年後、Engineering 行為を剥奪されるとして、わたしたちは、どう、何を創ればいいだろうか。 / If Engineering Is Taken Away in 10 Years, How and What Should We Create?
bitkey
PRO
1
200
20261017福岡devIO 「AIは"良いダッシュボード"を作れるか?
jtakeda
0
170
ソフトウェア ファクトリー - 再現性のあるソフトウェアの工場づくり / Software factory
iktakahiro
6
5k
Rust で関数型ドメインモデリング
takonda
0
140
アウトプット初心者、半年間のふりかえり
4o1sobblue
0
440
触りたくないデータに、どう触るか AI時代のRBACアクセスガバナンス
ivry_presentationmaterials
0
270
PHPカンファレンス関西の招待状 / Invitation to PHP Conference Kansai
ykanoh
0
140
ストレスなくAIと付き合いたい!こんなときどうしてる?
namiki64
3
570
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
410
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
570
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
540
Game over? The fight for quality and originality in the time of robots
wayneb77
1
300
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
630
Scaling GitHub
holman
464
140k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
450
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
280
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
520
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/