Skip to content

Instantly share code, notes, and snippets.

@fcamel
Created June 5, 2009 07:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fcamel/124129 to your computer and use it in GitHub Desktop.
Save fcamel/124129 to your computer and use it in GitHub Desktop.
* Levels of tests
o unit test
o integration test
o system test
o acceptance test
* Why test? (acceptance test / system test)
o verify correctness: bugs always exist (but we can keep them small and easier to solve)
o save manually verification time
* Why unit test?
o help find root of bugs (save debugging time)
o examples for tracing codes
* Why test first?
o help design (you never know how to design easy-to-use functions until you use them)
o prevent over-design
o prevent over-test
o make refactoring easily and refactoring is necessary
o save more time of manual verification
* Why refactoring?
o prevent potential bugs
o easier to read / reuse / add new functions
* When it's time to write more unit tests?
o print states
o run debugger (too many states to print)
o don't know where the bug is
* If TDD is so good, why it's not popular?
o It's hard to learn: need at least twice time to learn skills (test patterns / design patterns / refactoring patterns)
o it doesn't fit current development flow in big companies: development teams think QA help them test (but that's not unit tests) and refactoring is not allowed since it causes conflics when merging codes between development teams and QA's branches)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment