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
E2E test with TestCafe @LT Thursday Vol.20
Search
piro_deno
April 06, 2017
Programming
0
1k
E2E test with TestCafe @LT Thursday Vol.20
社内勉強会で使ったTestCafeの紹介資料
piro_deno
April 06, 2017
Tweet
Share
Other Decks in Programming
See All in Programming
The Art of Re-Architecture - Droidcon India 2025
siddroid
0
160
愛される翻訳の秘訣
kishikawakatsumi
3
370
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
11
4.9k
ELYZA_Findy AI Engineering Summit登壇資料_AIコーディング時代に「ちゃんと」やること_toB LLMプロダクト開発舞台裏_20251216
elyza
2
920
Go コードベースの構成と AI コンテキスト定義
andpad
0
150
生成AIを利用するだけでなく、投資できる組織へ
pospome
2
430
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
300
GoLab2025 Recap
kuro_kurorrr
0
790
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
140
Graviton と Nitro と私
maroon1st
0
160
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
7
2.4k
20251212 AI 時代的 Legacy Code 營救術 2025 WebConf
mouson
0
240
Featured
See All Featured
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
140
What the history of the web can teach us about the future of AI
inesmontani
PRO
0
390
GraphQLとの向き合い方2022年版
quramy
50
14k
The World Runs on Bad Software
bkeepers
PRO
72
12k
New Earth Scene 8
popppiees
0
1.3k
HDC tutorial
michielstock
1
290
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
400
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
37
Designing for humans not robots
tammielis
254
26k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
Building an army of robots
kneath
306
46k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Transcript
E2E test with LT Thursday Vol.20
.me { name: ԕ౻ a.k.a. piro; age : 34;
.CA::before { career: Web࡞ձࣾ, Πϕϯτ੍࡞ձࣾ; } .CA::after { career: Android Market, SP Ameba Platform, Ameba OWND, AWA, MDH; } }
Index • About TestCafe • API • Debug • Page
Object Model • ॴײ
About TestCafe
None
Demo
Features • ES2016Ͱॻ͚ΔͷͰbabelෆཁ • Browser pluginෆཁ • ͍ΖΜͳૢ࡞ΛࣗಈͰͬͯ͘ΕΔ • TouchσόΠεରԠ
• RemoteͰςετ͕࣮ߦͰ͖Δ
API
None
Demo
Fixtures / Tests • ςετͷྨͱςετ໊ͷొ • લޙͷॲཧͷొ • ͜ͷྨ໊લΛࢦఆͯ͠ςετΛ࣮ߦ͢Δ ͜ͱͰ͖Δ
None
Selectors • ཁૉऔಘؔ࿈ͷAPI • Query SelectorͬΆ͘ॻ͚Δʢͱ͍͏ΑΓjQueryͷ$తͳײ͡ʣ • snapshotͳͷͰऔಘޙʹԆͯ͠มߋ͞Εͨ উखʹมΘͬͯ͘Εͳ͍ •
औಘͰ͖Δ·Ͱͬͯ͘ΕΔ
None
Test Controller • Πϕϯτૢ࡞ʢclick / d&d etcʣ • ը໘ॲཧʢwindow resize
/ ը໘Ωϟϓνϟ etcʣ • Assertion
None
Assertion • expectܗࣜ • Deep Equal (Not Deep Equal) •
Ok (Not Ok) • Contains (Not Contains) • Type of (Not Type of) • Great than (Great than or Equal to) • Less than (Less than or Equal to) • Within (Not Within) • Match (Not Match)
None
Client Function • Clientσʔλͷऔಘؔ࿈ • URLͷऔಘͱ͔ɺlocalStorageͷૢ࡞ͱ͔
None
Debug
Debug • t.debug() ࣮ߦڥͷdebug • --inspect --debug-brk chrome dev toolsΛͬͨdebug
None
Demo
Page Object Pattern
Page Object Pattern • ը໘ΛҰͭͷObjectͱͯ͠ѻ͏ • Page Class ը໘ͷཁૉΛఆٛ •
Operator Class Page ClassͷAPIΛݺΜͰૢ࡞͢ΔΑ͏ͳAPIΛఆٛ • Features OperatorΛݺΜͰςετΛఆٛ
খωλ
খωλ • --qr-code εϚϗͷϒϥβ֬ೝ༻ʹQRίʔυੜ • --fixture<name> / --fixture-grep <pattern>
--test <name> / --test-grep <pattern> fixturetestͷ໊લࢦఆgrepͰࢦఆͨ͠testͷ࣮ߦ • --screenshots-on-fails ςετΤϥʔ࣌ʹεΫϦʔϯγϣοτΛࡱΔ
ॴײ
ॴײ • ಋೖ؆୯ • ॻָ͍͍ͯͯ͠ • requestrenderͷͪΛ΄΅ߟྀͤͣʹ͔͚Δͷָ • ϦϞʔτͷςετศར •
ςετҎ֎ʹπʔϧͱͯ͑ͦ͠͏
Demo
͓͠·͍
Links • TestCafe http://devexpress.github.io/testcafe/ • Example https://github.com/DevExpress/testcafe/ tree/master/examples