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
Selenium完全に理解した
Search
tsuemura
January 29, 2020
Programming
0
3k
Selenium完全に理解した
完全に理解した人達の「Web技術」Talk #1
https://easy2.connpass.com/event/161840/
tsuemura
January 29, 2020
Tweet
Share
More Decks by tsuemura
See All by tsuemura
E2Eテストのシナリオと抽象化の粒度の話.pdf
tsuemura
6
470
テスト自動化ことはじめ
tsuemura
3
230
ようこそ、ソフトウェアテストの世界へ!
tsuemura
1
53
リーダブルなE2Eテストコードのための3つのC
tsuemura
7
980
コンテキストとセマンティクスを意識してリーダブルなE2Eテストコードを書こう
tsuemura
12
28k
60分で学ぶE2Eテスト(実装編)
tsuemura
0
380
全部乗せフレームワーク CodeceptJS でE2Eテストを楽にしよう
tsuemura
7
5.2k
10年前に初めてVBAで業務自動化したときの思い出
tsuemura
1
14k
テストを自動化するのをやめ、自動テストを作ろう
tsuemura
71
34k
Other Decks in Programming
See All in Programming
Dev ContainersとGitHub Codespacesの素敵な関係
ymd65536
1
110
cXML という電子商取引の トランザクションを支える プロトコルと向きあっている話
phigasui
2
1.5k
約9000個の自動テストの 時間を50分->10分に短縮 Flakyテストを1%以下に抑えた話
hatsu38
21
8k
知られざるNaNの世界
hole
3
1.2k
Importmapを使ったJavaScriptの 読み込みとブラウザアドオンの影響
swamp09
3
1.2k
2万ページのSSG運用における工夫と注意点 / Vue Fes Japan 2024
chinen
3
1.2k
offers_20241022_imakiire.pdf
imakurusu
1
220
いかにして不足・不整合なくデータ移行したか
tjmtmmnk
1
1k
リリース8年目のサービスの1800個のERBファイルをViewComponentに移行した方法とその結果
katty0324
2
2.6k
Vue SFCのtemplateでTypeScriptの型を活用しよう
tsukkee
3
1.4k
Googleのテストサイズを活用したテスト環境の構築
toms74209200
0
210
Folding Cheat Sheet #8
philipschwarz
PRO
0
160
Featured
See All Featured
Faster Mobile Websites
deanohume
304
30k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
Scaling GitHub
holman
458
140k
Producing Creativity
orderedlist
PRO
341
39k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
The Art of Programming - Codeland 2020
erikaheidi
51
13k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
106
49k
Typedesign – Prime Four
hannesfritz
39
2.4k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Statistics for Hackers
jakevdp
796
220k
The Language of Interfaces
destraynor
154
24k
Transcript
Selenium完全に理解した Takuya Suemura @ Autify Inc.
⾃⼰紹介 末村 拓也(Takuya Suemura) QA / テスト⾃動化エンジニア というテスト⾃動化プラットフォームを作る会社で働いています
https://autify.com/ja/
テストしてる? https://martinfowler.com/bliki/TestPyramid.html
今⽇話すこと Webのテストによく使われる Selenium という技術の話
Seleniumとは すごい昔からあるブラウザ操作⾃動化フレームワーク 様々なブラウザを単⼀のAPIで操作できる 複数のマシンでE2Eテストを並列実⾏することができる いくつかの技術の複合体 Selenium WebDriver Selenium Grid Selenium
IDE
使う サーバを⽴てる必要があります Nodeなら selenium-standalone を使うと楽 $ npm install -g selenium-standalone
$ selenium-standalone install $ selenium-standalone start http://localhost:4444/wd/hub にサーバが⽴ちます
使う Selenium⾃体はブラウザの操作を抽象化しているだけなので、 実際にテストコードを書くときは 他のテストフレームワークを使うのが⼀般的です 例: Selenide(Java) Geb(Groovy) Capybara(Ruby) RobotFramework(Python) WebdriverIO(Node)
CodeceptJS(Node)
他のフレームワークと何が違うの? Seleniumはユーザーが実際に⾏う操作を⾃動化するところに重点を置いていて、それゆえにか ゆいところに⼿が届かないことがある 例えばCookieやGeolocationを編集できない ブラウザ上で任意のJavaScriptを実⾏できるのでそれで解決することもあるが、HTTPヘッダ の追加などは出来ない Seleniumは並列実⾏を強⼒にサポートしている ZaleniumやSelenoidのようなコンテナを使った並列実⾏をするためのサードパーティツールも 存在する なんやかんや実機のテストはSeleniumが強い
IEとか……
似たようなツールたち Puppeteer Cypress TestCafe PlayWright <- NEW! などなど
Enjoy Testing!