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
Why did my proposals get rejected?
okuramasafumi
1
480
A suggestion for the future of RDoc
okuramasafumi
1
69
15 JSON serializers for Ruby
okuramasafumi
2
130
Tech Events, Should We See Them from the Outside or the Inside?
okuramasafumi
1
45
Creating gems 101
okuramasafumi
1
85
How NOT to make your DSL terrible
okuramasafumi
0
310
オブジェクトしこう
okuramasafumi
2
220
Debugging Alba
okuramasafumi
1
200
Learning Ruby
okuramasafumi
5
570
Other Decks in Programming
See All in Programming
短期間での新規プロダクト開発における「コスパの良い」Goのテスト戦略」 / kamakura.go
n3xem
2
180
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
650
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
3
490
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
290
Monixと常駐プログラムの勘どころ / Scalaわいわい勉強会 #4
stoneream
0
290
Online-Dokumentation, die hilft: Strukturen, Prozesse, Tools
ahus1
0
100
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
5
950
Scalaから始めるOpenFeature入門 / Scalaわいわい勉強会 #4
arthur1
1
340
testcontainers のススメ
sgash708
1
130
MCP with Cloudflare Workers
yusukebe
2
230
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
340
103 Early Hints
sugi_0000
1
260
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
66
11k
Become a Pro
speakerdeck
PRO
26
5k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.6k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Designing for humans not robots
tammielis
250
25k
We Have a Design System, Now What?
morganepeng
51
7.3k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
The Cost Of JavaScript in 2023
addyosmani
46
7k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Code Review Best Practice
trishagee
65
17k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
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