$30 off During Our Annual Pro Sale. View Details »
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.5k
メルカリの開発スピードと品質を支える 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
220
Scalable and cloud-native mobile game CI/CD environment using Unity
tadashi0713
0
140
Migrating your mobile CI/CD environment to a scalable cloud solution using CircleCI
tadashi0713
0
240
Speed matters: Advanced CI/CD techniques to improve development velocity, quality & security
tadashi0713
0
300
AWS Graviton 環境への CI _ CD パイプラインを CircleCI で実現しよう (AWS Fargate 編)
tadashi0713
0
360
10x deployment frequency using GitLab Flow and GitHub Actions on AWS ECS
tadashi0713
0
600
デプロイ頻度を10倍にした、ブランチ戦略とGitHub Actions on AWS ECS
tadashi0713
8
4.4k
Creating parallelized Android UITest (Appium) environment using Azure, Docker and Android emulator
tadashi0713
0
4.2k
Docker × Androidエミュレーターを使ったAppiumテスト環境
tadashi0713
3
4.7k
Other Decks in Technology
See All in Technology
Claude Code はじめてガイド -1時間で学べるAI駆動開発の基本と実践-
oikon48
39
21k
ECMAScript仕様の最新動向: プロセスの変化と仕様のトレンド
uhyo
2
310
Eight Engineering Unit 紹介資料
sansan33
PRO
0
5.7k
意外と難しいドメイン駆動設計の話
zozotech
PRO
0
970
MS Ignite 2025で発表されたFoundry IQをRecap
satodayo
3
220
Excelデータ分析で学ぶディメンショナルモデリング ~アジャイルデータモデリングへ向けて~ by @Kazaneya_PR / 20251126
kazaneya
PRO
3
810
MySQL AIとMySQL Studioを使ってみよう
ikomachi226
0
130
Symfony AI in Action
el_stoffel
2
340
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
5
46k
シンプルを極める。アンチパターンなDB設計の本質
facilo_inc
1
940
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
16k
Modern Data Stack大好きマンが語るSnowflakeの魅力
sagara
0
250
Featured
See All Featured
The Language of Interfaces
destraynor
162
25k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.6k
Bash Introduction
62gerente
615
210k
A Tale of Four Properties
chriscoyier
162
23k
Side Projects
sachag
455
43k
Navigating Team Friction
lara
191
16k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
Facilitating Awesome Meetings
lara
57
6.6k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
Why You Should Never Use an ORM
jnunemaker
PRO
60
9.6k
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