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 Service
Search
Tadashi Nemoto
June 19, 2019
Technology
2
1.2k
メルカリの開発スピードと品質を支える 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
110
Scalable and cloud-native mobile game CI/CD environment using Unity
tadashi0713
0
62
Migrating your mobile CI/CD environment to a scalable cloud solution using CircleCI
tadashi0713
0
140
Speed matters: Advanced CI/CD techniques to improve development velocity, quality & security
tadashi0713
0
220
AWS Graviton 環境への CI _ CD パイプラインを CircleCI で実現しよう (AWS Fargate 編)
tadashi0713
0
230
10x deployment frequency using GitLab Flow and GitHub Actions on AWS ECS
tadashi0713
0
470
デプロイ頻度を10倍にした、ブランチ戦略とGitHub Actions on AWS ECS
tadashi0713
8
3.8k
Creating parallelized Android UITest (Appium) environment using Azure, Docker and Android emulator
tadashi0713
0
3.6k
Docker × Androidエミュレーターを使ったAppiumテスト環境
tadashi0713
3
4.4k
Other Decks in Technology
See All in Technology
CEL(Common Expression Language)で書いた条件にマッチしたIAM Policyを見つける / iam-policy-finder
fujiwara3
0
710
DevIO2024_レガシー運用からの脱却 -クラウド活用の実践事例とベストプラクティス-
jun2882
0
210
サービスの持続的な成長と技術負債について
siva_official
PRO
10
4.4k
Github Actions 로 Android 팀의 효율성 극대화
hadonghyun
0
160
How to Think Like a Performance Engineer
csswizardry
4
590
ここがすごいよ! AWS Systems Manager!
saichan11
0
1.8k
CTOから見た事業開発とプロダクト開発 / My Perspective on Business and Product Development as CTO
keisuke69
4
960
[NIKKEI Tech Talk]Bias for Action!! 実践から学ぶための仕組とコミュニティ / Community for Practice and Learning
kanamasa
0
260
サーバーレスAPI(API Gateway+Lambda)とNext.jsで 個人ブログを作ろう!
shuntaka
PRO
0
560
クラウド利用者の「責任」をどう果たす?AWSセキュリティ対策のススメ #AWSSummit
hiashisan
0
270
Scaling Technical Excellence at 104: Evolution in AWS and Developer Empowerment
scotthsieh825
1
150
Luupの開発組織におけるインシデントマネジメントの変遷 ver.RoadtoSRENEXT2024
grimoh
1
270
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
63
4.2k
Building Effective Engineering Teams - LeadDev
addyosmani
47
2.2k
Speed Design
sergeychernyshev
9
270
Embracing the Ebb and Flow
colly
81
4.3k
For a Future-Friendly Web
brad_frost
173
9.2k
Why You Should Never Use an ORM
jnunemaker
PRO
51
8.9k
4 Signs Your Business is Dying
shpigford
178
21k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
17
1.5k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
34
1.9k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
16
1.6k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
24
1.8k
The MySQL Ecosystem @ GitHub 2015
samlambert
248
12k
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