SlideShare uma empresa Scribd logo
1 de 19
川口耕介
CloudBees, Inc.
AndroidをHudsonで動かす
 基本的には簡単
 Androidのビルドはantベースなので
 Hudson Android Emulatorプラグイン
 幾つかのテクニックを紹介
ステップ1
 目標
 Androidアプリのビルドを自動化する
 デジタル署名
 利点
 トレーサビリティ
デジタル署名
 「秘密」を一つのzipファイルにまとめる
$ cat key.properties
key.store.password=changeit
key.alias=mykey
key.alias.password=changeit
$ zip secret.zip key.properties my.keystore
デジタル署名
 秘密zipファイルをbuild secretプラグインで保存
デジタル署名
 ビルドのはじめに秘密をロード
cat $KEY/key.properties > local.properties
echo key.store=$KEY/my.keystore >> local.properties
Local.propertiesの生成
 ソースをチェックアウト後、環境依存情報を生成する
 内容
$ android update project --path . --subprojects
$ cat local.properties
…
sdk.dir=/usr/local/android-sdk-linux_x86
ステップ2
 目標
 テストを走らせる
 テスト結果の収集
 利点
 バグの早期発見
 プロジェクトの可視化
Hudson Android プラグイン
 ビルドに先立ってエミュレータを起動
 AVDを自動で作ることもできる
 ビルド終了時にエミュレータを終了
テスト結果の記録
 特別なテストランナーが必要
 http://bit.ly/bsntqc
 機械が読めるテストレポートを残すため
$ ls tests/libs
testutils.jar
$ cat tests/AndroidManifest.xml
…
<instrumentation
android:name="com.neenbedankt.android.test.InstrumentationTestRunner">
テスト結果の記録
 テストレポートを残す
 エミュレータからホストPCへコピー
$ ca tests/build.properties
test.runner=com.neenbedankt.android.test.Instrum
entationTestRunner
adb -s $ANDROID_AVD_DEVICE pull
/data/data/com.foobar.app/files/TEST-all.xml
コードカバレッジ
 残念!
 HTMLリポートしか出力できない
ステップ3
 目標
 多環境同時テスト
 テスト結果の集計
マルチ構成プロジェクト
 一つの設定から多数の環境を同時ビルド
 パラメータで微妙に異なる環境を作り出す
 大規模なテストを素早く実行できる
 その分、計算機は多数必要
 適当に間引いたり、サブセットをビルドしたりもできる
 Android以外でも色々使える
まとめ
 Hudson + Android
 リリースの自動化
 テストの自動化
 多数の異なる環境でのテストの並列実行
HudsonとAndroid

Mais conteúdo relacionado

Mais procurados

スケールするシステムにおけるエンティティの扱いと 分散ID生成
スケールするシステムにおけるエンティティの扱いと 分散ID生成スケールするシステムにおけるエンティティの扱いと 分散ID生成
スケールするシステムにおけるエンティティの扱いと 分散ID生成TanUkkii
 
Insight into Azure Active Directory - Azure AD Custom Role & Scope
Insight into Azure Active Directory - Azure AD Custom Role & ScopeInsight into Azure Active Directory - Azure AD Custom Role & Scope
Insight into Azure Active Directory - Azure AD Custom Role & ScopeKazuki Takai
 
IoT のセキュリティアーキテクチャと実装モデル on Azure
IoT のセキュリティアーキテクチャと実装モデル on AzureIoT のセキュリティアーキテクチャと実装モデル on Azure
IoT のセキュリティアーキテクチャと実装モデル on Azurejunichi anno
 
JAZUG Nagoya Windows Azure Update 20140301
JAZUG Nagoya Windows Azure Update 20140301JAZUG Nagoya Windows Azure Update 20140301
JAZUG Nagoya Windows Azure Update 20140301Ayako Omori
 
[Microsoft Ignite 2020] CON130 ハイライト振り返り - Japan Session
[Microsoft Ignite 2020] CON130 ハイライト振り返り - Japan Session[Microsoft Ignite 2020] CON130 ハイライト振り返り - Japan Session
[Microsoft Ignite 2020] CON130 ハイライト振り返り - Japan Session日本マイクロソフト株式会社
 
