Your SlideShare is downloading. ×
0
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
All you need know about testing
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

All you need know about testing

1,372

Published on

A guide of good practices on testing and how write good tests.

A guide of good practices on testing and how write good tests.

Published in: Software, Technology, Education
0 Comments
11 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,372
On Slideshare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
32
Comments
0
Likes
11
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. Something You Always Wanted to Know About Testing* *But Were Afraid to Ask Jorge Juan Barroso Carmona Android Expert @flipper83 jorge@karumi.com
  • 2. TESTS
  • 3. What is Testing?
  • 4. Checking is confirmation, verification, and validation. By machines. Testing is exploration, discovery, investigation, and learning. By humans. versus
  • 5. Why Testing? Martin Fowler
  • 6. ! “ more Functionality more Quickly ” “ Bad code affect to your Costumer ”
  • 7. What are Unit Tests?
  • 8. Black-Box before White-Box
  • 9. creating tests in an environment where they have some Control over their own Destiny. Be careful, sometimes Context is Everything.
  • 10. more Information in a test than in code. Paranoid?
  • 11. Don’t create your own Problems. Turn most unit tests into Assertions. Don’t test Implementation Details.
  • 12. “ Si tu Unit test tarda más de 1 segundo, cómprate un pony y no me vendas que eso es un Unit test ” @Jordi9
  • 13. Mock or Stub?
  • 14. Stubs are canned answers to calls. Mocks are objects pre-programmed with expectations.
  • 15. Avoid creating methods only for stubs.
  • 16. A Big dependency of Robolectric and PowerMock is a sign of bad code.
  • 17. Mock dilema: your test only checks that your mocks works.
  • 18. What are Integration Tests?
  • 19. Don’t test all your Layers at the same time Or at least Be aware you are doing it
  • 20. Duplicated tests. Write O(n!) tests. where “n” it’s the number of collaborators
  • 21. Don’t test the System or External Libraries. Sometimes is a Good practice to test all your layers.
  • 22. Why you should use Continuous Integration
  • 23. The best test is the one that is Never executed. Increase your Time to develop. Everyone has the latest executable and can see what’s happening.
  • 24. “ automated crap is still crap. ” James O Coplien
  • 25. How to decide the Test Coverage?
  • 26. Low level coverage says that the code is badly tested, but you cannot claim the opposite with just high level coverage
  • 27. 100% coverage is to test all possible code paths. Is TDD here? Tests are code, we need to maintain them.
  • 28. Risk-based Testing: prioritize the test over the risk of failure, the importance and the impact of failure.
  • 29. “ I get paid for code that works, not for tests, so my philosophy is to test as little as possible to reach a given level of confidence ” Kent Beck “ In most businesses, the only tests that have business value are those that are derived from business requirements. ” James O Coplien
  • 30. Recap
  • 31. Silver bullets do not exist.
  • 32. The really important thing is to write Faster and better code
  • 33. And please, expose your Dependencies and write Readable code
  • 34. your Code is more important that your tests.
  • 35. “ If you find your testers splitting up functions to support the testing process, you’re destroying your system architecture and code comprehension along with it. Test at a coarser level of granularity. ” James O Coplien
  • 36. + James Bach and michael bolton. checking vs testing (2009 - 2013) + Workflows of Refactoring. martin fowler. (oop 2014) + Why Most Unit Testing is Waste. James O Coplien (2013) + 467 tests, 0 failures, 0 confidence. Katrina Owen (Railsberry 2013) + Mocks Aren't Stubs. martin fowler (2007) + Integrated Tests Are A Scam. J.B. Rainsberger (2013) + Exploratory and Risk Based Testing. Bach, J. Kaner, C. (2004) + Decomposing into modules. D.L. Parnas (1972) + The Art of Unit Testing. Roy Osherove + Test Driven Development: By Example. Kent Beck + UnitTest. Martin fowler 2014 ! References
  • 37. Q&A?@flipper83 jorge@karumi.com

×