Loading presentation...

Present Remotely

Send the link below via email or IM


Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.


Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Unit Testing

No description

Joseph Mermelstein

on 14 July 2015

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Unit Testing

joseph mermelstein
Unit Testing
Test Driven Development
Unit Testing
TestDriven DESIGN:
* Outside-in
* Middle Out
Test Driven Design /
Test Driven Development
CI requires
"Self Testing Code"
Testing Pipeline
Not: an acceptance test,
not a great way to find bugs
A Developer Tool
An Insurance Policy for the code
A form of specification
A Unit Test is
Know the SUT
Mocks and Doubles
Hollywood Principle
Law of Demeter
Preparing for unit test:
SUT : System under Test
Object Doubles
Dummy, Fake, Stub, Mock
Martin Flowler,
Mocks Aren't Stubs, http://martinfowler.com/articles/mocksArentStubs.html
why not use real objects?
Test Isolation
Know what broke
Neutralize defensive programming
Integrate with the minimal interface
Hollywood Principle
"dont call us, we'll call you"
Inversion of control

Never never use static singletons
Law of Demeter
Each unit should only talk to its friends;
don't talk to strangers.

Only one dot
(cc) photo by medhead on Flickr
(cc) photo by medhead on Flickr
unit test
Tests too little
Tests too much
One Unit
(cc) photo by medhead on Flickr
A good test is
One test, one behavior
Asserts all expectation
Has no uncertainly
Points to the culprit
Test Driven Design
Test Driven Development
Single Responsibility Principle

God Objects / Idol Objects
Orchestration Objects
vs Functional Objects
Full transcript