Test Driven Development (TDD)
Origins/explanation of TDD
Discuss where TDD came from, its usage in the industry, some of the thought leaders that support it.
Rationale for incorporating TDD
Covers why TDD should be used, and how it dovetails with an agile approach.
Testing basics
Refresher on the differences between white box, grey box, and black box testing and describes how they apply to agile testing.
Principles of TDD
Covers an overview of the basic concepts of TDD such as writing tests to fail, refactoring, and test maintenance
Exercise: Write sample tests
Participants will perform a practical exercise whereby a simulated application will perform various functions based on provided instructions. Tests will be written for validation.
User Story Acceptance Testing
Understanding User Story Acceptance criteria
Discussion and examples of how drive test cases from User Stories and the concept of behavior driven acceptance criteria
Scenarios and business flow models
Covers examples and techniques for stringing together logically connected stories into test scenarios
Where and when to incorporate testing in an agile project
Describes the delineation between black box and white box testing and how those in the tester and analyst role collaborate with those in the development role to understand acceptance criteria
Definition of “done”
Discussion on when enough testing has occurred to establish that a story is “potentially shippable”
Exercise: Write acceptance criteria and scenarios
Participants will take user stories and build acceptance criteria and assemble scenario-based test cases
Continuous Integration (CI)
CI definition and concepts
Discuss what continuous integration is and why it is essential to successful agile implementations.
Test suite framework
Talks about the need for a black box testing framework in which to run tests. Attributes of a good test framework.
CI tools
Overview of CI tools, discussion of how such tools can be coupled with Source Code Management tools to provide a CI solution.
Code Coverage
Discussion on the importance of testing all code, to include exception handling and unlikely scenarios
Coverage reporting
Learn how to ensure, through reports that you or your team’s code has test coverage
TDD and Unit Testing
Test First Concepts and techniques
Covers examples and methodology for key concepts on building tests that will drive out design and eventually code.
Testing frameworks
Demonstration, definition, and discussion of the characteristics of testing framework for use by developers.
Using the Strategy design pattern
A brief introduction to the GOF pattern known as Strategy, which can be used to instantiate a testing framework implementation.
Exercise: Design a simple test framework
Participants will design a simple test framework and based on previous exercises, use those tests to validate the framework.
Repeat writing and refactoring code to pass tests
In depth discussion of best practices involving test-first techniques of writing large numbers of tests and then refactoring code to pass them
Exercise: Write simple tests
Participants will write. some simple unit tests to get a flavor for how much testing and test writing would need to occur on a TDD project.
Stand-ins and mock objects
Covers the need for and application of objects that simulate successful and failed interface communication
Testing within project execution
Keeping tests in sync with source code
Tips and techniques for making sure tests and source code are coupled and kept in sync as the system evolves
Integrating tests and code within CI environment
Overviews of examples of running tests, code, and a build all in one step at a given time or based on a given event
Suggestions for incorporating CI into an agile project
Covers current available CI tools and the aspects of CI that the technical team will have to consider before rolling out an agile project
Pitfalls TDD/BDD and CI antipatterns