Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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.3k
Web testing strategy
Masafumi Okura
June 26, 2019
Tweet
Share
More Decks by Masafumi Okura
See All by Masafumi Okura
Why did my proposals get rejected?
okuramasafumi
1
460
A suggestion for the future of RDoc
okuramasafumi
1
67
15 JSON serializers for Ruby
okuramasafumi
2
120
Tech Events, Should We See Them from the Outside or the Inside?
okuramasafumi
1
42
Creating gems 101
okuramasafumi
1
83
How NOT to make your DSL terrible
okuramasafumi
0
290
オブジェクトしこう
okuramasafumi
2
210
Debugging Alba
okuramasafumi
1
190
Learning Ruby
okuramasafumi
5
560
Other Decks in Programming
See All in Programming
Thoughts and experiences on Rust and TypeScript
unvalley
2
200
14 Years of iOS: Lessons and Key Points
seyfoyun
0
360
Leveling Up Developer Tooling for the Modern Rails & Hotwire Era @ Ruby Türkiye, November 2024
marcoroth
0
150
eBPF Deep Dive: Architecture and Safety Mechanisms
takehaya
12
1.1k
CSC509 Lecture 12
javiergs
PRO
0
170
Serverless苦闘史
mosh_inc
0
130
[Do iOS '24] Ship your app on a Friday...and enjoy your weekend!
polpielladev
0
200
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
3
820
気をつけたい!Desktop対応で陥りやすい罠とその対策
goto_tsl
0
160
Modular Monolith Monorepo ~シンプルさを保ちながらmonorepoのメリットを最大化する~
yuisakamoto
10
3.6k
「天気予報があなたに届けられるまで」 - NIFTY Tech Talk #22
niftycorp
PRO
0
130
React への依存を最小にするフロントエンド設計
takonda
21
8.3k
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
334
57k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
A Philosophy of Restraint
colly
203
16k
Done Done
chrislema
181
16k
Ruby is Unlike a Banana
tanoku
97
11k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Statistics for Hackers
jakevdp
796
220k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
A Tale of Four Properties
chriscoyier
156
23k
Being A Developer After 40
akosma
87
590k
How STYLIGHT went responsive
nonsquared
95
5.2k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
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