beta testing with ci

40
Beta testing with CI Liyao Chen 2014/10/15

Upload: liyao-chen

Post on 01-Dec-2014

347 views

Category:

Engineering


5 download

DESCRIPTION

使用Redmine + Git + TestFlight + Jenkins幫助加速 App開發流程,讓PM安心,RD靜心,BOSS開心。

TRANSCRIPT

Page 1: Beta testing with CI

Beta testing with CILiyao Chen

2014/10/15

Page 2: Beta testing with CI

Before TestFlight• 把⼿手機給RD,RD會把測試版App放到⼿手機

• 無形之中RD⼀一直被中斷

• PM拿到app不知道跟更新哪些功能(所以會問

• 某個功能⼀一下好⼀一下壞

Page 3: Beta testing with CI

原本的流程 出了什麼問題?

Page 4: Beta testing with CI

At first

• 功能做到哪了?!

• 什麼時候可以測?!

• 最新版在哪下載?!

• 這⼀一版哪些功能可以測?!

• 那個醬也要安裝測試版

Page 5: Beta testing with CI

At first

• 你問的是哪⼀一個功能?!

• 就還沒做完怎麼測?!

• 不是都有寄email嗎?!

• 你可以⾃自⼰己看ticket阿!

• 怎麼⼜又要加⼈人了

Page 6: Beta testing with CI

The gap

• 功能做到哪了?!

• 什麼時候可以測?!

• 最新版在哪下載?!

• 這⼀一版哪些功能可以測?!

• 那個醬也要安裝測試版

• 你問的是哪⼀一個功能?!

• 就還沒做完怎麼測?!

• 不是都有寄email嗎?!

• 你可以⾃自⼰己看ticket阿!

• 怎麼⼜又要加⼈人了

PM: 看不到進度很不安 RD: 寫Code就很累了 PM還⼀一直打斷我

Page 7: Beta testing with CI

Release Note

功能做到哪了?!這⼀一版有哪些功能可以測?

每次發版給你Release Note吧

Page 8: Beta testing with CI

Release Note?新建⽴立 已關閉已解決實作中

#13

#12

#11#14

#5

Page 9: Beta testing with CI

Release Note?新建⽴立 已關閉已解決實作中

#13

#12

#11#14

#5

Page 10: Beta testing with CI

Release Note?新建⽴立 已關閉已解決實作中

#13

#12

#11#14

#5

Page 11: Beta testing with CI

Release Note?新建⽴立 已關閉已解決實作中

#12

#14

#13 #11#5

我要驗收哪些?

Page 12: Beta testing with CI

Release Note?新建⽴立 已關閉已解決實作中

#12

#14v1 Release Note!

#11 bug fixed -#13 bug fixed -

#13 #11#5

Page 13: Beta testing with CI

Release Note?新建⽴立 已關閉已解決實作中

#12

#14

#13 #11#5

先關了驗過的v1 Release Note!

#11 bug fixed -#13 bug fixed -

Page 14: Beta testing with CI

Release Note?新建⽴立 已關閉已解決實作中

#12

#14

#5

怎麼還有⼀一個? 可能是

1. RD忘了加在Release Note 2. PM驗收忘記關 3. RD沒做完就丟給PM4. … etc.

Page 15: Beta testing with CI

Release Note?新建⽴立 已關閉已解決實作中

#12

#14

#5

把#5踢回給RD

Page 16: Beta testing with CI

Release Note?新建⽴立 已關閉已解決實作中

#12

#14

#5

把#5踢回給RD繼續下⼀一回合

Page 17: Beta testing with CI

Without TestFlight

• 封裝.ipa • 上傳.ipa並取得url • 製作.plist放上ipa的url • 撰寫Release Note • 寄群組信 (常常要更新群組)

Page 18: Beta testing with CI

• 封裝.ipa • 上傳.ipa並取得url 拖曳上傳.ipa • 製作.plist放上ipa的url • 撰寫Release Note • 寄群組信 (常常要更新群組) 給PM管理測試⼈人員(TestFlight群組)發佈版本時⾃自動寄信

Page 19: Beta testing with CI

Without CIcommit

build .ipa

release note

debug

takes 5 ~ 10 mins

takes 5 ~ 10 mins

Page 20: Beta testing with CI

「⼿手動寫Release Note很⿇麻煩,沒有更好的⽅方法了嗎?」

–APP RD

懶惰沒有極限

Page 21: Beta testing with CI

懶惰沒有極限

讓我來為您服務。

⼿手動寫Release Note很⿇麻煩,沒有更好⽅方法了嗎?

Page 22: Beta testing with CI

懶惰沒有極限

• 封裝.ipa • 上傳.ipa並取得url 拖曳上傳.ipa • 製作.plist放上ipa的url • 撰寫⾃自動產⽣生Release Note • 寄群組信 (常常要更新群組) 給PM管理測試⼈人員(TestFlight群組)發佈版本時⾃自動寄信

Page 23: Beta testing with CI

懶惰沒有極限

Page 24: Beta testing with CI

CI還可以做什麼

• 建置source code

• 執⾏行測試(各種⾃自動化測試)

• 執⾏行程式碼分析(靜態與動態程式碼分析)

• ⾃自動部屬 幫你把App交付給Tester

Monkey Test Unit Test API Test

Page 25: Beta testing with CI

CI的⺫⽬目的

• 降低⾵風險

• 減少⼈人⼯工⼿手動的繁複程序

• 可隨時產⽣生⼀一版可部署的版本

• 增加系統透明度

每天「⾃自動」健康檢查

Page 26: Beta testing with CI

CI不能做什麼

• ⾃自動測試程式碼「功能」雖然每天⾃自動健康檢查但是健康檢查的「項⺫⽬目及條件」還是要⾃自⼰己訂

Page 27: Beta testing with CI

Dev commit pull

build

code analysis

report issue

check issue

unit test

Without CI

Dev

Take long time.

Page 28: Beta testing with CI

Dev commit pull

build

code analysis

report issue

check issue

unit test

With CI

Take short time.

Page 29: Beta testing with CI

Why Jenkins

• 整合RSS/Email通知

• ⽀支援分散式架構

• ⼤大量豐富的套件

• iOS & Android support

Page 30: Beta testing with CI

Our Jenkins Job for iOS

• Pull from GitLab

• Run test

• Build & Archive

• Upload to testFlightwith Release Note

pull

buildunit test

upload

Page 31: Beta testing with CI

Pull from GitLab

Page 32: Beta testing with CI

Build & Archive

Page 33: Beta testing with CI

Upload to testFlight

Page 34: Beta testing with CI

進階CI應⽤用• Auto Build & Unit Test!

• Monkey Test

• Test Code Coverage

• Coding Style Check

• Merge to Master Build

• Upload to testFlight

Page 35: Beta testing with CI

有了CI以後

• 努⼒力實⾏行寫Test「確保」程式依照「需求」進⾏行

• Tester可以每天拿到最新的版本測試

• 開發循環更快

• 及早發現及早治療

Page 36: Beta testing with CI

iOS repo with CI

Page 37: Beta testing with CI

檔案配置考量

Q. 把Pfile 放在repo裡⾯面?

換Pfile 可以直接蓋過去

(需要完整bundle id的app時)

Q. 把Build & Archive的script直接放在repo?

在Local端可以確認script build

Page 38: Beta testing with CI
Page 39: Beta testing with CI

Crash Report

Page 40: Beta testing with CI

Reference

• http://www.dotblogs.com.tw/hatelove/archive/2011/12/25/introducing-continuous-integration.aspx

• http://ithelp.ithome.com.tw/question/10102931