Alexandru Bolboaca - Unit Testing from the Trenches
Upcoming SlideShare
Loading in...5

Like this? Share it with your network


Alexandru Bolboaca - Unit Testing from the Trenches






Total Views
Views on SlideShare
Embed Views



3 Embeds 511 366 143 2



Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

Alexandru Bolboaca - Unit Testing from the Trenches Presentation Transcript

  • 1. Unit Testing From The Trenches Alexandru Bolboaca V1.0, because I embrace change
  • 2. I write tests because I dont want this to happen
  • 3. ...and I dont want to be this guy
  • 4. Agenda Some clarifications 5 practical ideasAnswers to your questions
  • 5. Clarification #1: What is a unit test?A piece of code that checks a unit from the system under test (SUT) A unit = a class (basic) A unit = a behavior (advanced)
  • 6. A unit test Arrange Given Act When Assert Then
  • 7. Clarification #2: Types of tests
  • 8. Clarification #3: When we write testsDesign, Code, Test = Test After Design, Test, Code = Test First ProgrammingTest, Code, Design = Test Driven Development
  • 9. Clarification #4: Who writes the tests Technology-facing tests: DevsBusiness facing tests: Analysts and Devs Critique tests: Testers and Devs
  • 10. Clarification #5: Good unit tests Simple Fast Readable Independent Repeatable Easy to run
  • 11. Clarification #6: Write tests for any tech … including bash scripting
  • 12. Anything else to clarify?
  • 13. 5 Practical Ideas
  • 14. Situation #1 Cost: 12 hrs of businessCause: “a time calculation that was incorrect for the leap year”
  • 15. Practical Idea #1The immune system of your product
  • 16. Situation #2Large proportion of tests that are: Slow Unpredictable
  • 17. Practical Idea #2
  • 18. Situation #3 I measure the development timeI want the unit test coverage to be 90%
  • 19. Practical Idea #3Managers measure Running Tested Features Developers measure coverageGuideline: Coverage must increase
  • 20. Situation #4 We have unit tests, BUT: We extensively use the debugger Unit tests are based on test plansTesters still execute repeatedly manual test plans
  • 21. Practical Idea #4Use automated developer tests to: Executable Specifications Replace debugging Complement learningReplace repetitive manual testing
  • 22. Situation #5
  • 23. Practical Idea #5
  • 24. Wrap upI measure RTF/sprint
  • 25. Alexandru Bolboaca @alexboly, ● Trainings: Unit Testing, TDD, Legacy Code ● Technical Mentoring, Coaching, on-site and remote
  • 26. QuestionsThe important thing is not to stop questioning