# what is a unit tese? ### A unit test is a way of testing a unit - the smallest piece of code that can be logically isolated in a system. In most programming languages, that is a function, a subroutine, a method or property. # what is a testing framework? ### A testing framework is a set of guidelines or rules used for creating and designing test cases. A framework is comprised of a combination of practices and tools that are designed to help QA professionals test more efficiently. # Why is it useful to write the tests before the code in TDD? ### This helps to avoid duplication of code as we write a small amount of code at a time in order to pass tests. # What 4 questions should a failing test tell you? - Design aid: Writing tests first gives you a clearer perspective on the ideal API design. - Feature documentation (for developers): Test descriptions enshrine in code every implemented feature requirement. - Test your developer understanding: Does the developer understand the problem enough to articulate in code all critical component requirements? - Quality Assurance: Manual QA is error prone. In my experience, it’s impossible for a developer to remember all features that need testing after making a change to refactor, add new features, or remove features. - Continuous Delivery Aid: Automated QA affords the opportunity to automatically prevent broken builds from being deployed to production.