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
American airlines ®️ USA Contact Numbers: Complete 2025 Support Guide
airhelpsupport
0
390
shake-upを科学する
rsakata
7
790
20250707-AI活用の個人差を埋めるチームづくり
shnjtk
6
4k
IPA&AWSダブル全冠が明かす、人生を変えた勉強法のすべて
iwamot
PRO
2
190
How Do I Contact HP Printer Support? [Full 2025 Guide for U.S. Businesses]
harrry1211
0
130
AIエージェントが書くのなら直接CloudFormationを書かせればいいじゃないですか何故AWS CDKを使う必要があるのさ
watany
9
2.3k
60以上のプロダクトを持つ組織における開発者体験向上への取り組み - チームAPIとBackstageで構築する組織の可視化基盤 - / sre next 2025 Efforts to Improve Developer Experience in an Organization with Over 60 Products
vtryo
2
490
いつの間にか入れ替わってる!?新しいAWS Security Hubとは?
cmusudakeisuke
0
140
改めてAWS WAFを振り返る~業務で使うためのポイント~
masakiokuda
2
300
サイバーエージェントグループのSRE10年の歩みとAI時代の生存戦略
shotatsuge
4
420
Coinbase™®️ USA Contact Numbers: Complete 2025 Support Guide
officialcoinbasehelpcenter
0
460
ABEMAの本番環境負荷試験への挑戦
mk2taiga
4
310
Featured
See All Featured
Fireside Chat
paigeccino
37
3.5k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Speed Design
sergeychernyshev
32
1k
Embracing the Ebb and Flow
colly
86
4.7k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.7k
Being A Developer After 40
akosma
90
590k
The Cost Of JavaScript in 2023
addyosmani
51
8.5k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.4k
Site-Speed That Sticks
csswizardry
10
690
Balancing Empowerment & Direction
lara
1
440
Large-scale JavaScript Application Architecture
addyosmani
512
110k
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