Kubernetesのしくみ やさしく学ぶ 内部構造とアーキテクチャー
Kubernetesのしくみ やさしく学ぶ 内部構造とアーキテクチャーKubernetesのしくみ やさしく学ぶ 内部構造とアーキテクチャー
Kubernetesのしくみ やさしく学ぶ 内部構造とアーキテクチャーToru Makabe
 
Azure AD によるリソースの保護 how to protect and govern resources under the Azure AD
Azure AD によるリソースの保護 how to protect and govern resources under the Azure ADAzure AD によるリソースの保護 how to protect and govern resources under the Azure AD
Azure AD によるリソースの保護 how to protect and govern resources under the Azure ADjunichi anno
 
Microsoft Azure Update 20151112
Microsoft Azure Update 20151112Microsoft Azure Update 20151112
Microsoft Azure Update 20151112Ayako Omori
 
インフラ野郎 Azureチーム at クラウド boost
インフラ野郎 Azureチーム at クラウド boostインフラ野郎 Azureチーム at クラウド boost
インフラ野郎 Azureチーム at クラウド boostToru Makabe
 
深層学習 環境構築 Azure
深層学習 環境構築 Azure深層学習 環境構築 Azure
深層学習 環境構築 AzureYuki Hattori
 
最新Active DirectoryによるIDMaaSとハイブリッド認証基盤の実現
最新Active DirectoryによるIDMaaSとハイブリッド認証基盤の実現最新Active DirectoryによるIDMaaSとハイブリッド認証基盤の実現
最新Active DirectoryによるIDMaaSとハイブリッド認証基盤の実現junichi anno
 

Mais procurados (14)

スケールするシステムにおけるエンティティの扱いと 分散ID生成
スケールするシステムにおけるエンティティの扱いと 分散ID生成スケールするシステムにおけるエンティティの扱いと 分散ID生成
スケールするシステムにおけるエンティティの扱いと 分散ID生成
 
【de:code 2020】 Azure インフラ 最新アップデート!!
【de:code 2020】 Azure インフラ 最新アップデート!!【de:code 2020】 Azure インフラ 最新アップデート!!
【de:code 2020】 Azure インフラ 最新アップデート!!
 
Insight into Azure Active Directory - Azure AD Custom Role & Scope
Insight into Azure Active Directory - Azure AD Custom Role & ScopeInsight into Azure Active Directory - Azure AD Custom Role & Scope
Insight into Azure Active Directory - Azure AD Custom Role & Scope
 
IoT のセキュリティアーキテクチャと実装モデル on Azure
IoT のセキュリティアーキテクチャと実装モデル on AzureIoT のセキュリティアーキテクチャと実装モデル on Azure
IoT のセキュリティアーキテクチャと実装モデル on Azure
 
Jetson x Azure ハンズオン DeepStream With Azure IoT
Jetson x Azure ハンズオン DeepStream With Azure IoTJetson x Azure ハンズオン DeepStream With Azure IoT
Jetson x Azure ハンズオン DeepStream With Azure IoT
 
JAZUG Nagoya Windows Azure Update 20140301
JAZUG Nagoya Windows Azure Update 20140301JAZUG Nagoya Windows Azure Update 20140301
JAZUG Nagoya Windows Azure Update 20140301
 
[Microsoft Ignite 2020] CON130 ハイライト振り返り - Japan Session
[Microsoft Ignite 2020] CON130 ハイライト振り返り - Japan Session[Microsoft Ignite 2020] CON130 ハイライト振り返り - Japan Session
[Microsoft Ignite 2020] CON130 ハイライト振り返り - Japan Session
 
Kubernetesのしくみ やさしく学ぶ 内部構造とアーキテクチャー
Kubernetesのしくみ やさしく学ぶ 内部構造とアーキテクチャーKubernetesのしくみ やさしく学ぶ 内部構造とアーキテクチャー
Kubernetesのしくみ やさしく学ぶ 内部構造とアーキテクチャー
 
Non-coding! Azure
Non-coding! AzureNon-coding! Azure
Non-coding! Azure
 
Azure AD によるリソースの保護 how to protect and govern resources under the Azure AD
Azure AD によるリソースの保護 how to protect and govern resources under the Azure ADAzure AD によるリソースの保護 how to protect and govern resources under the Azure AD
Azure AD によるリソースの保護 how to protect and govern resources under the Azure AD
 
Microsoft Azure Update 20151112
Microsoft Azure Update 20151112Microsoft Azure Update 20151112
Microsoft Azure Update 20151112
 
