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 on Azure Kubernetes...
Search
Tadashi Nemoto
June 19, 2019
Technology
2
1.4k
メルカリの開発スピードと品質を支える Selenium on Azure Kubernetes Service
【東京】JJUG ナイトセミナー 「Java on Azure まつり@Microsoft」 6/19(水)開催
https://jjug.doorkeeper.jp/events/92835
Tadashi Nemoto
June 19, 2019
Tweet
Share
More Decks by Tadashi Nemoto
See All by Tadashi Nemoto
Best Practice CI/CD Pipeline for Deploying Container Apps to AWS
tadashi0713
0
200
Scalable and cloud-native mobile game CI/CD environment using Unity
tadashi0713
0
130
Migrating your mobile CI/CD environment to a scalable cloud solution using CircleCI
tadashi0713
0
230
Speed matters: Advanced CI/CD techniques to improve development velocity, quality & security
tadashi0713
0
290
AWS Graviton 環境への CI _ CD パイプラインを CircleCI で実現しよう (AWS Fargate 編)
tadashi0713
0
340
10x deployment frequency using GitLab Flow and GitHub Actions on AWS ECS
tadashi0713
0
560
デプロイ頻度を10倍にした、ブランチ戦略とGitHub Actions on AWS ECS
tadashi0713
8
4.3k
Creating parallelized Android UITest (Appium) environment using Azure, Docker and Android emulator
tadashi0713
0
4k
Docker × Androidエミュレーターを使ったAppiumテスト環境
tadashi0713
3
4.6k
Other Decks in Technology
See All in Technology
タイミーのデータモデリング事例と今後のチャレンジ
ttccddtoki
6
2.4k
united airlines ™®️ USA Contact Numbers: Complete 2025 Support Guide
flyunitedhelp
1
300
Connect 100+を支える技術
kanyamaguc
0
200
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
27k
品質と速度の両立:生成AI時代の品質保証アプローチ
odasho
1
340
Core Audio tapを使ったリアルタイム音声処理のお話
yuta0306
0
190
LangSmith×Webhook連携で実現するプロンプトドリブンCI/CD
sergicalsix
1
230
成長し続けるアプリのためのテストと設計の関係、そして意思決定の記録。
sansantech
PRO
0
120
ネットワーク保護はどう変わるのか?re:Inforce 2025最新アップデート解説
tokushun
0
210
敢えて生成AIを使わないマネジメント業務
kzkmaeda
2
440
SaaS型なのに自由度の高い本格CMSでサイト構築と運用のコスパ&タイパUP! MovableType.net の便利機能とユーザー事例のご紹介
masakah
0
110
What’s new in Android development tools
yanzm
0
310
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
329
21k
How to train your dragon (web standard)
notwaldorf
95
6.1k
Adopting Sorbet at Scale
ufuk
77
9.5k
Code Reviewing Like a Champion
maltzj
524
40k
For a Future-Friendly Web
brad_frost
179
9.8k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
20k
Navigating Team Friction
lara
187
15k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
740
The Invisible Side of Design
smashingmag
301
51k
Optimizing for Happiness
mojombo
379
70k
Transcript
メルカリ の開発スピードと品質を支える Selenium on Azure Kubernetes Service 2019/06/19 JJUG ナイトセミナー
Tadashi Nemoto Automation & QA Group
自己紹介 • 根本 征(Nemoto Tadashi) • Automation & QA
(AQA) Group ◦ テスト自動化、テスト環境(CI / CD) ▪ Selenium, Appium, XCUITest • Java 未経験 tadashi0713 tadashi-nemoto
Selenium? • 知っている方? • 触ったことのある方? • 実際に利用・運用している方?
伝えたいこと • Selenium は進化していて、使いやすくなっている • 適切なサイズの Selenium(UI/E2E)テストは 常にテストを回す DevOps 時代には重要
• その上で Selenium テストの並列化・高速化は必須 • Kubernetes(AKS) を使うことによって、 Selenium テストは手軽に並列化・高速化できる
アジェンダ • Selenium とは?・最近の傾向 • DevOps 時代の自動テストと Selenium • メルカリWeb版で進めている
Selenium on Azure Kubenetes Service(AKS)
Selenium とは? ・最近の傾向
Selenium とは? • Webブラウザの自動操作ツール ◦ UI/E2E テストとして用いられる • クロスブラウザ・クロスプラットフォーム •
Javaで実装 • 多言語でテストの作成が可能 ◦ Ruby, Node.js, Python, etc
Selenium のアーキテクチャ 入門、Selenium - Seleniumの仕組み | CodeGrid
Selenium は今も進化している • Selenium 1 (2004年 Core) ◦ Javascript Injection
• Selenium 2 (WebDriver) ◦ Selenium WebDriver • Selenium 3 (2016年) ◦ RCのサポート終了 • Selenium 4 (WIP) ◦ α版が公開済 ◦ 新しい Grid アーキテクチャ SeleniumとWebDriverの最新事情~標準化が進み、 さらに強力なテストツールへ! その影でSelenium IDEは……
Selenium は今も進化している • Selenium 1 (2004年 Core) ◦ Javascript Injection
• Selenium 2 (WebDriver) ◦ Selenium WebDriver • Selenium 3 (2016年) ◦ RCのサポート終了 • Selenium 4 (WIP) ◦ α版が公開済 ◦ 新しい Grid アーキテクチャ SeleniumとWebDriverの最新事情~標準化が進み、 さらに強力なテストツールへ! その影でSelenium IDEは……
Selenium は今も進化している • Selenium 1 (2004年 Core) ◦ Javascript Injection
• Selenium 2 (WebDriver) ◦ Selenium WebDriver • Selenium 3 (2016年) ◦ RCのサポート終了 • Selenium 4 (WIP) ◦ α版が公開済 ◦ 新しい Grid アーキテクチャ SeleniumとWebDriverの最新事情~標準化が進み、 さらに強力なテストツールへ! その影でSelenium IDEは……
マルチブラウザ対応の安定性 WebDriver 標準化 WebDriver - World Wide Web Consortium
https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ マルチブラウザ対応の安定性 WebDriver 標準化
https://webkit.org/blog/6900/webdriver-support-in-safari-10/ マルチブラウザ対応の安定性 WebDriver 標準化
Selenium ラッパーライブラリ Java Selenide Node.js WebdriverIO Groovy Geb
コミュニティ・カンファレンス • SeleniumConf ◦ 年2回実施 ◦ 2019/04 は東京 で実施 https://codezine.jp/article/detail/11199
ここまでのまとめ マルチブラウザ 対応言語、ラッパーライブラリ コミュニティの充実 Selenium は進化していて、 使いやすくなっている
DevOps 時代の自動テストと Selenium
Shift Left Movement ソフトウェアテストの大規模カンファレンス「STARWEST」で学んだ3つのこと https://tech.mercari.com/entry/2018/11/01/124027
DevOps では「常にテストする」 アジャイル開発におけるテストとは? その未来とは何か?【Agile 2018】 https://codezine.jp/article/detail/11033
テストピラミッド 事例で学ぶテストピラミッドを使ったテスト戦略 | Think IT(シンクイット)
E2E/UIテスト in マイクロサービス ビッグデータ、マイクロサービスにおけるテストの変化とは【EuroSTAR 2018】 https://codezine.jp/article/detail/11226
テストピラミッド in マイクロサービス ビッグデータ、マイクロサービスにおけるテストの変化とは【EuroSTAR 2018】 https://codezine.jp/article/detail/11 226
ここまでのまとめ DevOps 時代は、常にテストするため 自動テストは必須 適切なサイズの UI/E2E(Selenium) テスト を速く回すことが重要
メルカリWeb版で進めている Selenium on Azure Kubernetes Service
メルカリ Web版・PC版 https://mercari.com/jp
Web マイクロサービス化 MTC2018 - Web Application as a Microservice Single
PHP Server Team Mercari Team Mercari Box Team Mercari Guide Mercari Mercari Box Mercari Guide
Web マイクロサービス化 Monolithic Service Feature ・ ・ ・ Microservice Microservice
/jp/* /jp/top MTC2018 - Web Application as a Microservice
UIテスト UIテスト UIテスト UIテスト UI テストのタイミング
None
1並列で実行すると約2時間
Selenium Grid 化
Selenium Grid DockerでSelenium Gridを構築して 複数マシンのブラウザ自動テストを行う
Selenium Grid DockerでSelenium Gridを構築して 複数マシンのブラウザ自動テストを行う 課題 Selenium Grid Node
の 環境構築・メンテナンスのコスト → スケールしずらい
コンテナ・Docker 化
docker-selenium https://github.com/SeleniumHQ/docker-selenium
docker-selenium
docker-selenium 課題 docker-selenium を動かすための インスタンスの管理コスト → スケールしずらい
Kubernetes 化
github.com/kubernetes/examples
Kubernetes Node と Pod のスケール
結果
結果 2時間 → 15並列で15分
AKSクラスタのCPU率
AKSクラスタのCPU率 課題 必要なタイミングのみ Kubernetes Node を立ち上げたい
Kubernetes Node の サーバーレス 化
仮想ノード(Virtual Kubelet) on AKS de:code 2019 基調講演
None
ここまでのまとめ Selenium Grid を Kubernetes化することで、ス ケールする並列実行環境を作れる 仮想ノード on AKS
によって 必要なタイミングでのみ立ち上げられる
DevOps / Shift Left へ
まとめ • Selenium を取り巻くテスト自動化は進化している • 適切なサイズの UI/E2E テストは常にテストを回す DevOps 時代には重要
• その上で Selenium テストの並列化・高速化は必須 • AKS, 特に仮想ノードを使うことによって、Selenium テストは 手軽に並列化・高速化できる
[参考]少ないテストボリュームであれば Azure Pipelines Azure Pipelines で Chrome / Firefox /
Safari / IE の Seleniumブラウザテストを実行させる https://tadashi0713.com/azure_pipelines_selenium
[参考] Zalenium ライブプレビュー / 動画録画 / Selenium Node のオートスケール https://github.com/zalando/zalenium