Agile Testing 的十個神話

Ten myths of agile testing
http://www.aphids.com/agiletesting/2008/09/ten_myths_of_agile_testing.html

如果你的公司也採用agile development, 你可能也會面臨到和George Wilson (他是AIG Computer Services的Business Group Manager)相同的挑戰.  

Wilson提到 :

"Agile projects are an excellent opportunity for QA to take leadership of the [testing] processes,"

與其在developers主導時坐在後面, Wilson建議testers是可以主導一些事情:

"Who else is better placed to bridge the gap between users and developers, understand … what is required, how it can be achieved and how it can be assured prior to deployment?"

要做到這些 QA team需要更了解agile 是在做什麼, 所以Wilson列出了下面事實, 讓你可以看清agile testing的實質是什麼, 要如何做才是正確的

1. 你只需要Unit Test - TDD 測試已經足夠
- Test Driven Development is a good start, but for those who think it's all there is, "for the vast majority of commercial developments this simply isn’t true.
- Even strong proponents of agile development recognize the need for their armory to include a range of testing techniques...including white box, black box, regression testing, stress testing and UAT," said Wilson.
- The most effective agile projects will include investigative (black box) testing efforts that support (rather than compete) with white box testing.
- "Good investigative testing will reveal problems that the developer missed before they get too far downstream," said Wilson.

2. 你可以再利用 Unit Tests去建立Regression Test Suite
- Has anyone ever told you that conventional downstream testing is unnecessary because every line of application code has a corresponding test case?
- "Some TDD proponents ... suggest that by reassembling unit tests, everything from User Acceptance Tests to Regression Tests can be performed," said Wilson.
- While this may sound feasible, Wilson says it isn't realistic because the granularity and objectives of white box unit tests developed in TDD serve a different purpose than downstream black box testing.
- "While the overall objective of a unit test is to prove that the code will do what is expected, the aim of regression testing is to ensure that no unexpected effects result from the application code being changed. These two objectives are not synonymous.

3. 我們不再需要 Tesers或是 Automation Tools
- Not true.
- Testers perform a "different and equally valid role from their development colleagues," says Wilson, and should therefore be have an equal place at the project table.
- "It is [also] widely recognized that traditional test automation tools have failed to live up to the hype of the vendors." Perhaps vendors (no offense, Original) should play down the hype.

4. Unit Tests 可以排除要Manual Testing的需求
- Few would disagree that manual testing is repetitive, expensive, boring and error-prone.
- While TDD can reduce the amount of manual effort needed for functional testing, it does not remove the need for further manual or automated black box testing.
- "By automatically capturing the tester’s process and documenting their keystrokes and mouse clicks, the tester will have more time for the interesting, value-add activities, such as testing complex scenarios that would be difficult or impossible to justify automating.
- Though manual testing is a time-consuming (and therefore expensive) way to find errors, the costs of not finding them are often much higher," said Wilson.

5. User Acceptance Testing 不再是需要的
- Acceptance testing is often positioned as working with the customer to resolve incorrect requirements rather than correcting functionality that does not map to what the user needs.
- And maybe it's actually both. "When the user initially defines their requirements, they do it based on their initial expectations. When they see the system 'in the flesh,' they will invariably come up with different or additional requirements," he says.
- While the agile process might reduce the frequency of this happening, Wilson believes it is unreasonable to expect the approach to resolve them entirely, so there should be no expectation that user acceptance testing will be obviated.
- "This is especially true when it comes to the business user signing off approval of the user interface, since they may have envisaged something different from the developer."

6. Automation 是不可能的
- "Automation in the early stages of an agile project is usually very tough, but as the system grows and evolves, some aspects settle," says Wilson, simplifying the deployment of automation that can cope with changes.
- "To begin with, almost all testing will be manual, but this testing effort and design can be beneficial later if captured and reused. Knowing the right time to automate is tough, so using technology that proactively supports early manual testing but provides a path to evolve this into automation is key."

