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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
140
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
200
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
730
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
110
Apache Iceberg V3 and migration to V3
tomtanaka
0
170
CSC307 Lecture 08
javiergs
PRO
0
670
Grafana:建立系統全知視角的捷徑
blueswen
0
330
CSC307 Lecture 05
javiergs
PRO
0
500
2026年 エンジニアリング自己学習法
yumechi
0
140
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
150
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
50
14k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
130
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
70
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
64
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
310
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
55
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
380
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.4k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.6k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
For a Future-Friendly Web
brad_frost
182
10k
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