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.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
430
A suggestion for the future of RDoc
okuramasafumi
1
65
15 JSON serializers for Ruby
okuramasafumi
2
110
Tech Events, Should We See Them from the Outside or the Inside?
okuramasafumi
1
39
Creating gems 101
okuramasafumi
1
80
How NOT to make your DSL terrible
okuramasafumi
0
280
オブジェクトしこう
okuramasafumi
2
210
Debugging Alba
okuramasafumi
1
190
Learning Ruby
okuramasafumi
5
560
Other Decks in Programming
See All in Programming
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
110
JaSST 24 九州:ワークショップ(は除く)実践!マインドマップを活用したソフトウェアテスト+活用事例
satohiroyuki
0
480
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
130
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
780
Importmapを使ったJavaScriptの 読み込みとブラウザアドオンの影響
swamp09
4
1.3k
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
100
Dev ContainersとGitHub Codespacesの素敵な関係
ymd65536
1
140
PLoP 2024: The evolution of the microservice architecture pattern language
cer
PRO
0
2.4k
役立つログに取り組もう
irof
28
9.4k
Tauriでネイティブアプリを作りたい
tsucchinoko
0
350
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
590
macOS でできる リアルタイム動画像処理
biacco42
9
2.3k
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
RailsConf 2023
tenderlove
29
890
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
700
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
Visualization
eitanlees
145
15k
Optimizing for Happiness
mojombo
376
69k
[RailsConf 2023] Rails as a piece of cake
palkan
51
4.9k
A designer walks into a library…
pauljervisheath
202
24k
Building Applications with DynamoDB
mza
90
6.1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
15
2k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9k
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