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.3k
メルカリの開発スピードと品質を支える 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
130
Scalable and cloud-native mobile game CI/CD environment using Unity
tadashi0713
0
77
Migrating your mobile CI/CD environment to a scalable cloud solution using CircleCI
tadashi0713
0
160
Speed matters: Advanced CI/CD techniques to improve development velocity, quality & security
tadashi0713
0
220
AWS Graviton 環境への CI _ CD パイプラインを CircleCI で実現しよう (AWS Fargate 編)
tadashi0713
0
250
10x deployment frequency using GitLab Flow and GitHub Actions on AWS ECS
tadashi0713
0
480
デプロイ頻度を10倍にした、ブランチ戦略とGitHub Actions on AWS ECS
tadashi0713
8
3.9k
Creating parallelized Android UITest (Appium) environment using Azure, Docker and Android emulator
tadashi0713
0
3.7k
Docker × Androidエミュレーターを使ったAppiumテスト環境
tadashi0713
3
4.5k
Other Decks in Technology
See All in Technology
あなたの知らないiOS開発の世界
recruitengineers
PRO
3
180
不動産 x AIことはじめ~データの真価を拓くために
estie
0
110
「自動テストのプラクティスを効果的に学ぶためのカードゲーム」 ( #sqip2024 )
teyamagu
PRO
2
180
JEP 480: Structured Concurrency
aya_ebata
0
130
フルカイテン株式会社 採用資料
fullkaiten
0
32k
Tricentisにおけるテスト自動化へのAI活用ご紹介/20240910Shunsuke Katakura
shift_evolve
0
200
PdMはどのように全てのスピードを上げられるか ~ 非連続進化のための具体的な取り組み ~
sansantech
PRO
4
1.3k
Technical Writing Meetup vol.35
soracom
PRO
2
120
エンジニア視点で見る、 組織で運用されるデザインシステムにするには
shunya078
1
310
自作Cコンパイラ 8時間の奮闘
soukouki
0
850
ついに出た!OpenAIの最新モデル「o1」って何がすごいの?
minorun365
PRO
3
1.2k
テスト”ケース”駆動開発 で手戻りをなくそう
ryohma0510
0
320
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
42
5.7k
A Tale of Four Properties
chriscoyier
155
22k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
354
29k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
109
6.9k
The World Runs on Bad Software
bkeepers
PRO
64
11k
Typedesign – Prime Four
hannesfritz
39
2.3k
Build your cross-platform service in a week with App Engine
jlugia
228
18k
Rebuilding a faster, lazier Slack
samanthasiow
78
8.6k
Being A Developer After 40
akosma
84
590k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
The Invisible Side of Design
smashingmag
296
50k
Side Projects
sachag
451
42k
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