7. Developers 有足夠和適當的Ttesting Skills
- "If testing was easy, everybody would do it and we’d deliver perfect code every time," says Wilson. Just as writers benefit from proofreading by eyes other than their own, a testing team independent of developers can better see the big picture and can validate not just the functionality, but also the quality of the deliverable.
- "While developers tend towards proving the system functions as required, a good tester will be detached enough to ask, 'What happens if...?' ”

8. Unit Test可以涵蓋100% Design Spec
- Regardless of the development method, requirements must be known before code is developed.
- “While TDD ‘done well’ may identify a fair percentage of the design specification, there are still concerns about gaps between the unit tests,” says Wilson.
- He asserts that there are other approaches that are equally viable, and that the argument that you need TDD to prove the requirements are captured accurately isn’t substantiated by history.
- “Defining test cases to check the accuracy and succinctness of the requirements is nothing new. The V-model, for example, is a valid approach to understanding testing requirements, and by implication, functional requirements. Like TDD, the V-model and most other models fall down when the practitioner’s approach is rigid, while development processes are fluid. Software engineering is not like mechanical engineering, and trying to force conformity is wasted effort,” Wilson says.
- Whichever approach a team chooses, each user requirement should still be challenged by asking how it should be tested.
- “The important factor here is that test cases are challenged before they are committed to code, otherwise you’ll be doing a lot of recoding and calling it refactoring.”
- When the requirements are refined through collaboration, he adds, “the developer receives a [better] specification that is less likely to change because it has been openly appraised from several people’s perspectives.”

9. TDD 可適用於每個專案
- As the size of the project increases, so too does the time required to run the tests.
- Wilson says this can be addressed by partitioning the project, the tests or both. “Either route results in tests that run at different frequencies depending on their relevance to the current coding effort.”
- This approach, he says, introduces the need for test planning and execution management.
- “To achieve this efficiently, in addition to white box testing, you need to be thinking about…

10. Developers 和 Testers 就像油和水一樣格格不入
- There has long been an “us and them” tension between developers and testers, but it doesn’t have to be contentious.
- “This is usually a healthy symbiotic relationship which, when working correctly, provides a mutually beneficial relationship between the two groups, resulting in a higher quality deliverable for the customer," says Wilson.
- To help keep a handle on tensions, Wilson suggests focusing discussions on the following:
    * On meeting business objectives and NOT on who owns which parts of the process.
    * Involving testers in the requirements gathering phase and the TDD process.
    * Maximizing reuse of test assets created during the development phase.
    * The role of the traditional tester in TDD, and how to acquire new skills and enable them to adapt.
    * How developers and testers can find mutual benefit in exploiting new advances in software development and testing tools.

kojenchieh 發表在 痞客邦 留言(0) 人氣()

How We Test Software At Microsoft一書已到手

昨天終於收到這本書, 真的是不容易啊, 已經等了半年以上, 它終於出版了. 翻了一下內容, 感覺上是蠻有期待性的. 我想公司的QA Manager下次可以一起來研讀這本書.

這裡我在把目錄的內容列的更詳細些, 讓大家可以更了解他要講的東西是什麼.

Part I, “About Microsoft”
Chapter 1, “Software Engineering at Microsoft,”
- The Micorsoft Vision, Values and Why We "Love This Company!"
- Microsoft Is a Bug Software Engineering Company
- Developing Big and Efficient Business
- Working Small in a Big Company
- Employing Manay Types of Engineers
- Being a Global Software Development Company

Chapter 2, “Software Test Engineers at Microsoft”
- What's in a Name?
- Testers at Microsoft Have Not Always Been SDETs
- I Need More Testers and I Need Them Now!
    * Campus Recruiting
    * Industry Recruiting
- Learning How to Be a Microsoft SDET
- The Engineering Career at Microsoft
- Career Paths in the Test Discipline
    * The Test Architect
    * The IC Tester
    * Becoming a Manager is Not a Promotion
    * Test Managers

Chapter 3, “Engineering Life Cycles”
- Software Engineering at Microsoft
    * Traditional Software Engineering Models
    * Milestones
    * Agile at Microsoft
    * Putting It All Together
- Process Improvement
    * Formal Process Improvemenet Systems at Microsoft
- Shipping Software from the War Room
    * Mandatory Practices