インフラ野郎 Azureチーム at クラウド boost
インフラ野郎 Azureチーム at クラウド boostインフラ野郎 Azureチーム at クラウド boost
インフラ野郎 Azureチーム at クラウド boost
 
深層学習 環境構築 Azure
深層学習 環境構築 Azure深層学習 環境構築 Azure
深層学習 環境構築 Azure
 
最新Active DirectoryによるIDMaaSとハイブリッド認証基盤の実現
最新Active DirectoryによるIDMaaSとハイブリッド認証基盤の実現最新Active DirectoryによるIDMaaSとハイブリッド認証基盤の実現
最新Active DirectoryによるIDMaaSとハイブリッド認証基盤の実現
 

Semelhante a HudsonとAndroid

Google Container Engine (GKE) & Kubernetes のアーキテクチャ解説
Google Container Engine (GKE) & Kubernetes のアーキテクチャ解説Google Container Engine (GKE) & Kubernetes のアーキテクチャ解説
Google Container Engine (GKE) & Kubernetes のアーキテクチャ解説Samir Hammoudi
 
Android Lecture #01 @PRO&BSC Inc.
Android Lecture #01 @PRO&BSC Inc.Android Lecture #01 @PRO&BSC Inc.
Android Lecture #01 @PRO&BSC Inc.Yuki Higuchi
 
Windows Phoneの 企業内活用方法、 社内向けアプリ開発と展開
Windows Phoneの企業内活用方法、社内向けアプリ開発と展開Windows Phoneの企業内活用方法、社内向けアプリ開発と展開
Windows Phoneの 企業内活用方法、 社内向けアプリ開発と展開Akira Onishi
 
Cordovaコトハジメ( Html5fun×senchUG )
Cordovaコトハジメ( Html5fun×senchUG )Cordovaコトハジメ( Html5fun×senchUG )
Cordovaコトハジメ( Html5fun×senchUG )Masayuki Abe
 
プロトコルから見るID連携
プロトコルから見るID連携プロトコルから見るID連携
プロトコルから見るID連携Naohiro Fujie
 
Malwat4 20130223 analyzing_android_malware
Malwat4 20130223 analyzing_android_malwareMalwat4 20130223 analyzing_android_malware
Malwat4 20130223 analyzing_android_malwareAyase
 
【de:code 2020】 そのロジック、IoT Edge で動きます - Azure IoT Edge 開発 Deep Dive
【de:code 2020】 そのロジック、IoT Edge で動きます - Azure IoT Edge 開発 Deep Dive【de:code 2020】 そのロジック、IoT Edge で動きます - Azure IoT Edge 開発 Deep Dive
【de:code 2020】 そのロジック、IoT Edge で動きます - Azure IoT Edge 開発 Deep Dive日本マイクロソフト株式会社
 
20200516 selenium-meetup-winappdriver
20200516 selenium-meetup-winappdriver20200516 selenium-meetup-winappdriver
20200516 selenium-meetup-winappdriverHiroko Tamagawa
 
勉強会キット Windows Server 2012 R2 評価版 BYOD 編 v2 20131020 版
勉強会キット Windows Server 2012 R2 評価版 BYOD 編 v2 20131020 版勉強会キット Windows Server 2012 R2 評価版 BYOD 編 v2 20131020 版
勉強会キット Windows Server 2012 R2 評価版 BYOD 編 v2 20131020 版junichi anno
 
テスト駆動開発の進化
テスト駆動開発の進化テスト駆動開発の進化
テスト駆動開発の進化Yukei Wachi
 
はじめてのAzure Web App for Containers! -コンテナの基礎から DevOps 環境の構築まで-
はじめてのAzure Web App for Containers! -コンテナの基礎から DevOps 環境の構築まで-はじめてのAzure Web App for Containers! -コンテナの基礎から DevOps 環境の構築まで-
はじめてのAzure Web App for Containers! -コンテナの基礎から DevOps 環境の構築まで-Saki Homma
 
オトナのDocker入門
オトナのDocker入門オトナのDocker入門
オトナのDocker入門Tsukasa Kato
 

Semelhante a HudsonとAndroid (20)

