SoftwareDevelopmentProcess
ForOPLINLIOTSoftwareTeam
2012/12/14,v1.5
1
SmokeTest
Prepare Test
Environment
FVT
SLD / FR
Test Plan
Bug Fix
SVT/TVT/PT RT
Dev
SQA
Code
Freeze
Developer:
• SLD: System Level Design (Architect)
• FR: Function Requirement (Architect)
• CLD: ComponentLevel Design (Comp. Owner)
• DCUT: Code Level Design, Coding, and Unit Test (PG)
• SDC: Small Design Change
Prototype
(Alpha Release)
Time
Beta Release
RC
(Release Candidate)
GA
(General Availability)
SoftwareDevelopmentProcess
Build/CI
EvaluateSchedule
PrepareBuild/CI
Kickoff
QA/Tester/SDET:
Test Plan: dependson SLD (QA Lead)
Test Spec: depends on CLD (QA ComponentOwner)
FVT: Functional Verification Test
SVT: System Verification Test
• Platform / Browser
• Performance / Stress Test
TVT: Translation Verification Test
PT: Performance Test
RT: Regression Test – rerun FVT: Zero Defect
CI: ContinuousIntegration
ART: Automation Regression Test
Test Spec
High Level
Requirement
Boss
Marketing
Customer
SDC
CLD
EvaluateSchedule
Release Engineering:
CI: ContinuousIntegration
Build Process
Release Process
Design,Coding, and Unit Test
Test Spec Review
2
SDC
FVT SVT/TVT/PT
SmokeTest
Prepare Test
Environment
FVTTest Plan SVT/TVT/PT RTSQA
Time
Test Spec
Design, Coding, and Unit Test
Test Spec Review
SLD / FRDev
Code
Freeze
CLD Time
SLD: System Level Design
1. 定義產品需求
2. 產品規格
3. 應用範圍 – See SVT
FR: Function Requirement / Feature
1. 功能需求 / 特色
2. Resource and Schedule
Test Plan
1. Review SLD / FR
2. Resource and Schedule
3. Test Plan Document
3
FVT SVT/TVT/PT
SmokeTest
Prepare Test
Environment
FVTTest Plan SVT/TVT/PT RTSQA
Time
Test Spec
Design, Coding, and Unit Test
Test Spec Review
SLD / FRDev
Code
Freeze
CLD Time
CLD: Component Level Design
1. 依照 FR 所需, 描述功能的流程細節
2. 如何單元測試 (Unit Test)
3. 測試建議 (Functional Verification Test)
4. 設定與參數 (Configurable)
5. 其他: 影響的 Component, API, Performance … etc
Test Spec
1. Review CLD with Developer
2. Steps, verification point (VP)
3. Test spec review - developer
圖比表好
表比文好
白紙黑字
追蹤記錄
4
CLDTemplate…
Developer OS: … (這要寫到何年何月?)
Rick OS: 我已經砍掉一半了 … 5
CLDTemplate… 精簡版
• FunctionalDescription–功能,流程,錯誤處理
• UnitTest–怎麼確認已經好了?聯調?
• FunctionVerificationTest–建議SQA怎麼測
• ImpactstoConfiguration–build,測試設定
6
Tips:
圖比表好
表比文好
7
CLDOwner…
• 負責CLD撰寫, 維護
• 功能細節與各個 Team Leader 協調
– Server / App / Agent / Web / SQA team leader
• 遇到功能重大疑問, 需要向上反映
• 大功能要一定要寫, ex: CDA
8
Test Plan
1. Environment
2. Precondition
3. Subject
4. VerificationPoint
5. Priority
6. ReferenceSpec
9
Test Spec
1. Procedure
2. Expectedresult
10
FVT SVT/TVT/PT
SmokeTest
Prepare Test
Environment
FVTTest Plan SVT/TVT/PT RTSQA
Time
Test Spec
Design, Coding, and Unit Test
Test Spec Review
SLD / FRRD
Code
Freeze
CLD Time
Build/CI
DCUT: Design, Coding, and Unit Test
1. Code level design: structure, configuration, pattern
2. Revise CLD and FR
3. Build procedure (co-work with release engineer)
4. Unit Test
5. Configurable and Installable
Preparation:
1. Installation and configuration
2. Scope / combination / platform
3. Test program
Start daily build
11
DCUT:Design,Coding,andUnitTest
SLD/FR
CLD/DCUT
Revise, Clarify
developers
Architect
12
UnitTest…
• 一定要做
• 和FVT同步
13
ConfigurableandInstallable…
• 要知道怎麼安裝
• 要從Build Image裝起來
• 要知道基本的設定
14
FVT SVT/TVT/PT
SmokeTest
Prepare Test
Environment
FVTTest Plan SVT/TVT/PT RTQA
Time
Test Spec
Design, Coding, and Unit Test
Test Spec Review
SLD / FRDev
Code
Freeze
CLD Time
Prototype
(Alpha Release)
Build/CI
1. Tech Preview (TP)
2. Marketing Demo
3. SDC: Small Design Change
15
FVT SVT/TVT/PT
SmokeTest
Prepare Test
Environment
FVTTest Plan SVT/TVT/PT RTSQA
Time
Test Spec
Design, Coding, and Unit Test
Test Spec Review
SLD / FRDev
Code
Freeze
CLD Time
FVT: Functional Verification Test, 依據 Test Spec 執行
Bug track and resolve: Team Room / Mantis
ER: Execution Record, 測試的執行紀錄
Code change practice: 避免side effect
Daily / Nightly Build
16
如何有效的錯誤報告
• 寫得清楚是錯誤報告的基本. 如果程式師看
不懂你的意思, 報告有寫等於沒寫.
– 要明確
– 要詳細
– 要小心代名詞
– 閱讀自己寫的東西
如何有效地報告錯誤(How to Report Bugs Effectively by by Simon Tatham)
英文版: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
繁體中文版: http://www.chiark.greenend.org.uk/~sgtatham/bugs-tw.html
簡體中文版: http://www.chiark.greenend.org.uk/~sgtatham/bugs-cn.html
Putty 作者
17
提問的智慧
• 提問之前: 讀手冊, FAQ, google
• 使用含義豐富, 描述準確的標題  標題很
重要
• 精確描述,信息量大
• 話不在多
提問的智慧(How To Ask Questions The Smart Way by Eric S. Raymond)
原文版: http://www.catb.org/esr/faqs/smart-questions.html
中文版: http://mis.ndhu.edu.tw/docu/question.htm
18
ReportTemplate…
19
ReportTemplate-English
[Precondition] -- optional
Precondition for this issue.
[How to reprocedure the problem]
1. install APP form AppStore
2. open miSecurity with 886929168168/12345678
3. goto video view, and click the active device
[Expected result]
The video should be transferred immediately.
[Actual result]
The exception occurs.
[Spec and CLD] -- optional
Spec P.53: Title ...
20
Log…
• 盡可能留下有用的訊息, keyword
• Log 不僅是給SQA找問題, 同時也是給
Developer知道自己的問題在哪
21
ResolvedTemplate…
[Root cause] -- 原因, 哪裡的問題
short description for root cause
[Solution] – 怎麼解決
how to fix and solution.
[Fix revision]
r17464
22
VerificationTemplate…
[Image]
Security_dev-1.0.1_b20121015-1200_r18232.apk
[Verify]
Pass | Fail
23
Priority & Severity
24
Bug的輕重緩急
Status Severity Priority
很重要,很急 Critical Urgent
很重要, 不急 Block Low
不重要, 很急 Minor Urgent
不重要, 不急 Minor Low
25
Block, Immediate … 呢?
如果電話一直狂call,
你覺得呢??
26
ER:ExecutionRecord
• 執行紀錄
– Status
– Result
– Issue
– Revision
– Comment
27
ER:ExecutionRecord
• 測試結果與報告
28
FVT是RD&SQA一起找問題
解決問題,交流的時刻
29
FVT SVT/TVT/PT
SmokeTest
Prepare Test
Environment
FVTTest Plan SVT/TVT/PT RTSQA
Time
Test Spec
Design, Coding, and Unit Test
Test Spec Review
SLD / FRDev
Code
Freeze
CLD Time
Beta Release
1. In other words is prototype
2. Tech preview (TP)
3. Marketing demo
30
FVT SVT/TVT/PT
SmokeTest
Prepare Test
Environment
FVTTest Plan SVT/TVT/PT RTSQA
Time
Test Spec
Design, Coding, and Unit Test
Test Spec Review
SLD / FRDev
Code
Freeze
CLD Time
SVT: System Verification Test
• Platform:
• Android: 2.3.x, 3.x, 4.x
• iOS: 4.3, 5.x, 6.x
• Browser: IE, FF, Chrome ….
31
理論上:SVT要測哪些組合 …?
From iPhone ZERO
32
然後 …
33
還有 …
34
你以為就這樣?
35
還有 …
36
Model…
※Android有多亂: http://opensignal.com/reports/fragmentation.php
37
Brand…
※Android有多亂: http://opensignal.com/reports/fragmentation.php
38
APILevel
※Android有多亂: http://opensignal.com/reports/fragmentation.php
39
Resolution …
※Android有多亂: http://opensignal.com/reports/fragmentation.php
Resolution…
40
So,SVTis…
From: 上帝的魔術方塊
41
FVTandSVT
• FVT 假設功能都還沒Ready
– 重點: 驗證功能的正確性是否符合CLD and FR
– 功能都 Ready 可稱之 BetaVersion
• SVT 假設功能已經Ready
– 重點: 環境對功能的影響
– SVT 在SLD/FR階段就要定義清楚
42
Thisis TVT…. TranslationVerificationTest
43
再來一次
44
FVT SVT/TVT/PT
SmokeTest
Prepare Test
Environment
FVTTest Plan SVT/TVT/PT RTSQA
Time
Test Spec
Design, Coding, and Unit Test
Test Spec Review
SLD / FRDev
Code
Freeze
CLD Time
We are here
45
PT:PerformanceTest
Stress for product and people …
46
PT:PerformanceTest
• FVT 沒過走 PT 表示你活膩了
• DCUT
• FVT
• Execution
• Network Traffic
• Configuration
• Resource management
47
FVT SVT/TVT/PT
SmokeTest
Prepare Test
Environment
FVTTest Plan SVT/TVT/PT RTSQA
Time
Test Spec
Design, Coding, and Unit Test
Test Spec Review
SLD / FRDev
Code
Freeze
CLD Time
• Full FVT, Automation, Zero bug
• Code Freeze
• Next Phase Preparation – SLD/FR ready
SLD / FR CLDCurrent Phase
Next Phase
48
RT:RegressionTest
• 檢驗 FVT/SVT/PT/TVT過程中Fixedbug有沒
有sideeffect
49
A
B
C
Fixed
D
RT:RegressionTest
• Full FVT, 仰賴自動化
• 驗證曾經出現的Bug ….. Mission impossible
• Zero bug – Issue move to next phase
• Code Freeze
• Next Phase Preparation – SLD/FR ready
– New branch
– Maintenance team
50
CodeChangePractice…
• 第一時間避免 Side Effect
51
52
RT:RegressionTest
另一個常出現的地方:
SoftwareMaintenanceProcess
FVT RT Release
loop
僅維護, 修Bug, 不加 Feature
像是M$ Win7 Hotfix
IBM Fix Pack
53
FVT SVT/TVT/PT
SmokeTest
Prepare Test
Environment
FVTTest Plan SVT/TVT/PT RTSQA
Time
Test Spec
Design, Coding, and Unit Test
Test Spec Review
SLD / FRDev
Code
Freeze
CLD Time
We are here
GA
(General Availability)
54
TeamRoom
55
FVT SVT/TVT/PT
SmokeTest
Prepare Test
Environment
FVTTest Plan SVT/TVT/PT RTSQA
Time
Test Spec
Design, Coding, and Unit Test
Test Spec Review
SLD / FRDev
Code
Freeze
CLD Time
GA
(General Availability)
Release:GA
56
Takeabreak
57
SmokeTest
Prepare Test
Environment
FVT
SLD / FR
Test Plan
Bug Fix
SVT/TVT/PT RT
Dev
SQA
Code
Freeze
Prototype
(Alpha Release)
Time
Beta Release
RC
(Release Candidate)
GA
(General Availability)
SoftwareDevelopmentProcess
Build/CI
EvaluateSchedule
PrepareBuild/CI
Kickoff
Test Spec
High Level
Requirement
Boss
Marketing
Customer
SDC
CLD
EvaluateSchedule
Design,Coding, and Unit Test
Test Spec Review
Developer & SQA
以外的, 是啥鬼?
Release Engineering:
Build Process
Release Process
58
ReleaseEngineering
• Role:Releaseengineer (IT/Systembackground)
• Operation/Support
– ReporttoPMorITManager
• Missionandresponsibility:
– Maintainbuildprocess:regular,special,debug,configuration,scripts
– PerformreleaseProcess
59
SoftwareBuildProcess
60
StandardBuildProcess
SVN Build scripts
Build Site
Notify resultCheck out
Developer: provides procedure and
toolchain & libraries
Release engineer: complete build
scripts and configuration
ALWAYS check out full source tree.
It’s for SW All members.
61
StandardBuildProcess
• BVT: Build Verification Test
• BVT是測試的程序之一
• BVT-Fail 要當天Fix, build script有問題亦是.
• DCUT 階段build process有更動, Developer必
須告知Release Engineer
• Build以 “天” 為單位, called ‘daily build’ or
nightly build
62
你必須要知道的 …
• Build site: http://192.168.5.58/iot/
• Team Room${Project} repository
63
知道Build Process是非常合情合理的.
64
Build 頻率越高
品質越爛
65
SoftwareReleaseProcess
66
WhatisRelease?
67
是 …
• Just someday …
• 呼口號
• 下一個痛苦的開始 …
68
還是 …
69
Release shouldbe…
70
And…
71
還有 …
72
很重要 很開心
值得慶祝的事
73
SoftwareReleaseProcess
Process Build
Bind Product Tag
Sign Key
Qualify and Ready
代號, 階段, 等識別, ex: RC, Beta,
Gold, GM … etc
Deployment Submit
AppleStore/ GooglePlay Deliver for MPShip (CD, FTP)
Fail
SVN Branches  Maintenance Process
SVN Tags  Backup
SVN Trunk  Next Phase new feature
Change Version
74
Finally…
75
制度是死的
人是活的
76
流程不是限制
而是章法
77
軟體易改難測
章法制度最後一道防線
78
品質是一種信任
而不是信仰
79
80
Backup
81
Development and TestingRD dept
Sales / IT
Release
Time
SoftwareProductOperation
IT: Deployment Sales / RMA
FR
Development and Testing ReleaseFR
Maintain Release Maintain Release
Phase 1 Phase 2
Maintenance Team
82

Software Development Process v1.5 - 20121214