2. Overview Introduction Extreme Programming (XP) Tests Stress and Tests What is Test-Driven Development? Misconceptions About TDD Motivation The TDD Methodology Benefits How? Patterns For TDD Vulnerabilities Questions
3. Introduction Agile methods – Group of S/W development techniques based on iterative development Breaking tasks into small increments with minimal planning Techniques such as continuous integration, automated test, pair programming, test driven development, design patterns, code refactoring and other techniques are often used to improve quality and enhance project agility
15. Motivation If you intend to test after you‘ve developed the system, you won‘t have the time for testing. If things get complicated, you might fear that, the system doesn‘t work. If you‘re overwhelmed by the complexity, you get frustrated. If you don‘t have tests for the code, you shouldn‘t use it / ship it. If performance is only considered late, you won‘t be able to just, add a little more performance to the system.
16. The TDD Methodology RED - Write a test that defines how you think a small part of the software should behave. It will fail as the functionality doesn't exists at this point of time GREEN - Make the test run as easily and quickly as you can. Don't be concerned about the design of code, just get it to work. REFACTOR - Clean up the code. Now that the code is working correctly, take a step back and re-factor to remove any duplication or any other problems that were introduced to get the test to run.
22. Patterns for TDD Testing Patterns Red Bar Patterns Green Bar Patterns Refactoring
23. Vulnerabilities I think TDD is very difficult and involves lots of discipline . It doesn’t prevent developers from implementing the wrong solution if they don’t understand the business problem to begin with, but it does help to ensure that the code you do write works the way you intended it to and is tested Difficult to use in situations where full functional tests are required to determine success or failure. Like UI, programs work with DB, specific network configuration Management support is essential. Same developer will write test cases and Actual code – test may share the same blind spots with the code High # of unit tests passing – can lead to less activities like Integration Testing, Devo testing etc.