Author:袁琳
MSN:testwin@sohu.com
近來,有不少剛剛從事軟體測試工作的朋友通過MSN和Email等方式向我諮詢,希望可以從我這裡得到一些協助,希望我能夠介紹一些軟體測試方面的入門書籍。
我非常欣喜的看到有越來越多的朋友加入到軟體測試者的行列,也對他們目前的困惑表示理解。畢竟,軟體測試行業在國內才起步不久,很多人都是剛剛畢業就進入這個行業,或者從其他崗位轉過來,對軟體測試的知識和技能瞭解的有限,而軟體測試又是一個非常重視實踐經驗的工作。如何在較短時間內熟悉軟體測試的基礎知識、並掌握一定的軟體測試基本方法,讀書就是一個比較好的辦法。因此,推薦兩本測試方面的書籍。
《軟體測試》
作者:(美)Ron Patton
譯者:周予濱 姚靜
出版社:機械工業出版社
原出版社: SAMS
第一部分軟體測試綜述
第1章 軟體測試背景
1.l 臭名昭著的軟體錯誤案例研究
1.l.l 迪斯尼的獅子王,1994~1995
1.1.2 英特爾奔騰浮點除法軟體缺陷,1994
1.l.3 美國航大局火星極地登陸,1999
1.1.4 愛國者飛彈防禦系統,1991
1.1.5 千年蟲,大約1974
1.2 軟體缺陷是什麼
1.2.l 描述軟體失敗的術語
1.2. 2 軟體缺陷:正式定義
1.3 為什麼會出現軟體缺陷
1.4 軟體缺陷的修複費用
1.5 軟體測試員究竟做些什麼
1.6 怎樣成為優秀軟體測試員
1.7 小結
1.8 小測驗
第2章 軟體開發過程
2.l 產品的組成部分
2.l.l 軟體產品需要多少投入
2.1.2 客戶要求
2. 1.3 產品說明書
2. 1.4 進度表
2.1.5 軟體設計文檔
2.1.6 測試文檔
2.1.7 軟體產品由哪些部分組成
2.2 軟體項目成員
2.3 軟體開發模式
2.3.l 大棒模式
2. 3.2 邊寫邊改模式
2.3. 3 流水模式
2.3.4 螺旋模式
2. 4 小結
2. 5 小測驗
第3章 軟體測試的實質
3. 1 測試原則
3.1.l 完全測試程式是不可能的
3.1.2 軟體測試是有風險的行為
3.1.3 測試無法顯示潛伏的軟體缺陷
3.1.4 找到的軟體缺陷越多,就說明軟體缺陷越多
3. 1.5 殺蟲劑怪事
3. 1.6 並非所有軟體缺陷都能修複
3. 1.7 難以說清的軟體缺陷
3.1.8 產品說明書不斷變化
3.1.9 軟體測試員在產品小組中不受歡迎
3.1.10 軟體測試是一項講究條理的技術專業
3.2 軟體測試的術語和定義
3.2.l 精確和準確
3.2.2 驗證和合法性檢查
3.2.3 品質和可靠性
3.2.4 測試和品質評判(QA)
3.3 小結
3.4 小測驗
第二部分測試基礎
第4章 檢查產品說明書
4.l 開始測試
4. 1.l 黑盒子和白盒子測試
4.1.2 靜態和動態測試
4.1.3 靜態黑盒子測試,測試產品說明書
4.2 對產品說明書進行進階審查
4.2. 1 設身處地為客戶著想
4. 2.2 研究現有的標準和規範
4.2.3 審查和測試同類軟體
4.3 產品說明書的低級測試技術
4. 3.l 產品說明書屬性檢查清單
4. 3.2 產品說明書用語檢查清單
4. 4 小結
4. 5 小測驗
第5章 閉著眼睛測試軟體
5.l 動態黑盒子測試,閉著眼睛測試軟體
5.2 通過測試和失敗測試
5.3 等價分配
5.4 資料測試
5.4.l 邊界條件
5.4.2 邊界條件類型
5.4.3 測試邊界線
5.4.4 次邊界條件
5.4.5 2的乘方
5.4.6 ASCII表
5.4.7 預設、空白、空值、零值和無
5.4. 8 非法、錯誤、不正確和垃圾資料
5.5 狀態測試
5.5.l 測試軟體的邏輯流程
5.5.2 建立狀態轉換圖
5.5.3 減少要測試的狀態及轉換的數量
5.5.4 怎樣進行具體測試
5.6 失敗狀態測試
5.6.l 競爭條件和時序錯亂
5.6.2 重複、壓迫和重負
5.7 其他黑盒子測試技術
5.7.l 像愚笨的使用者那樣做
5.7. 2 在已經找到軟體缺陷的地方再找找
5.7. 3 憑藉經驗、直覺和預感
5.8 小結
5.9 小測驗
第6章 檢查代碼
6.l 靜態白盒子測試:檢查設計和代碼
6. 2 正式審查
6.2.l 同事審查
6.2.2 公開陳述
6. 2. 3 檢驗
6. 3 編碼通訊協定和規範
6.3.l 編程標準和規範樣本
6. 3. 2 擷取標準
6.4 通用代碼審查清單
6. 4.1 資料引用錯誤
6. 4. 2 資料聲明錯誤
6. 4.3 計算錯誤
6.4. 4 比較錯誤
6. 4.5 控制流程程錯誤
6.4.6 子程式參數錯誤
6.4.7 輸入/輸出錯誤
6.4. 8 其他檢查
6. 5 小結
6.6 小測驗
第7章 帶上X光眼鏡檢查軟體
7. 1 動態白盒子測試
7. 2 動態白盒子測試和調試
7. 3 分段測試
7.3. 1 單元和整合測試
7. 3.2 單元測試樣本
7.4 資料範圍
7. 4.l 資料流
7. 4.2 次邊界
7. 4.3 公式和等式
7. 4.4 錯誤強制
7.5 代碼範圍
7.5.l 程式語句和程式碼範圍
7. 5.2 分支範圍
7. 5.3 條件範圍
7. 6 小結
7. 7 小測驗
第三部分運用測試技術
第8章 配置測試
8. l 配置軟體綜述
8.1.l 分離配置缺陷
8.1.2 計算工作量
8.2 執行任務
8. 2.l 確定所需的硬體類型
8.2.2 確定哪些硬體商標、型號和驅動程式可用
8.2.3 確定可能的硬體特性、模式和選項
8.2.4 將明確後的硬體設定縮減為可控制範圍
8.2. 5 明確使用硬體設定的軟體唯一特性
8.2.6 設計在每一種配置中執行的測試案例
8.2.7 在每種配置中執行測試
8.2.8 反覆測試直到小組對結果滿意為止
8.3 獲得硬體
8.3.l 明確硬體標準
8.3.2 對其他硬體進行配置測試
8. 4 小結
8.5 小測驗
第9章 相容性測試
9.l 相容性測試綜述
9.2 平台和應用程式版本
9.2.l 向前和向後相容
9.2.2 測試多個版本的影響
9.3 標準和規範
9.3.l 進階標準和規範
9.3.2 低級標準和規範
9.4 資料共用相容性
9.5 小結
9.6 小測驗
第10章 外國語言測試
10.l 使文字和圖片有意義
10.2 翻譯問題
10.2.l 文本擴充
10.2.2 ASCII、DBCS和 Unicode
10.2.3 熱鍵和快速鍵
10.2. 4 擴充字元
10.2. 5 字元計算
10.2.6 從左向右和從右向左讀
10.2.7 圖形中的文字
10.2.8 使文字脫離代碼
10.3 本地化問題
10.3. 1 內容
10.3. 2 資料格式
10.4 配置和相容性問題
10.4.l 國外平台配置
10.4. 2 資料相容性
10.5 測試量有多大
10.6 小結
10.7 小測驗
第11章 易用性測試
11.l 使用者介面測試
11.2 優秀UI由什麼構成?
11.2. 1 符合標準和規範
11.2.2 直觀性
11. 2.3 一致性
11.2. 4 靈活性
11.2.5 舒適性
11. 2.6 正確性
11.2. 7 實用性
11.3 為殘疾人測試:輔助選項測試
11.3.l 這是法律
11.3. 2 軟體中的輔助特性
11.4 小結
11.5 小測驗
第12章 測試文檔
12.l 軟體文檔的類型
12. 2 文檔測試的重要性
12.3 審查文檔時要找什麼
12. 4 文檔測試的實質
12. 5 小結
12.6 小測驗
第13章 網站測試
13.l 網頁基礎
13.2 黑盒子測試
13. 2. 1 文字
13.2.2 超級連結
13. 2.3 圖形
13. 2. 4 表單
13.2.5 對象和其他零碎功能
13. 3 灰盒子測試
13.4 白盒子測試
13.5 配置和相容性測試
13.6 易用性測試
13.7 自動化簡介
13. 8 小結
13.9 小測驗
第四部分加強測試
第14章 自動化的測試和測試載入器
14.l 自動化和工具的好處
14.2 測試載入器
14.2.l 查看器和監視器
14. 2.2 驅動程式
14.2. 3 管道
14.2.4 施壓和增負工具
14.2.5 幹擾發射器和雜訊發生器
14.2.6 分析工具
14. 3 軟體測試自動化
14.3. 1 宏錄製和回放
14.3.2 可程式化的宏
14.3.3 完全可程式化的自動化的測試工具
14.4 隨機測試:猴子測試員
14.4.l 笨猴子
14. 4. 2 不太笨的猴子
14.4. 3 聰明猴子
14.5 使用測試載入器和自動化的實質
14.6 小結
14.7 小測驗
第15章 臭由轟炸和Beat測試
15.l 能看多遠看多遠
15.2 測試共用
15.3 Beat測試
15.4 提交測試
15.5 小結
15.6 小測驗
第五部分使用測試文檔
第16章 計劃測試工作
16.l 測試計劃的目標
16. 2 測試計劃主題
16. 2.l 進階期望
16.2.2 人、地點和事
16. 2.3 定義
16.2.4 團隊之間的責任
16.2.5 哪些要測試,哪些不要測試
16.2.6 測試階段
16.2.7 測試策略
16.2.8 資源要求
16.2.9 測試員的任務分配
16.2.10 測試過度
16.2. 11 測試案例
16.2. 12 軟體缺陷報告
16. 2. 13 頻度和統計
16. 2. 14 風險和問題
16.3 小結
16.4 小測驗
第17章 編寫和跟蹤測試案例
17. 1 測試案例計劃的目標
17. 2 測試案例計劃綜述
17.2.l 測試設計
17.2.2 測試案例
17.2. 3 測試程式
17.2.4 細節和真實
17. 3 測試案例組織和跟蹤
17. 4 小結
17. 5 小測驗
第18章 報告發現的問題
18.l 使軟體缺陷得以修複
18. 2 分離和再現軟體缺陷
18.3 所有軟體缺陷不是生來就平等的
18.4 軟體缺陷的生命週期
18.5 軟體缺陷跟蹤系統
18.5.1 標準:測試附隨報告
18.5.2 手工軟體缺陷報告和跟蹤
18.5.3 自動軟體缺陷報告和跟蹤
18.6 小結
18.7 小測驗
第19章 評價成效
19.l 使用軟體缺陷追蹤資料庫中的。
19. 2 在日常測試中使用的頻度
19.3 常用項目級頻度
19.4 小結
19.5 小測驗
第六部分軟體測試展望
第20章 軟體品質評判
20.l 品質是免費的
20. 2 生產車間中的測試和品質評判
20.2.l 軟體測試
20.2.2 品質評判
20.2.3 軟體測試團隊的其他名稱
20. 2.4 測試管理和組織圖
20.2.5 能力成熟度等級模型(CMM)
20.2.6 ISO 9000
20.3 小結
20.4 小測驗
第21章 軟體測試員職業指導
21.l 軟體測試員工作
21.2 尋求軟體測試職位
21.3 獲得親身體驗
21.4 正規培訓機會
21.5 網際網路連結
21.6 專業組織
21.7 參考書目
21.8 小結
21.9 小測驗
附錄測驗問題解答
《自動化軟體測試—入門、管理與實現(影印版)》
作者:[美]Elfriede Dustin等著
Acknowledgments
Part I What Is Automated Testing?
1 The Birth and Evolution of Automated Testing
1.1 Automated Testing
1.2 Background on Software Testing
1.3 The Automated Test Life-Cycle Methodology(ATLM)
1.3.1 Decision to Automate Test
1.3.2 Test Tool Acquisition
1.3.3 Automated Testing Introduction Phase
1.3.4 Test Planning,Design,and Development
1.3.5 Execution and Management of Tests
1.3.6 Test Program Review and Assessment
1.4 ATLM's Role in the SoftwareTesting Universe
1.4.1 ATLM Relationship to System Development Life Cycle
1.4.2 Test Maturity Model(TMM)-Augmented by Automated Software Testing Maturity
1.4.3 Test Automation Development
1.4.4 Test Effort
1.5 Software Testing Careers
2 Decision to Automate Test
2.1 Overcoming False Expectations for Automated Testing
2.1.1 Automatic Test Plan Generation
2.1.2 Test Tool Fits All
2.1.3 Immediate Test Effort Reduction
2.1.4 Immediate Schedule Reduction
2.1.5 Tool Ease of Use
2.1.6 Universal Application of Test Automation
2.1.7 One Hundred Percent Test Coverage
2.2 Benefits of Automated Testing
2.2.1 Production of a Reliable System
2.2.2 Improvement of the Quality of the Test Effort
2.2.3 Reduction of Test Effort and Minimization of Schedule
Case Study:Value of Test Automation Measurement
2.3 Acquiring Management Support
2.3.1 Test Tool Proposal
3 Automated Test Tool Evaluation and Selection
3.1 The Organization's Systems Engineering Environment
3.1.1 Third-Party Input from Management,Staff,and Customers and End Users
3.1.2 Tool Criteria Reflecting the Systems engineering Environment
3.1.3 Level of Software Quality
3.1.4 Help Desk Problem Reports
3.1.5 Budget Constraints
3.1.6 Types of Tests
3.1.7 Long-Term Investment Considerations
3.1.8 Test Tool Process
3.1.9 Avoiding Shortcuts
3.2 Tools That Support the Testing Life Cycle
3.2.1 Business Analysis Phase Tools
3.2.2 Requirements Definition Phase Tools
3.2.3 Tools for the Analysis and Design Phase
3.2.4 Programming Phase Tools
3.2.5 Metrics Tools
3.2.6 Other Testing Life-Cycle Support Tools
3.2.7 Testing Phase Tools
3.3 Test Tool Research
3.3.1 Improvement Opportunities
3.4 Evaluation Domain Definition
3.5 Hands-On Tool Evaluation
3.5.1 Evaluation Report
3.5.2 License Agreement
Part II Introduction of Automated Testing to a Project
4 Automated Testing Introduction Process
4.1 Test Process Analysis
4.1.1 Process Review
4.1.2 Goals and Objectives of Testing
Case Study:Test Objectives and Strategies
4.1.3 Test Strategies
4.2 Test Tool Consideration
4.2.1 Review of Project-Specific System Requirements
4.2.2 Application-Under-Test Overview
4.2.3 Review of Project Schedule
4.2.4 Test Tool Compatibility Check
4.2.5 Demonstration of the Tool to the Project Team
4.2.6 Test Tool Support Profile
4.2.7 Review of Training Requirements
5 Test Team Management
5.1 Organizational Structure of a Test Team
5.1.1 Stovepipe Test Team
5.1.2 Centralized Test Team
5.1.3 IV&V Test Team
5.1.4 Systems Methodology and Test Team
5.1.5 Test Team Summary
5.2 Test Program Tasks
5.3 Test Effort Sizing
5.3.1 Test Team Sizing Methods:An Overview
5.3.2 Development Ratio Method
5.3.3 Percentage Method
5.3.4 Test Procedure Method
5.3.5 Task Planning Method
5.3.6 Test Effort Sizing Factors
5.4 Test Engineer Recruiting
5.4.1 Test Engineer Qualities
5.4.2 Test Team Composition
5.4.3 Job Requisition
5.4.4 Recruiting Activities
5.4.5 Locating Test Engineers
5.4.6 Test Engineer Interviews
5.4.7 Distinguishing the Best Candidate
5.5 Roles and Responsibilities
Part III Test Planning and Preparation
6 Test Planning:Smart Application of Testing
6.1 Test Planning:Smart Application of Testing
6.2 Test Planning Activities
6.2.1 System Description
6.2.2 Critical/High-Risk Functions
6.2.3 Test Goals,Objectives,and Strategies
6.2.4 Test Tools
6.2.5 Test Program Parameters
6.2.6 Verification Methods
6.2.7 Teset Requirements Definition
6.3 Test Requirements Management
6.3.1 Requirement Management Tools
6.3.2 Assessing the Test Requirements Risk
6.3.3 Prioritization of Tests
6.3.4 Requirements Traceability Matrix
6.4 Test Program Events,Activities,and Documentation
6.4.1 Events
6.4.2 Activities
6.4.3 Documentation
6.5 The Test Environment
6.5.1 Test Environment Preparations
6.5.2 Test Environment Integration and Setup
6.6 The Test Plan
6.6.1 Test Completion/Acceptance Criteria
6.6.2 Sample Test Plan
7 Test Analysis and Design
7.1 Test Requirements Analysis
7.1.1 Development-Level Test Analysis(Structural Approach)
7.1.2 System-Level Test Analysis(Behavioral Approach)
7.2 Test Program Design
7.2.1 Test Program Design Models
7.2.2 White-Box Techniques(Development-Level Tests)
7.2.3 Black-Box Techniques(System-Level Tests)
7.2.4 Test Design Documentation
7.3 Test Procedure Design
7.3.1 Test Procedure Design
7.3.2 Test Procedure Definition
7.3.3 Automated Versus Manual Test Analysis
Case Study:Naming Conventions
7.3.4 Manual Test Design Guidelines
7.3.5 Detailed Test Design
7.3.6 Test Data Requirements
8 Test Development
8.1 Test Development Architecture
8.1.1 Technical Environment
8.1.2 Environment Readiness Checks
8.1.3 Automation Framework Reuse Analysis
8.1.4 Test Procedure Development/Execution Schedule
8.1.5 Modularity-Relationship Analysis
8.1.6 Explanation of the Sample Modularity-Felationship Matrix
8.1.7 Calibration of the Test Tool
8.1.8 Compatibility Work-Around Solutions
Case Study:Incompatibility Work-Around Solutions
8.1.9 Manual Execution of Test Procedures
8.1.10 Test Procedure Inspections-Peer Reviews
8.1.11 Test Procedure Configuration Management
8.2 Test Development Guidelines
8.2.1 Design-to-Development Transition
8.2.2 Reusable Test Procedures
Case Study:Navigation Using Tabs or Mouse Clicks
Case Study:Testing Bitmaps Using a Capture/Playback Tool
8.2.3 Maintainable Test Procedures
Case Study:Automating Documentation
Case Study:Automated Random Testing
8.2.4 Other Guidelines
8.3 Automation Infrastructure
8.3.1 Table-Driven Test Automation
8.3.2 PC Environment Automated Setup Script
8.3.3 Automated Recording Options
8.3.4 Login Function
8.3.5 Exit Function
8.3.6 Navigation
8.3.7 Verifying GUI Standards
8.3.8 Smoke Test
Case Study:Smoke Test Application
8.3.9 Error-Logging Routine
8.3.10 Help Function Verification Script
8.3.11 Timed Message Boxes Function
8.3.12 Advanced Math Functions
Part IV Test Execution and Review
9 Test Execution
9.1 Executing and Evaluating Test Phases
9.1.1 Unit Test Execution and Evaluation
9.1.2 Integration Test Execution and Evaluation
9.1.3 System Test Execution and Evaluation
9.1.4 Test Results Analysis of Regression Tests
9.1.5 User Acceptance Test Execution and Evaluation
9.2 Defect Tracking and New Build Process
9.2.1 Defect Life-Cycle Model
9.3 Test Program Status Tracking
9.3.1 Earned Value Management System
Case Study:System Test Status Tracking
9.3.2 Test Metrics Collection and Analysis
10 Test Program Review and Assessment
10.1 Test Program Lessons Learned-Corrective Actions and Improvement Activity
10.2 Test Program Return on Investment
Case Study:Test Program Return on Investment
Case Study:Quantify Tool Return on Investment
Part V Appendixes
A How to Test Requirements
A.1 Requirements Testing Approach
Abstract
The Quality Gateway
Make the Requirement Measurable
Quantifiable Requirements
Nonquantifiable Requirements
Keeping Track
Coherency and Consistency
Completeness
Relevance
Requirement or Solution?
Stakeholder Value
Traceaility
Order in a Disorderly World
Conclusions
References
B Tools That Support the Automated Testing Life Cycle
B.1 Introduction
B.2 Business Analysis Phase
B.2.1 Business Modeling Tools
B.2.2 Configuration Management Tools
B.2.3 Defect Tracking Tools
B.2.4 Technical Review Management
B.2.5 Documentation Generators
B.3 Requirements Definition Phase
B.3.1 Requirements Management Tools
B.3.2 Requirements Verifiers
B.3.3 Use Case Generators
B.4 Analysis and Design Phase
B.4.1 Visual Modeling Tools
B.4.2 Structure Charts,Flowcharts,and Sequence Diagrams
B.4.3 Test Procedure Generators
B.5 Programming Phase
B.5.1 Syntax Checkers/Debuggers
B.5.2 Memory Leak and Runtime Error Detection Tools
B.5.3 Code Checkers
B.5.4 Static and Dynamic Analyzers
B.5.5 Unit and Integration Test Tools
B.6 Metrics Tools
B.6.1 Code(Test)Coverage Analyzers and Code Instrumentors
B.6.2 Usability Measurement Tools
B.7 Testing Support Tools
B.7.1 Test Data Generators
B.7.2 File Comparison Tools
B.7.3 Simulation Tools
B.8 Testing Phase
B.8.1 Test Management Tools
B.8.2 Network Testing Tools
B.8.3 GUI Application Testing Tools
B.8.4 Load/Performance Testing Tools
B.8.5 Web Testing Tools
B.8.6 Year 2000 Testing Tools
B.9 Other Test Tool Vendors
C Test Engineer Development
C.1 Technical Skills Stage
C.2 Test Process Stage
C.3 Team Effort Stage
C.4 Technical Stewardship Stage
C.5 Test/Project Management Stage
C.6 Business/Product Management Stage
D Sample Test Plan
D.1 Introduction
D.1.1 Purpose
D.1.2 Background
D.1.3 System Overview
D.1.4 Applicable Documents
D.1.5 Master Schedule
D.2 Roles and Responsibilities
D.2.1 Project Organization
D.2.2 Project Roles and Responsibilities
D.2.3 Test Task Structure
D.2.4 Test Team Resources
D.3 Test Program
D.3.1 Scope
D.3.2 Test Approach
D.3.3 Test Strategies
D.3.4 Automated Tools
D.3.5 Qualification Methods
D.3.6 Test Requirements
D.3.7 Test Design
D.3.8 Test Development
D.4 Test environment
D.4.1 Test Environment Configuration
D.4.2 Test Data
D.5 Test Execution
D.5.1 Test Program Reporting
D.5.2 Test Program Metrics
D.5.3 Defect Tracking
D.5.4 Configuration Management
D.6 Detailed Test Schedule
APPENDIXES
D.A Test Procedure Development guidelines
D.B Test Verification Summary and Matrix
D.C Test Procedures and Test Scripts
E Best Practices
E.1 Documented Proess
E.2 Managing Expectations
E.3 Pilot Project
E.4 Test Tool Compatibility Checks
E.5 Test Tool Upgrades
E.6 Baselined System Setup and Configuration
E.7 Software Installations in the Test Environment Baseline
E.8 Overall Test Program Objectives
E.9 Keep Automation Simple
E.10 Test Procedure Design and Development Standards
E.11 Automated Versus Manual Test Analysis
E.12 Reuse Analysis
E.13 Test Team Communication with Other Teams
E.14 Schedule Compatibility
E.15 Customer Involvement
E.16 Defect Documentation and Reporting
E.17 Automated Test Advocates and Experts
E.18 Test Team Assignments
E.19 User Group Participation
E.20 Test Tool Improvement Suggestions
E.21 Become a Beta Testing Site
E.22 Specialty Topic Experts