SlideShare a Scribd company logo
マスター タイトルの書式設定
• マスター テキストの書式設定
Vishal
Android Test Night #1
Android e2e Testing at Mercari
マスター タイトルの書式設定
• マスター テキストの書式設定 Software Engineer in Test
Case Study (Mobile Automation)
SWET (past)
Core Member
Vishal Banthia @vbanthia @vbanthia_
マスター タイトルの書式設定
• マスター テキストの書式設定
Agenda
• About Mercari US Android App
• Android UITest Architecture & Design
• Continuous Integration
マスター タイトルの書式設定
• マスター テキストの書式設定
In June, we had a major update in mercari US app.
mercari US app
Native Native Native React-Native
Not Just UI Changes, but complete architecture shift
マスター タイトルの書式設定
• マスター テキストの書式設定• While deciding new architecture, easy testability was always a priority
• One of the reason to use dependency-injection pattern is above and
we use Dagger2 for this. With this, mocking objects is pretty easy and
can increase UnitTest coverage
• We always try to keep low-level UnitTest coverage high following Test
Pyramid Principle
New Architecture
Note: More technical details can be read here (http://tech.mercari.com/entry/2017/07/19/123443)
マスター タイトルの書式設定
• マスター テキストの書式設定
But UITesting is always challenging
and was so for US
マスター タイトルの書式設定
• マスター テキストの書式設定
• After joining mercari, this was my first big project. Following objectives
were in mind:
• Adding new test scenarios and maintaining old ones should be painless
• High reliability so that flaky tests are not wasting developers and QA
engineers time
• Scalable architecture to minimize test run time
• Tests should run on real devices instead of emulators
• Minimum operational cost for infrastructure and CI management
• Test reports should have all the important information required for
debugging if test fails
• Super portable, should be easy to copy for other products
Android UITesting
マスター タイトルの書式設定
• マスター テキストの書式設定
UITest High Level Architecture
Ruby
RSpec
AppiumKit
Appium
UIAutomator2
Test Script Automation tool App Under Test
(MercariKit)
マスター タイトルの書式設定
• マスター テキストの書式設定
appium_kit (Ruby Library)
A simple ruby gem which extends famous selenium testing
ruby library such as Capybara, SitePrism for Appium
マスター タイトルの書式設定
• マスター テキストの書式設定
Selenium Web Testing in Ruby
selenium-webdriver
capybara watir
site_prism page-object
rspec cucumber test-unit
マスター タイトルの書式設定
• マスター テキストの書式設定
Quick Overview
● selenium-webdriver is the ruby binding for Selenium
● capybara provides DSL to help writing web tests easily
● page-object design pattern helps in maintaining test easily
● site_prism provides DSL to write pages easily
These libraries have proved themselves for so long, we wanted to use something which we can
rely and can also use same stack for web-testing that is why, simple appium_kit gem.
マスター タイトルの書式設定
• マスター テキストの書式設定
appium_kit
selenium-webdriver
capybara
site_prism
rspec
appium-driver
capybara-appium
site_prism
rspec helpers / formatter
appium_kit
マスター タイトルの書式設定
• マスター テキストの書式設定
UITest Low Level Architecture
user_profile_spec.rb (rspec)
UserProfilePage < SitePrism::PageUtils
Helpers
マスター タイトルの書式設定
• マスター テキストの書式設定
Overview
• Pages
• All the application related information such as ids, static text etc are tied
with Page Object. Test will talk to application using either helpers or
pages. Test can not access application directly.
• 1 Activity ~= 1 Page
• Helpers
• Helper binds pages together
• Utils
• Utilities such as RandomGen, AdbUtil etc. Not directly related to AUT
• Configs
• Static testdata
マスター タイトルの書式設定
• マスター テキストの書式設定
Running Tests
マスター タイトルの書式設定
• マスター テキストの書式設定
Rake Tasks
bundle exec download_apk bundle exec rake spec
Environment Variables
● BUILD_NUMBER
Environment Variables
● ENVIRONMENT
● FEATURES
● ...
マスター タイトルの書式設定
• マスター テキストの書式設定
Dockerizing UITests
• Dockerizing tests helps in sandboxing environment.
• Deploying / Running tests becomes very easy. Do not
need to worry about run environment
• Many more benefits …
More Details: https://github.com/vbanthia/appium-docker-demo
マスター タイトルの書式設定
• マスター テキストの書式設定
Dockerfile
https://github.com/vbanthia/docker-appium
マスター タイトルの書式設定
• マスター テキストの書式設定
run_uitest.sh
• Reserve a device on STF
• Remote connect
• Download apk
• Start appium server
• Run test
マスター タイトルの書式設定
• マスター テキストの書式設定
Continuous Integration
マスター タイトルの書式設定
• マスター テキストの書式設定
Mercari Android CI (Tools & Service)
• Bitrise: To build application
• Google Cloud Storage: To store built apks
• Google Container Registry: To store docker images
• OpenSTF: For Android Device Farm
• CircleCI 2.0: Build docker image & run tests in parallel containers
• CircleCI Artifacts: To store test reports
• AWS Lambda: To trigger nightly builds
• Slack: Notification & manual triggers
マスター タイトルの書式設定
• マスター テキストの書式設定
Application Build Pipeline
Developer Github Bitrise GCS
1. Developer pushes code to Github
2. Github triggers Bitrise
3. Bitrise build app and upload it to GCS
This make sure that we have all the apks
in GCS with their build number linked
マスター タイトルの書式設定
• マスター テキストの書式設定
UITest docker image build pipeline
Developer Github CircleCI GCR
1. Developer pushes code to Github
2. Github triggers CircleCI
3. CircleCI build docker image for uitest
and pushed it to google container
registry
This make sure that we have all the
docker image of latest test code any time
マスター タイトルの書式設定
• マスター テキストの書式設定
UITest Pipeline
マスター タイトルの書式設定
• マスター テキストの書式設定
OpenSTF
マスター タイトルの書式設定
• マスター テキストの書式設定
マスター タイトルの書式設定
• マスター テキストの書式設定
UITests Pipeline
CircleCI Job
AWS Lambda
Slack
Connect remote deviceDownload apk
Run UITests
(device1)
Run UITests
(device2)
Run UITests
(device3)
Test reports
CircleCI Artifact
マスター タイトルの書式設定
• マスター テキストの書式設定
Benefits
• Everything is on cloud, we only have devices connected to
mac-mini which only needs adb to work
• Always ready to run
• No need to worry about on-premise infra (Jenkins etc...)
マスター タイトルの書式設定
• マスター テキストの書式設定
Test Reports
マスター タイトルの書式設定
• マスター テキストの書式設定
マスター タイトルの書式設定
• マスター テキストの書式設定
マスター タイトルの書式設定
• マスター テキストの書式設定
マスター タイトルの書式設定
• マスター テキストの書式設定
マスター タイトルの書式設定
• マスター テキストの書式設定
RSpec HTML Formatter2
● https://github.com/vbanthia/rspec_html_formatter2
● Features:
o Beautiful html report using Bootstrap css/js
o Supports screenshots & screenrecords
マスター タイトルの書式設定
• マスター テキストの書式設定
Thank you

More Related Content

PPTX
コードレビューをより良くする Danger x Android
PPTX
2017年のiOSアプリ開発におけるCI事情
PPTX
バージョンアップ対応を軽減するサービス:マスティフ
PPTX
UIテストの実行時間の短縮の方法
PPTX
fastlane x iOSアプリのCI
PDF
iOSにおけるコードレビューを一歩先へ進める
PPTX
Pull request時の画面差分取得の自動化
PPTX
Xcodeの管理を楽に - Jenkins編 -
コードレビューをより良くする Danger x Android
2017年のiOSアプリ開発におけるCI事情
バージョンアップ対応を軽減するサービス:マスティフ
UIテストの実行時間の短縮の方法
fastlane x iOSアプリのCI
iOSにおけるコードレビューを一歩先へ進める
Pull request時の画面差分取得の自動化
Xcodeの管理を楽に - Jenkins編 -

What's hot (20)

PPTX
Dangerでpull requestレビューの指摘事項を減らす
PPTX
マスティフ (for Xcode beta) - バージョンアップ対応を軽減するためのサービス
PPTX
fastlane snapshotの並列実行についてまとめてみた
PPTX
iOSアプリの自動テストをはじめよう
PPTX
DeNAにおけるSWETの役割
PPTX
Xcode10での テスト周りの進化をふりかえる
PPTX
Bluepillを使ったiOS自動テストの並列化
PPTX
バージョンアップの対応を軽減するためのサービスの構築
PPTX
iOSアプリ開発のCI環境 - Jenkins編 -
PPTX
iOSアプリにおけるリリースフローとCI環境
PPTX
Androidアプリ開発のテスト環境
PPTX
DroidKaigi_devicefarm
PPTX
スマホアプリディレクターが考えていること
PDF
iOSで利用できるデバイスファームのメリット・デメリットの紹介
PPTX
Android ReactNative UITesting
PPTX
iOSアプリ開発のテスト環境 - テストをはじめる最初の一歩 -
PDF
SEゼミ2015 - OSS Hack 4 Beginners - フィードバック
PDF
20151021 cookpad talk_test_engineer
PDF
CEDEC2015_スマホゲーム開発を支えろ!〜汗と涙のQAエンジニアリング〜
PPTX
5minQues - SWET近況報告
Dangerでpull requestレビューの指摘事項を減らす
マスティフ (for Xcode beta) - バージョンアップ対応を軽減するためのサービス
fastlane snapshotの並列実行についてまとめてみた
iOSアプリの自動テストをはじめよう
DeNAにおけるSWETの役割
Xcode10での テスト周りの進化をふりかえる
Bluepillを使ったiOS自動テストの並列化
バージョンアップの対応を軽減するためのサービスの構築
iOSアプリ開発のCI環境 - Jenkins編 -
iOSアプリにおけるリリースフローとCI環境
Androidアプリ開発のテスト環境
DroidKaigi_devicefarm
スマホアプリディレクターが考えていること
iOSで利用できるデバイスファームのメリット・デメリットの紹介
Android ReactNative UITesting
iOSアプリ開発のテスト環境 - テストをはじめる最初の一歩 -
SEゼミ2015 - OSS Hack 4 Beginners - フィードバック
20151021 cookpad talk_test_engineer
CEDEC2015_スマホゲーム開発を支えろ!〜汗と涙のQAエンジニアリング〜
5minQues - SWET近況報告
Ad

Similar to Android e2e testing at mercari (20)

PDF
『 イドラ ファンタシースターサーガ 』を支える GCP | Google Cloud INSIDE Games & Apps
PDF
ケーススタディ/実装 【クラウドアプリケーションのためのオブジェクト指向分析設計講座 第46回】
PDF
Windows 開発者のための Dev&Ops on AWS
PDF
Visual Studio 2012 と ASP.NET に見る、最新 Web 開発の魅力
PDF
hbstudy#82 SRE大全 FullGCとの闘い (UZABSE SRE Team Hirofumi Kubo)
PPTX
Introduction to DocumentDB
PDF
プロビジョニングの今 ーフルマネージド・サービスを目指してー #cmdevio2016 #E
PPTX
同じサービスを ECSとOpsWorksで 運用してみた
PDF
Azure 高速サイトソリューション
PDF
Code for Japan 勉強会 Vol.1 CKAN入門 プロジェクトのFork、デプロイ、CIまで
PDF
SQL Beginners Day #1 - SQL Server および Azure SQL のインストールと管理
PDF
試して学べるクラウド技術! OpenShift
PDF
Application Deployment on AWS
PDF
Jjug springセッション
PPTX
20220409 AWS BLEA 開発にあたって検討したこと
PDF
Web サーバー管理者のための Azure App Service 再入門
PPTX
Slides for tiTokyo 2013 - Japanese version
PPTX
Slides for tiTokyo 2013 - Japanese version
PDF
Scalable Generator: Using Scala in SIer Business (ScalaMatsuri)
PDF
Eight meets AWS
『 イドラ ファンタシースターサーガ 』を支える GCP | Google Cloud INSIDE Games & Apps
ケーススタディ/実装 【クラウドアプリケーションのためのオブジェクト指向分析設計講座 第46回】
Windows 開発者のための Dev&Ops on AWS
Visual Studio 2012 と ASP.NET に見る、最新 Web 開発の魅力
hbstudy#82 SRE大全 FullGCとの闘い (UZABSE SRE Team Hirofumi Kubo)
Introduction to DocumentDB
プロビジョニングの今 ーフルマネージド・サービスを目指してー #cmdevio2016 #E
同じサービスを ECSとOpsWorksで 運用してみた
Azure 高速サイトソリューション
Code for Japan 勉強会 Vol.1 CKAN入門 プロジェクトのFork、デプロイ、CIまで
SQL Beginners Day #1 - SQL Server および Azure SQL のインストールと管理
試して学べるクラウド技術! OpenShift
Application Deployment on AWS
Jjug springセッション
20220409 AWS BLEA 開発にあたって検討したこと
Web サーバー管理者のための Azure App Service 再入門
Slides for tiTokyo 2013 - Japanese version
Slides for tiTokyo 2013 - Japanese version
Scalable Generator: Using Scala in SIer Business (ScalaMatsuri)
Eight meets AWS
Ad

More from Vishal Banthia (6)

PPTX
Securing microservices continuous delivery using grafeas and kritis
PDF
Microservices development at scale
PPTX
Kubernetes Controller for Pull Request Based Environment
PPTX
Microservice Development Using Telepresence
PPTX
Mercari SET and Productivity
PPTX
Reliable mobile test automation
Securing microservices continuous delivery using grafeas and kritis
Microservices development at scale
Kubernetes Controller for Pull Request Based Environment
Microservice Development Using Telepresence
Mercari SET and Productivity
Reliable mobile test automation

Android e2e testing at mercari