Your SlideShare is downloading. ×
Testing in isolation
Testing in isolation
Testing in isolation
Testing in isolation
Testing in isolation
Testing in isolation
Testing in isolation
Testing in isolation
Testing in isolation
Testing in isolation
Testing in isolation
Testing in isolation
Testing in isolation
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Testing in isolation

2,252

Published on

How to test in isolation from other objects, libraries (or other adapters) and the database

How to test in isolation from other objects, libraries (or other adapters) and the database

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,252
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
25
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Testing in isolation
  • 2. Who am I Giorgio Sironi Bachelor in Computer Engineering Advisor @ Allbus Zone Leader @ DZone
  • 3. The format
      A little bit of theory; for ($i = 1; $i <= 3; $i++) {
        code in development; problem arises; refactoring of the code;
      }
  • 4. Requirement: TDD
  • 5. Isolation
      Unit tests > functional, end-to-end ones
        simpler tests less paths to test faster localize defects
  • 6. Test Doubles in one phrase
    • Dummy
      • only passed around
    • Stub
      • returns canned results
    • Mock
      • expects some particular calls
    • Fake
      • implements the collaborator without hassles
  • 7. Let's begin... I told you there was little theory Follow at https://github.com/giorgiosironi/testing-in-isolation
  • 8. The solution for ClosedMail
  • 9. If we extend it...
  • 10. The solution for AddressBookGenerator
  • 11. The solution for OrderRepository
  • 12. References
      All the code seen today
        http://github.com/giorgiosironi/testing-in-isolation
      Integration tests are a scam
        http://www.infoq.com/presentations/integration-tests-scam
      Growing object-oriented software, guided by tests
        http://www.growing-object-oriented-software.com/
      Pattern of Enterprise Application Architecture by Fowler
        http://martinfowler.com/eaaCatalog/
      Hexagonal architecture
        http://alistair.cockburn.us/Hexagonal+architecture
  • 13. Thanks for your attention

×