Part II, “About Testing”
Chapter 4, “A Practical Approach to Test Case Design”
- Practicing Good Software Design and Test Design
- Using Test Patterns
- Estimating Test Time
- Starting with Testing
- Thinking About Testability
- Testing the Good and the Bad
- Other Factors to Consider in Test Case Design
    * Black Box, White Box, and Gray Test
    - Exploratory Testing at Microsoft

Chapter 5, “Functional Testing Techniques”
- The Need for Functional Testing
- Equivalence Class Partitioning
- Boundary Value Analysis
- Combinatorial Analysis

Chapter 6, “Structural Testing Techniques”
- Block Testing
- Decision Testing
- Condition Testing
- Basis Path Testing

Chapter 7, “Analyzing Risk with Code Complexity”
- Risky Business
- A Complex Problem
    * Counting Lines of Code
- Measuring Cyclomatic Complexity
    * Halstead Metrics
    * Object Oriented Metrics
    * High Cyclomatic Complexity Doesn't Necessarily Mean "Buggy"
- Want to do with Complexity Metrics

Chapter 8, “Model-Based Testing”
- Modelng Basics
- Testing with Models
    * Design a Model
    * Modeling Software
    * Building a Finite State Model
    * Automating Models
- Modeling Without Testing
    * Bayesian Graphical Modeling
    * Petri Nets
- Model-based Testing Tools at Microsoft
    * Spec Explorer
    * A Language and Engine
    * Modeling Tips

Part III, “Test Tools and Systems”
Chapter 9, “Managing Bugs and Test Cases”
- The Bug Workflow
- Test Case Management
- Managing Test Cases

Chapter 10, “Test Automation”
- The value of Automation
    * To Automate or Not to Automate, That  is the Question
- User Interface Automation
- What's in a Test?
- SEARCH at Microsoft
    * Setup
    * Execution
    * Analysis
    * Reporting
    * Cleanup
    * Help
- Run, Automation, Run!
    * Putting It All Together
    * Large-Scale Test Automation
    * Common Automation Mistakes
    
Chapter 11, “Non-Functional Testing”
- Beyond Functionality
- Testing the "ilities"
- Performance Testing
    * How Do You Measure Performance?
- Stress Testing
    * Distributed Stress Testing
    * Distributed Stress Architecture
    * Attributed of Multiclient Stress Tests
- Compatibility Testing
    * Application Libraries
    * Application Verifier
- Eating Our Dogfood
- Accessibility Testing
    * Accessibility Personas
    * Testing for Accessibility
    * Testing Tools for Microsoft Active Accessibility
- Usability Testing
- Security Testing
    * Threat Modeling
    * Fuzz Testing

Chapter 12, “Other Tools”
- Code Churn
    * Tracking Changes
    * What Changed?
    * Why Did it Change?
    * A Home for Source Control
- Build It
    * The Daily Build
- Static Analysis
    * Native Code Analysis
    * Managed Code Analysis
    * Just Another Tool
    * Test Code Analysis
    * Test Code is Product Code
- Even More Tools
    * Tools for Unique Problems
    * Tools for Everyone

Chapter 13, “Customer Feedback Systems”
- Testing and Quality
    * Testing Provides Information
    * Quality Perception
- Customer to the Rescue
- Windows Error Reporting
    * The Way We WER
    * Filling the Buckets
    * Emptying the Buckets
    * Test and WER
- Smile and Microsoft Smiles with You
    * Send a Smile Impact
- Connecting with Customers

Chapter 14, “Testing Software Plus Services”
- Part I: About Services
- Part II: Testing Software Plus Services
- Several Other Critical Thoughts on S + S

Part IV, “About the Future”
Chapter 15, “Solving Tomorrow’s Problems Today”
- Automatic Failure Analysis
    * Overcoming Analysis Paralysis
    * The Match Game
    * Good Logging Practices
    * Anatomy of a Log File
    * Integrating AFA
- Machine Virtualization
    * Virtualization Benefits
    * Virtual Machine Test Scenarios
    *When a Failure Occurs During Testing
    * Test Scenarios Not Recommended
- Code Review and Inspections
    * Types of Code Reviews
    * Checklists
    * Other Considerations
    * Two Faces of Review
