capability maturity model (cmm)djanzen/courses/402f09/... · 2009-11-16 · test-driven development...
TRANSCRIPT
![Page 1: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/1.jpg)
Capability Maturity Model
(CMM)• CMM is not a software lifecycle model ...
– Strategy for improving the software development process regardless of the process “model” followed
• Basic premise: the use of new software methods alone will not improve productivity and quality, because software management is, in part, the cause of problems
– CMM assists organizations in providing the infrastructure required for achieving a disciplined and mature process ($$)
• Includes– technical aspects of software production
– managerial aspects of software production
![Page 2: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/2.jpg)
Capability Maturity Model
(continued)• Five maturity levels
– 1. initial – ad hoc process
– 2. repeatable process – basic project management
– 3. defined process – process modeling and definition
– 4. managed process – process measurement
– 5. optimizing process – process control and dynamic improvement
• to move from one stage to the next, the SEI provides a series of questionnaires and conducts process assessments that highlight current shortcomings
![Page 3: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/3.jpg)
Software Lifecycles and
Software Process• Software lifecycle basics
• Software lifecycles– build-and-fix
– waterfall
– rapid prototype
– incremental and iterative
– spiral
• Process improvement– CMM & ISO9000
![Page 4: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/4.jpg)
Processes vs. Practices
• Software processes provide a framework for
how to build a software product
– E.g. Waterfall, XP, Scrum, TSP
• Software practices are activities used when
building software
– E.g. code reviews, test-driven development,
pair programming, daily communication
![Page 5: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/5.jpg)
Phases of a Software Lifecycle
• Standard Phases
– Requirements Analysis & Specification
– Design
– Implementation and Integration
– Operation and Maintenance
– Change in Requirements
– Testing throughout
• Phases promote manageability and provide
organization
![Page 6: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/6.jpg)
Build-and-Fix
Build First
Version
Retirement
Operations Mode
Modify until
Client is satisfied
![Page 7: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/7.jpg)
Waterfall1
Requirements
Verify
Retirement
Operations
Test
ImplementationVerify
Design
Req. Change
1. Winston Royce, “Modeling the Development of Large Software Systems”, Westcon 1970
![Page 8: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/8.jpg)
Rapid Prototyping
Rapid Prototype
Verify
Retirement
Operations
Test
ImplementationVerify
Design
Req. Change
![Page 9: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/9.jpg)
For each build:
Perform detailed
design, implement.
Test. Deliver.
Incremental1 and Iterative2
Requirements
Verify
Retirement
Operations
Verify
Arch. Design
1. Harlan Mills, “Cleanroom Software Engineering”, IEEE Software, 1987
2. Victor Basili and Joe Turner, “Iterative Enhancement”, IEEE Trans. Software Eng., 1975
![Page 10: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/10.jpg)
For each build:
Perform detailed
design, implement.
Test. Deliver.
IncrementalRequirements
Verify
Retirement
Operations
Verify
Arch. Design
Could be staggered
Design Implement Test Deliver
Design Implement Test Deliver
Design Implement Test Deliver
Or consecutive
Design Implement Test Deliver Design Implement Test Deliver
Increments add new features
![Page 11: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/11.jpg)
For each build:
Perform detailed
design, implement.
Test. Deliver.
IterativeRequirements
Verify
Retirement
Operations
Verify
Arch. Design
Could be minimized or
incorporated into iterations
(common with agile approaches)
Iterations may revisit features
![Page 12: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/12.jpg)
The Spiral Model1
Concept of
Operation
Requirements
Plan
Requirements
OAC
Risk
Assessment
Risk It
em S
et
Risk M
anag
emen
t Plan
Requirements
Risk
Control
Requirements
Validation
Abstract Specification
Plan
Abstract
Specifcation
OAC
Risk
Assessment
Risk
Control
Abstract
Specification
Abstract Specification
Validation
Concrete Specification
Plan
Concrete
Specification
OAC
Concrete
Specification
Concrete
Specification Validation
and Verification
Software
Development Plan
Risk
Assessment
Risk
Control
Progress through steps
Cumulative cost
Evaluate alternatives, identify, resolve risks
Develop, verify next-level product
Plan next phases
CommitReview
partition
Determine objectives, alternatives, constraints (OAC)
1. Barry Boehm, “A Spiral model of Software Development and Enhancement”, SPSE 1985
![Page 13: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/13.jpg)
(Extremely) Simplified Spiral Model
Requirements
Verify
Retirement
Operations
Test
ImplementationVerify
Design
Req. Change
Add a Risk Analysis
step to each phase!
Risk Assessment
Risk Assessment
Risk Assessment
More recently extended into MBASE
(Model-Based Architecting and Software Engineering)
![Page 14: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/14.jpg)
TDD in Software Development Lifecycle
![Page 15: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/15.jpg)
What is Test-Driven Development?
• TDD is a design (and testing) approach
involving short, rapid iterations of
RefactorUnit Test Code
Forces programmer to consider use of a method
before implementation of the method
Unit tests are automated
![Page 16: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/16.jpg)
TDD Example: Requirements
• Ensure that passwords meet the following
criteria:
– Between 6 and 10 characters long
– Contain at least one digit
– Contain at least one upper case letter
![Page 17: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/17.jpg)
TDD Example: Write a test
import static org.junit.Assert.*;
import org.junit.Test;
public class TestPasswordValidator {
@Test
public void testValidLength() {
PasswordValidator pv = new PasswordValidator();
assertEquals(true, pv.isValid("Abc123"));
}
}
Needed for JUnit
This is the teeth of the test
Cannot even run test yet because PasswordValidator doesn’t exist!
![Page 18: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/18.jpg)
import static org.junit.Assert.*;
import org.junit.Test;
public class TestPasswordValidator {
@Test
public void testValidLength() {
PasswordValidator pv = new PasswordValidator();
assertEquals(true, pv.isValid("Abc123"));
}
}Design decisions:
class name, constructor,
method name, parameters and return type
TDD Example: Write a test
![Page 19: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/19.jpg)
TDD Example: Write the codepublic class PasswordValidator {
public boolean isValid(String password) {
if (password.length() >= 6 && password.length() <= 10) {
return true;
}
else {
return false;
}
}
}
![Page 20: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/20.jpg)
TDD Example: Refactor
import static org.junit.Assert.*;
import org.junit.Test;
public class TestPasswordValidator {
@Test
public void testValidLength() {
PasswordValidator pv = new PasswordValidator();
assertEquals(true, pv.isValid("Abc123"));
}
}
Do we really need an instance of PasswordValidator?
![Page 21: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/21.jpg)
import static org.junit.Assert.*;
import org.junit.Test;
public class TestPasswordValidator {
@Test
public void testValidLength() {
assertEquals(true, PasswordValidator.isValid("Abc123"));
}
}
Design decision:
static method
TDD Example: Refactor the test
![Page 22: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/22.jpg)
What is Refactoring?
• Changing the structure of the code without
changing its behavior
– Example refactorings:
• Rename
• Extract method/extract interface
• Inline
• Pull up/Push down
• Some IDE’s (e.g. Eclipse) include
automated refactorings
![Page 23: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/23.jpg)
TDD Example: Refactor the codepublic class PasswordValidator {
public static boolean isValid(String password) {
if (password.length() >= 6 && password.length() <= 10) {
return true;
}
else {
return false;
}
}
}Design decision:
static method
![Page 24: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/24.jpg)
TDD Example: Refactor the codepublic class PasswordValidator {
public static boolean isValid(String password) {
if (password.length() >= 6 && password.length() <= 10) {
return true;
}
else {
return false;
}
}
}Can we simplify this?
![Page 25: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/25.jpg)
TDD Example: Refactoring #1public class PasswordValidator {
public static boolean isValid(String password) {
return password.length() >= 6 &&
password.length() <= 10;
}
}
Refactoring #1:
collapse conditional
![Page 26: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/26.jpg)
TDD Example: Refactoring #1public class PasswordValidator {
public static boolean isValid(String password) {
return password.length() >= 6 &&
password.length() <= 10;
}
}
“Magic numbers” (i.e. literal constants
that are buried in code) can be dangerous
![Page 27: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/27.jpg)
TDD Example: Refactoring #2public class PasswordValidator {
private final static int MIN_PW_LENGTH = 6;
private final static int MAX_PW_LENGTH = 10;
public static boolean isValid(String password) {
return password.length() >= MIN_PW_LENGTH &&
password.length() <= MAX_PW_LENGTH;
}
}
Refactoring #2:
extract constant
![Page 28: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/28.jpg)
import static org.junit.Assert.*;
import org.junit.Test;
public class TestPasswordValidator {
@Test
public void testValidLength() {
assertEquals(true, PasswordValidator.isValid("Abc123"));
}
@Test
public void testTooShort() {
assertEquals(false, PasswordValidator.isValid("Abc12"));
}
}
No design decisions;
just unit testing
TDD Example: Write another test
![Page 29: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/29.jpg)
public class TestPasswordValidator {
@Test
public void testValidLength() {
assertEquals(true, PasswordValidator.isValid("Abc123"));
}
@Test
public void testTooShort() {
assertEquals(false, PasswordValidator.isValid("Abc12"));
}
@Test
public void testNoDigit() {
assertEquals(false, PasswordValidator.isValid("Abcdef"));
}
}
Write a test before
implementing next feature
TDD Example: Write another test
![Page 30: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/30.jpg)
TDD Example: Make the test passpublic class PasswordValidator {
private final static int MIN_PW_LENGTH = 6;
private final static int MAX_PW_LENGTH = 10;
public static boolean isValid(String password) {
return password.length() >= MIN_PW_LENGTH &&
password.length() <= MAX_PW_LENGTH;
}
}
![Page 31: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/31.jpg)
TDD Example: Make the test passimport java.util.regex.Pattern;
public class PasswordValidator {
private final static int MIN_PW_LENGTH = 6;
private final static int MAX_PW_LENGTH = 10;
public static boolean isValid(String password) {
return password.length() >= MIN_PW_LENGTH &&
password.length() <= MAX_PW_LENGTH &&
Pattern.matches(".*\\p{Digit}.*", password);
}
}
Check for a digit
![Page 32: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/32.jpg)
TDD Example: Refactorimport java.util.regex.Pattern;
public class PasswordValidator {
private final static int MIN_PW_LENGTH = 6;
private final static int MAX_PW_LENGTH = 10;
public static boolean isValid(String password) {
return password.length() >= MIN_PW_LENGTH &&
password.length() <= MAX_PW_LENGTH &&
Pattern.matches(".*\\p{Digit}.*", password);
}
}
Extract methods
for readability
![Page 33: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/33.jpg)
import java.util.regex.Pattern;
public class PasswordValidator {
private final static int MIN_PW_LENGTH = 6;
private final static int MAX_PW_LENGTH = 10;
private static boolean isValidLength(String password) {
return password.length() >= MIN_PW_LENGTH &&
password.length() <= MAX_PW_LENGTH;
}
private static boolean containsDigit(String password) {
return Pattern.matches(".*\\p{Digit}.*", password);
}
public static boolean isValid(String password) {
return isValidLength(password) &&
containsDigit(password);
}
}
TDD Example: Done for now
![Page 34: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/34.jpg)
Test-Driven Development• Short introduction1
– Test-driven development (TDD) is the craft of
producing automated tests for production code, and
using that process to drive design and
programming. For every tiny bit of functionality in
the production code, you first develop a test that
specifies and validates what the code will do. You
then produce exactly as much code as will enable
that test to pass. Then you refactor (simplify and
clarify) both the production code and the test code.
1. http://www.agilealliance.org/programs/roadmaps/Roadmap/tdd/tdd_index.htm
![Page 35: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/35.jpg)
Test-Driven Development• Definition1
– Test-driven Development (TDD) is a programming practice that instructs developers to write new code only if an automated test has failed, and to eliminate duplication. The goal of TDD is “clean code that works.”
1. “JUnit in Action” Massol and Husted.
• The TDD Two-Step2
– Write a failing automatic test before writing new code
– Eliminate duplication
• The TDD Cycle2
– Write a test
– Make it run
– Make it right
2. “Test-Driven Development By Example” Beck.
Red
Green
Refactor
![Page 36: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/36.jpg)
Some Types of Testing
• Unit Testing – Testing individual units (typically methods)
– White/Clear-box testing performed by original programmer
• Integration and Functional Testing– Testing interactions of units and testing use cases
• Regression Testing– Testing previously tested components after changes
• Stress/Load/Performance Testing– How many transactions/users/events/… can the system handle?
• Acceptance Testing– Does the system do what the customer wants?
TDD focuses here
and may help here
and here
![Page 37: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/37.jpg)
TDD Misconceptions
• There are many misconceptions about TDD
• They probably stem from the fact that the
first word in TDD is “Test”
• TDD is not about testing,
TDD is about design
– Automated tests are just a nice side effect
![Page 38: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/38.jpg)
TDD Misconception #1• TDD does not mean “write all the tests, then
build a system that passes the tests”
Test 1
Test 2
Test 3
Test 4
Test 5
Test 6
System
![Page 39: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/39.jpg)
TDD Misconception #2• TDD does not mean “write some of the tests,
then build a system that passes the tests”
Test 1
Test 2
Test 3
Test 4
Test 5
Test 6
System
![Page 40: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/40.jpg)
TDD Misconception #3• TDD does not mean “write some of the code,
then test it before going on”
Test 1
Test 2
Test 3
Test 4
Test 5
Test 6
System
![Page 41: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/41.jpg)
TDD Misconception #4• TDD does not mean “do automated testing”
JUnit
Abbot & Costello
Selenium
Fit
Fitnesse
System
![Page 42: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/42.jpg)
TDD Misconception #5• TDD does not mean “do lots of testing”
Requirements Design Code
Test
Deploy
![Page 43: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/43.jpg)
TDD Misconception #6
• TDD does not mean “the TDD process”
• TDD is a practice
(like pair programming, code reviews, and stand-
up meetings)
not a process
(like waterfall, Scrum, XP, TSP)
![Page 44: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/44.jpg)
TDD Clarified• TDD means “write one test, write code to
pass that test, refactor, and repeat”Test 1 Unit 1
Test 2 Unit 1
Test 3 Unit 2
Test 4 Unit 3
Refactor
Refactor
Refactor
Refactor
![Page 45: Capability Maturity Model (CMM)djanzen/courses/402F09/... · 2009-11-16 · Test-Driven Development • Short introduction 1 – Test-driven development (TDD) is the craft of producing](https://reader036.vdocuments.net/reader036/viewer/2022070913/5fb4c05be1f0e0186e06d15b/html5/thumbnails/45.jpg)
Test Bus Discussion1. What is a test bus?
• Built-in test access