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開発を補助する目的でPlaywrightを使っている話
Search
aoki ken
November 19, 2022
Programming
0
730
Web開発を補助する目的でPlaywrightを使っている話
aoki ken
November 19, 2022
Tweet
Share
More Decks by aoki ken
See All by aoki ken
Vue2からVue3へのアップデートをどのように行っていったかの話
aokiken
1
280
Other Decks in Programming
See All in Programming
CSC307 Lecture 07
javiergs
PRO
1
560
「ブロックテーマでは再現できない」は本当か?
inc2734
0
1.1k
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
180
CSC307 Lecture 01
javiergs
PRO
0
690
Data-Centric Kaggle
isax1015
2
780
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
140
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
750
CSC307 Lecture 06
javiergs
PRO
0
690
CSC307 Lecture 08
javiergs
PRO
0
670
CSC307 Lecture 03
javiergs
PRO
1
490
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
620
Apache Iceberg V3 and migration to V3
tomtanaka
0
180
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
740
Faster Mobile Websites
deanohume
310
31k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
440
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
66
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.1k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
3.9k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.6k
Transcript
Web開発を補助する目的で Playwrightを使っている話 フロントエンドカンファレンス沖縄2022(2022.11.19) aokiken(@ao_kiken)
自己紹介 • BASE, inc. (2019/05~) • Product Dev / Service
Dev / Owners Marketing Dev / Shop Front • ショップデザイン関連機能の開発を担当しています aokiken @ao_kiken @aokiken
3 https://thebase.in/shopdesign
4
5 https://devblog.thebase.in/entry/2020/12/22/122200 以前、こんなブログを書きました
6 今回は、その2022年版
7 共通して伝えたいことは
8 ブラウザ操作を自動化する という発想を、身近に感じてほしい
Playwrightとは 9
10 Webテストと自動化のためのフレームワーク https://github.com/microsoft/playwright
11 幅広い条件で利用が可能
12 パワフルなツール Codegen 🤖 Trace Viewer 👣 Playwright Inspector 🔍
実例1 動作確認したい状態の テストショップを作成する 13
14 現在利用できるオフィシャルテーマは17種類 1つのショップでテーマを切り替えて確認するのは手間が多くなって大変 テーマごとにテストショップを作成したい
15 Playwrightでやってみる
16 まずはシンプルに実行環境を用意
17 codegenで実行コードを作成
18 生成したコードを元にscriptを作成
19 scriptを実行
20 1テーマあたり およそ11秒で作れました
21 GitHub Actions経由でテストショップを作成できるように 実行者が環境をローカルで構築せずとも利用出来るので、布教するのに便利
実例2 動作確認したい状態を HTML Reportに出力する 22
23 現在利用できるオフィシャルテーマは17種類 17種類のページの動作確認は多いので、 確認できる状態までをHTML Reportで出力してみる
24 Playwrightでやってみる
25 yarn create playwrightを使って実行環境を構築 https://playwright.dev/docs/intro
26 テストコードを追加、実行
27 HTML Reportを確認
28 OIDC認証でセキュアにホスティング https://aws.amazon.com/jp/blogs/networking-and-content-delivery/securing-cloudfront-distributi ons-using-openid-connect-and-aws-secrets-manager/
LTは以上になります ご清聴ありがとうございました 29