Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Something you always wanted to know about testing

Something you always wanted to know about testing

Companies are creating more complex and big applications everyday and we need trust on our code.

For this reason, testing is the most important part of the software development process. In this talk we aim to give answers to common questions about testing. We will talk about how testing affects Android development with a practical real world approach.

Karumi

June 20, 2016
Tweet

More Decks by Karumi

Other Decks in Programming

Transcript

  1. Something You Always Wanted to Know About Testing* *But Were

    Afraid to Ask Jorge Juan Barroso Carmona Android Expert @flipper83 [email protected]
  2. if the time should come when you have to make

    a choice between what is right, and what is easy!!
  3. Checking is confirmation, verification, and validation. By machines. Testing is

    exploration, discovery, investigation, and learning. By humans. versus
  4. “ Trabajar con una base de tests en condiciones es

    un puto gustazo!!! ” @pedro_g_s
  5. creating tests in an environment where they have some Control

    over their own Destiny. Be careful, sometimes Context is Everything.
  6. Don’t create your own Problems. Turn most unit tests into

    Assertions. Don’t test Implementation Details.
  7. “ 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
  8. Don’t test all your Layers at the same time Or

    at least Be aware you are doing it
  9. Don’t test the System or External Libraries. Sometimes is a

    Good practice to test all your layers.
  10. 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.
  11. Low level coverage says that the code is badly tested,

    but you cannot claim the opposite with just high level coverage
  12. 100% coverage is to test all possible code paths. Is

    TDD here? Tests are Code, we need to maintain them.
  13. Risk-based Testing: prioritize the test over the risk of failure,

    the importance and the impact of failure.
  14. “ 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
  15. “ 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 “ When you are very thirsty, even dirty water will keep you alive. ” J. B. Rainsberger
  16. + 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