Google Container Engine (GKE) & Kubernetes のアーキテクチャ解説
Google Container Engine (GKE) & Kubernetes のアーキテクチャ解説Google Container Engine (GKE) & Kubernetes のアーキテクチャ解説
Google Container Engine (GKE) & Kubernetes のアーキテクチャ解説
 
Introduce React Native
Introduce React NativeIntroduce React Native
Introduce React Native
 
Android Lecture #01 @PRO&BSC Inc.
Android Lecture #01 @PRO&BSC Inc.Android Lecture #01 @PRO&BSC Inc.
Android Lecture #01 @PRO&BSC Inc.
 
Windows Phoneの 企業内活用方法、 社内向けアプリ開発と展開
Windows Phoneの企業内活用方法、社内向けアプリ開発と展開Windows Phoneの企業内活用方法、社内向けアプリ開発と展開
Windows Phoneの 企業内活用方法、 社内向けアプリ開発と展開
 
Cocos2d-xによる最新ゲーム開発
Cocos2d-xによる最新ゲーム開発Cocos2d-xによる最新ゲーム開発
Cocos2d-xによる最新ゲーム開発
 
Jetson x Azure ハンズオン DeepStream With Azure IoT 事前準備
Jetson x Azure ハンズオン DeepStream With Azure IoT 事前準備Jetson x Azure ハンズオン DeepStream With Azure IoT 事前準備
Jetson x Azure ハンズオン DeepStream With Azure IoT 事前準備
 
M04_失敗しないための Azure Virtual Desktop 設計ガイド
M04_失敗しないための Azure Virtual Desktop 設計ガイドM04_失敗しないための Azure Virtual Desktop 設計ガイド
M04_失敗しないための Azure Virtual Desktop 設計ガイド
 
Kii cloud 勉強会 #2
Kii cloud 勉強会 #2Kii cloud 勉強会 #2
Kii cloud 勉強会 #2
 
Cordovaコトハジメ( Html5fun×senchUG )
Cordovaコトハジメ( Html5fun×senchUG )Cordovaコトハジメ( Html5fun×senchUG )
Cordovaコトハジメ( Html5fun×senchUG )
 
Introduction sdk
Introduction sdkIntroduction sdk
Introduction sdk
 
プロトコルから見るID連携
プロトコルから見るID連携プロトコルから見るID連携
プロトコルから見るID連携
 
Malwat4 20130223 analyzing_android_malware
Malwat4 20130223 analyzing_android_malwareMalwat4 20130223 analyzing_android_malware
Malwat4 20130223 analyzing_android_malware
 
Web Component概要
Web Component概要Web Component概要
Web Component概要
 
【de:code 2020】 そのロジック、IoT Edge で動きます - Azure IoT Edge 開発 Deep Dive
【de:code 2020】 そのロジック、IoT Edge で動きます - Azure IoT Edge 開発 Deep Dive【de:code 2020】 そのロジック、IoT Edge で動きます - Azure IoT Edge 開発 Deep Dive
【de:code 2020】 そのロジック、IoT Edge で動きます - Azure IoT Edge 開発 Deep Dive
 
20200516 selenium-meetup-winappdriver
20200516 selenium-meetup-winappdriver20200516 selenium-meetup-winappdriver
20200516 selenium-meetup-winappdriver
 
勉強会キット Windows Server 2012 R2 評価版 BYOD 編 v2 20131020 版
勉強会キット Windows Server 2012 R2 評価版 BYOD 編 v2 20131020 版勉強会キット Windows Server 2012 R2 評価版 BYOD 編 v2 20131020 版
勉強会キット Windows Server 2012 R2 評価版 BYOD 編 v2 20131020 版
 
テスト駆動開発の進化
テスト駆動開発の進化テスト駆動開発の進化
テスト駆動開発の進化
 
はじめてのAzure Web App for Containers! -コンテナの基礎から DevOps 環境の構築まで-
はじめてのAzure Web App for Containers! -コンテナの基礎から DevOps 環境の構築まで-はじめてのAzure Web App for Containers! -コンテナの基礎から DevOps 環境の構築まで-
はじめてのAzure Web App for Containers! -コンテナの基礎から DevOps 環境の構築まで-
 
オトナのDocker入門
オトナのDocker入門オトナのDocker入門
オトナのDocker入門
 
Android Wear Apps
Android Wear AppsAndroid Wear Apps
Android Wear Apps
 

Último

