Skip to content

Instantly share code, notes, and snippets.

@phosphene
Last active December 12, 2015 05:08
Show Gist options
  • Save phosphene/4719648 to your computer and use it in GitHub Desktop.
Save phosphene/4719648 to your computer and use it in GitHub Desktop.
Practical Parsimonious Testing Design
Testing Principles:
Proving and Documenting Behaviour and Effectiveness
First Cut with the Razor:
A. Integration/Acceptance testing
1. Acceptance testing with Capybara
2. Integration testing
Summary: Acceptance testing is focused on documenting and proving behaviour
at the boundaries of the application. User stories and business rules are proven
and documented at the time they are implemented. Integration testing proves
and documents the data model as well.
B. Unit testing of Object behaviour
1. Incoming Messages tested on receiver side with assertions about state
or Proving the Public Interface
2. Outgoing Messages
a. ignore queries
b. Prove Command Messages:
prove message is sent correctly
don't care about what comes back
use Mocks: tests of behaviour, not state
Summary: Unit testing proves and documents Object behaviour and Object modeling.
C. Testing is also about what not to test or about limiting tests
1. Avoid Testing private methods
a. in a pinch, o.k.
b. factor out to new class if need to test
Summary: Test what you need to test and no more.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment