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
Web testing strategy
Search
Masafumi Okura
June 26, 2019
Programming
4
1.4k
Web testing strategy
Masafumi Okura
June 26, 2019
Tweet
Share
More Decks by Masafumi Okura
See All by Masafumi Okura
Writing documentation can be fun with plugin system
okuramasafumi
0
120
Alba: Why, How and What's So Interesting
okuramasafumi
0
250
Why did my proposals get rejected?
okuramasafumi
1
540
A suggestion for the future of RDoc
okuramasafumi
1
180
15 JSON serializers for Ruby
okuramasafumi
2
240
Tech Events, Should We See Them from the Outside or the Inside?
okuramasafumi
1
52
Creating gems 101
okuramasafumi
1
99
How NOT to make your DSL terrible
okuramasafumi
0
420
オブジェクトしこう
okuramasafumi
2
330
Other Decks in Programming
See All in Programming
Domain-Driven Transformation
hschwentner
2
1.9k
XStateを用いた堅牢なReact Components設計~複雑なClient Stateをシンプルに~ @React Tokyo ミートアップ #2
kfurusho
1
910
ARA Ansible for the teams
kksat
0
150
プログラミング言語学習のススメ / why-do-i-learn-programming-language
yashi8484
0
130
パスキーのすべて ── 導入・UX設計・実装の紹介 / 20250213 パスキー開発者の集い
kuralab
3
790
PHPカンファレンス名古屋2025 タスク分解の試行錯誤〜レビュー負荷を下げるために〜
soichi
1
200
なぜイベント駆動が必要なのか - CQRS/ESで解く複雑系システムの課題 -
j5ik2o
11
4k
ソフトウェアエンジニアの成長
masuda220
PRO
11
1.6k
pylint custom ruleで始めるレビュー自動化
shogoujiie
0
120
ペアーズでの、Langfuseを中心とした評価ドリブンなリリースサイクルのご紹介
fukubaka0825
2
330
仕様変更に耐えるための"今の"DRY原則を考える / Rethinking the "Don't repeat yourself" for resilience to specification changes
mkmk884
2
360
CI改善もDatadogとともに
taumu
0
120
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Building Applications with DynamoDB
mza
93
6.2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Thoughts on Productivity
jonyablonski
69
4.5k
We Have a Design System, Now What?
morganepeng
51
7.4k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.1k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
For a Future-Friendly Web
brad_frost
176
9.5k
A better future with KSS
kneath
238
17k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Transcript
Web։ൃʹ͓͚Δ ςετઓུ Place: ΏΔͪ.it Date: 2019-06-26 Speaker: େխ࢙
͡Ίʹ
ςετͷ༻ޠΛཧͯ͠ΈΔ
ࢲՈ൛ςετ༻ޠू • E2EςετɿϢʔβʔΠϯλʔϑΣΠε͔Β σʔλϕʔε·ͰΛҰ؏͢ΔςετɺγφϦΦ Λ༻ҙͯ͠ਐΊΔ߹͕ଟ͍ɺผ໊γεςϜς ετ • ݁߹ςετɿෳͷίϯϙʔωϯτΛ݁߹͠ ͯߦ͏ςετɺػೳ୯ҐͰߦΘΕΔ߹͕ଟ ͘ϑΟʔνϟʔςετ͜ͷҰछ
ࢲՈ൛ςετ༻ޠूʢଓʣ • Ϣχοτςετɿ୯ҰͷιϑτΣΞίϯϙʔ ωϯτͷΈΛରͱͨ͠ςετɺݱ࣮తʹ୯ ҰͷϑΝΠϧΛରͱ͢Δ߹͕ଟ͘ɺରʹ Αͬͯݺͼ໊มΘΔʢϞσϧςετɾϏϡʔ ςετͳͲʣ • ςετμϒϧɿςετதʹίϯϙʔωϯτΛஔ ͖͑Δ༻ʢελϒɾϞοΫɾεύΠͳͲʣ
ςετΛॻ͍ͯԿ͕خ͍͠ Ͱ͔͢ʁ
όάͷݮগʁ
҆৺ײʁ
։ൃऀͷʁ
։ൃऀͷʂ
ͲͷΑ͏ʹςετΛॻ͘ͱɺ ։ൃऀͷ͕ͤ࠷େԽ͞ΕΔ ͷ͔
ϓϩάϥϚͷࡾେඒಙ
ϓϩάϥϚͷࡾେඒಙ • ؾ • ၗຫ • ଵଦ
ςετͷࡾେඒಙ • ͍ • ίʔυͷઃܭΛิॿ͢Δ • ϓϩμΫγϣϯίʔυͷมߋʹৼΓճ͞Εͳ ͍
͍ςετ
͍ςετͷͨΊͷํ • E2Eςετਖ਼ৗܥͷΈʢҟৗܥϢχοτς ετͰΧόʔ͢Δʣ • DBͷΞΫηεΛՄೳͳݶΓݮΒ͢ • ͱͯॏ͍ॲཧςετμϒϧʹஔ͖͑Δ
ϖʔδωʔγϣϯͷ۩ମྫ # Bad @books = create_list(:book, 11) visit books_url expect(page).not_to
have_content(‘Book11’) # Good @book = create_list(:book, 2) PER_PAGE = 1 # తͳͭ visit books_url expect(page).not_to have_content(‘Book2’)
ઃܭπʔϧͱͯ͠ͷςετ
ςετͰઃܭ͢ΔͨΊʹ • ݪଇɺςετΛઌʹॻ͘ʢςετϑΝʔετʣ • ςετ͕͗͢Δɾෳࡶ͗͢Δɾ͗͢͠Δ ߹ϓϩμΫγϣϯίʔυͷ࠶ઃܭΛݕ౼ • ςετʹςετμϒϧ͕ଟ͗͢Δ߹ґ ଘؔΛݟ͢
ςετ͕ࠔͳίʔυྫ # foo.rb class Foo def do_something(arg1, arg2, arg3 =
nil, params = {}) end end # foo_spec.rb context ‘when arg1 is :hoge’ do context ‘when arg2 is…
ςετ͕༰қͳίʔυྫ # foo.rb class Foo def do_something(arg1) bar.do_another(arg2) end end
# foo_spec.rb context ‘when arg1 is :hoge’ do before { allow(bar).to receive(:do_another) { hoge }
มߋʹڧ͍ςετ
ςετίʔυ • ݪଇɺύϒϦοΫͳΠϯλʔϑΣΠεͷΈΛ ςετ͢Δ • Ϗϡʔςετ͠ͳ͍ʢมԽ͕͍͔ΒɺͲ ͏͚ͯͨ͠͠ΕE2EͰʣ • ςετରͷ෦ঢ়ଶ͍͚ͬͯͳ͍ ʢΠϯελϯεมͱ͔ʣ
͍͞͝ʹ
ࣗಈςετ։ൃऀͷͨΊͷ πʔϧ
ςετ͕ͨΒ͢Λ ࠷େԽ͍͖·͠ΐ͏
ͱ͜ΖͰɿ
͋Μͨ୭ʁ
ࣗݾհ • ໊લɿେխ࢙ • ॴଐɿϑϦʔϥϯε • ͖ͳݴޠɿRuby • ͖ͳΤσΟλɿVim