What I did before opening my business..pdf
What I did before opening my business..pdfWhat I did before opening my business..pdf
What I did before opening my business..pdfoganekyokoi
 
3年前期 交通基盤工学 第一回 ガイダンス 交通基盤工学の概要  パワーポイント
3年前期 交通基盤工学 第一回 ガイダンス 交通基盤工学の概要  パワーポイント3年前期 交通基盤工学 第一回 ガイダンス 交通基盤工学の概要  パワーポイント
3年前期 交通基盤工学 第一回 ガイダンス 交通基盤工学の概要  パワーポイントshu1108hina1020
 
レポートの書き方講座 [大学生初年次向けに対する講義資料] Lecture on how to write a report [lecture mater...
レポートの書き方講座 [大学生初年次向けに対する講義資料] Lecture on how to write a report [lecture mater...レポートの書き方講座 [大学生初年次向けに対する講義資料] Lecture on how to write a report [lecture mater...
レポートの書き方講座 [大学生初年次向けに対する講義資料] Lecture on how to write a report [lecture mater...yutakashikano1984
 
International Politics I - Lecture 1
International Politics I - Lecture 1International Politics I - Lecture 1
International Politics I - Lecture 1Toru Oga
 
Divorce agreements in administrative work.pdf
Divorce agreements in administrative work.pdfDivorce agreements in administrative work.pdf
Divorce agreements in administrative work.pdfoganekyokoi
 
KARAPATANG PANTAO.pptxhrhrhrhrhrhrhrhrhr
KARAPATANG PANTAO.pptxhrhrhrhrhrhrhrhrhrKARAPATANG PANTAO.pptxhrhrhrhrhrhrhrhrhr
KARAPATANG PANTAO.pptxhrhrhrhrhrhrhrhrhrRodolfFernandez1
 
Registration of travel agents - 'Explanation of the registration system under...
Registration of travel agents - 'Explanation of the registration system under...Registration of travel agents - 'Explanation of the registration system under...
Registration of travel agents - 'Explanation of the registration system under...oganekyokoi
 
Establishment and operation of medical corporations.pdf
Establishment and operation of medical corporations.pdfEstablishment and operation of medical corporations.pdf
Establishment and operation of medical corporations.pdfoganekyokoi
 

Último (8)

What I did before opening my business..pdf
What I did before opening my business..pdfWhat I did before opening my business..pdf
What I did before opening my business..pdf
 
3年前期 交通基盤工学 第一回 ガイダンス 交通基盤工学の概要  パワーポイント
3年前期 交通基盤工学 第一回 ガイダンス 交通基盤工学の概要  パワーポイント3年前期 交通基盤工学 第一回 ガイダンス 交通基盤工学の概要  パワーポイント
3年前期 交通基盤工学 第一回 ガイダンス 交通基盤工学の概要  パワーポイント
 
レポートの書き方講座 [大学生初年次向けに対する講義資料] Lecture on how to write a report [lecture mater...
レポートの書き方講座 [大学生初年次向けに対する講義資料] Lecture on how to write a report [lecture mater...レポートの書き方講座 [大学生初年次向けに対する講義資料] Lecture on how to write a report [lecture mater...
レポートの書き方講座 [大学生初年次向けに対する講義資料] Lecture on how to write a report [lecture mater...
 
International Politics I - Lecture 1
International Politics I - Lecture 1International Politics I - Lecture 1
International Politics I - Lecture 1
 
Divorce agreements in administrative work.pdf
Divorce agreements in administrative work.pdfDivorce agreements in administrative work.pdf
Divorce agreements in administrative work.pdf
 
KARAPATANG PANTAO.pptxhrhrhrhrhrhrhrhrhr
KARAPATANG PANTAO.pptxhrhrhrhrhrhrhrhrhrKARAPATANG PANTAO.pptxhrhrhrhrhrhrhrhrhr
KARAPATANG PANTAO.pptxhrhrhrhrhrhrhrhrhr
 
Registration of travel agents - 'Explanation of the registration system under...
Registration of travel agents - 'Explanation of the registration system under...Registration of travel agents - 'Explanation of the registration system under...
Registration of travel agents - 'Explanation of the registration system under...
 
Establishment and operation of medical corporations.pdf
Establishment and operation of medical corporations.pdfEstablishment and operation of medical corporations.pdf
Establishment and operation of medical corporations.pdf
 

HudsonとAndroid