Test Driven Development
What is Test Driven Development?
Test Driven Development is not Testing.
Test Driven Development is actually an Agile Software Development Methodology better thought of as Test First Design.
Test Driven Development is actually one of many Agile Software Development Methodology i.e. XP-SCRUM-FDD.
Agile-TDD emphasize working software as the primary measure of progress.
Test-driven development is a development technique where you must first write a test that fails before you write new functional code.
Principles of TDD(Test Driven Development) - test automation, small releases, simple design, constant testing used to prove design, continuous integration.
What is the Test Driven Development Process?
Write a test that specifies a tiny bit of functionality.
Ensure the test fails.
Write only the code necessary to make the test pass.
Refactor the code, ensuring that it has the simplest design possible for the functionality built to date.
TDD - Is this a process or just hacking?
What about requirements? - Requirements are driven by a set of user stories which describe a requested set of behaviors.
What about design? - Instead of striving for the perfect software design up front we let the tests drive our design.
What about documentation? - The tests evolve as system-level documentation for the set of behaviors we have implemented to date.
What's the advantage? - The code base progresses forward at a relatively constant rate in terms of the functionality supported.
TDD - How do I know if I'm implementing Test Driven Development correctly?
All of your tests are automated.
All of your tests pass 100% of the time.
At any moment you can deliver a working release with a given set of tested functionality.
Your delivering the highest value/cost ratio thing of measurable value to customers in small release increments.
How could we use TDD in SAM?
Describe all new features and bug fixes as a set functional tests for each release.
Continue evolution of the existing test functionality into a cohesive automated test system that integrates with MIS.
Develop user scenarios and test cases as a form a system documentation.