- Tools, Tools, Everywhere
    * Reduce, Reuse, Recycle
    * What's the Problem?
    * Open Development

Chapter 16, “Building the Future”
- The Need for Forward Thinking
    * Thinking Forward by Moving Backward
    * Striving for a Quality Culture
    * Testing and Quality Assurance
    * Who Owns Quality
    * The Cost of Quality
    * A New Role for Test
- Test Leadership
    * The Microsoft Test Leadership Team
    * Test Leadership Team Chair
    * Test Leadership in Action
    * Test Test Architect Group
- Test Excellence
    * Sharing
    * Helping
    * Communicating
    * Keeping an Eye on the Future

kojenchieh 發表在 痞客邦 留言(0) 人氣()

什麼是ET, ST, 和Test Automation正確的組合?

My theory of software testing - I
http://xndev.blogspot.com/2007/12/my-theory-of-software-testing-i.html

常常有人問作者:
What's the right mix of exploratory testing, "planned" manual testing, and test automation?

作者認為這個答案是"看狀況", 要看你遇到的問題種類是什麼.

kojenchieh 發表在 痞客邦 留言(0) 人氣()

Testing Efficiency和 Testing Effectiveness的差別

2 Notorious “E”’s of Testing
http://shrinik.blogspot.com/2008/11/2-notorious-es-of-testing.html

Efficiency和 Effectiveness這兩個字, 自一開使我就沒有搞清楚, 他們有什麼差別. 可能是我英文不好吧, 總覺得應該是一樣的. 沒想到和verification和validation 一樣, 都是大有學問, 並且有明顯的不同.

Peter Drucker為這兩個字下了很好的定義:
Efficiency(效率) is doing things right;

kojenchieh 發表在 痞客邦 留言(2) 人氣()

Pesticide Paradox (殺蟲劑詭論)


第一次看到Pesticide Paradox這個term, 覺得很陌生, 總覺得怎麼可能他和software testing有關, 但是我卻從來沒聽過. 後來上網查了一下, 才知道它出自於Boris Beizer的大作. 在1990, Boris Beizer在Software Testing Techniques, Second Edition一書中, 第1.7小節中提到

1.7 Pesticide Paradox and the Complexity Barrier

.......
First Law: The Pesticide Paradox - Every method you use to prevent or find bugs leaves a residue of subtler bugs against which those methods are ineffectual.

你Run你的測試越多次, 受測軟體就越有免疫力. 也就是說相同的測試個案在重複執行後, 能夠再找到bug的機率會越來越低

因為為了克服Pesticide Paradox的現象, QA 必須要不斷開立新的測試個案, 來驗證受測軟體, 以期待找出不同的bug.

同樣地, 在test automation上, 也是會有同樣的現象. 就像James Bach說的
Highly repeatable testing can actually minimize the chance of discovering all the important problems, for the same reason that stepping in someone else’s footprints minimizes the chance of being blown up by a land mine.

所以不是你把所有測試個案自動化, 世界就太平了, 最多只是這些個案的形很快, 不需要人介入, 但是也是非常的一成不變. 這是另一個test automation的迷思, 也是upper manager最誤會的地方.


Reference
1. Pesticide Paradox
http://blogs.msdn.com/nihitk/articles/185836.aspx

2. Software Testing Techniques, Second Edition, Boris Beizer
這本書應該是絕版了, 目前在Amazon好像是買不到, 我有的也是翻印的版本. 它是所有white box testing的bible. 幾乎沒有書寫的這麼詳盡, 不過也相對的很難看, 實在是太硬了. 慶幸的是我在研究所看過後, 確實幫我打下很好的基礎.

kojenchieh 發表在 痞客邦 留言(0) 人氣()

Close

您尚未登入,將以訪客身份留言。亦可以上方服務帳號登入留言

請輸入暱稱 ( 最多顯示 6 個中文字元 )

請輸入標題 ( 最多顯示 9 個中文字元 )

請輸入內容 ( 最多 140 個中文字元 )

reload

請輸入左方認證碼:

看不懂,換張圖

請輸入驗證碼