5. Types of Testing
POÄNG
This piece should be 24”
These third-party rubber feet
should fit
Given all of these pieces,
I can sit in the chair
Sunday, January 22, 12
7. Types of Testing
Feature
Unit Unit Unit
Acceptance
Feature
Unit Unit Unit
Acceptance
Feature
Unit Unit Unit
Acceptance
Feature
Unit Unit Unit
Acceptance
Feature
Unit Unit Unit
Acceptance
Feature
Unit Unit Unit
Acceptance
Sunday, January 22, 12
14. Continuous Integration
Continuous integration avoids or detects compatibility
problems early ... if you integrate throughout the project
in small amounts you will not find your self trying to
integrate the system for weeks at the project's end while
the deadline slips by.
Always work in the context of the latest version of the
system.
Sunday, January 22, 12
34. TDD RUles
1.Only write code that makes a test pass
2.Only write enough of a test to make it fail
3.Only write enough code to make a test pass
Sunday, January 22, 12
35. Tutorial #1
In pairs, write a program that can play the game of
hangman.
50m
Activity Time
Sunday, January 22, 12
36. Mocking & STUBBING
Mocks vs. Stubs
Indirect Outputs vs. Indirect Inputs
Objects vs. Methods
Behavior vs. State
Sunday, January 22, 12
45. Tutorial #2
In pairs, write a program that implements Conway’s
game of life.
45m
Activity Time
Sunday, January 22, 12
46. Game of Life
“The universe of the Game of Life is an infinite two-
dimensional orthogonal grid of square cells, each of which
is in one of two possible states, alive or dead. Every cell
interacts with its eight neighbors, which are the cells that
are horizontally, vertically, or diagonally adjacent. At each
step in time, the following transitions occur:”
Sunday, January 22, 12
47. Game of Life: Rules
1
Any live cell with fewer than two live neighbors dies,
as if caused by under-population.
2
Any live cell with two or three live neighbors lives on
to the next generation.
3 Any live cell with more than three live neighbors dies,
as if by overcrowding.
Any dead cell with exactly three live neighbors
becomes a live cell, as if by reproduction.
4
Sunday, January 22, 12