TDD

Introduction

In this intensive program, participants learn principles of TDD. Primary focus of program is to allow participants to apply unit testing with frameworks collectively known as unit testing frameworks to adopt test-first method of coding. Participants will learn practices to allow writing solid and reliable code efficiently using TDD. 'Unit testing framework' refers to any of popular unit testing frameworks with architecture similar to Junit/TestNG for Java and Nunit/Xunit/MSTest for .Net. Similarties between such unit testing frameworks is also well explained. Javascript Unit Testing is also demonstrated with Jest/Jasmine. Program includes many demonstrations. All demonstrations will be good for programmers knowing any object oriented languages like C#, Java, VB.Net, python etc. Participants will have hands-on during program with their choice of unit testing framework. On top if this, program includes topics like OO design principles, Refactoring, Patterns, Role of TDD in Agile Development and Continuous integration. Beyond basic contents, program introduces concept of Behavior Driven Development (BDD) and Acceptance Test Driven Development (ATDD).

Days

4 Full Days

Level

Intermediate

Topics

Introduction


  • Types of testing
  • Key Testing Principles
  • Developer Vs. Tester
  • Traditional coding
  • Test-First Vs. Code-First
  • Red/Green coding
  • Why TDD?
  • Role of TDD in agile SDLC
  • Reducing Technical Debt
  • Practicing Emergent Design
  • Making Changes More Safe
  • Regression Testing

Unit testing


  • Manual unit testing and its problems
  • Goals of unit testing
  • Architecture of Unit testing framework(s) – JUnit/TestNG, xUnit/NUnit/MSTest, Jasmine/Jest
  • Basic syntax of JUnit/TestNG, xUnit/NUnit/MSTest, Jasmine/Jest
  • More advanced syntax
  • Naming Conventions
  • AAA Technique
  • Commonality of test code
  • Collections, Files and Database
  • Exception handling
  • Testing non-public elements
  • Triangulation
  • Boundaries
  • Mock Objects
  • Manual Mocks
  • Auto Mocks
  • Stubs
  • Self-Shunting
  • Performance
  • Javascript Unit Testing
  • Jest with Jasmine

 BDD and ATDD


  • Extension of TDD
  • Stories, Scenarios and Steps
  • Value of Acceptance Criteria
  • Finding Test Cases
  • Benefits
  • Gherkin
  • Frameworks and Usage

Key Ideas


  • Continuous Integration
  • Code Smells
  • Key Refactorings
  • Legacy Code
  • Advanced OO principles
  • SOLID, OCP, SRP, DIP, IOC, Encapsulation, SI etc
  • Introduction to GoF Patterns
  • TDD Patterns
  • Anti-Patterns
  • Code Coverage
  • Testability of Code

Exclusions

  • Any Build Tool like VSTS, Git, Gulp, Grunt, Jenkins, Npm, Bower etc.
  • UI level testing and related tools like Selenium, JMeter etc.
  • Customer facing processes like User Acceptance Testing etc.
  • .Net/Java/JavaScript Architecture topics like Repository Pattern, Flux, MVC, Active Record etc.
  • Language syntax topics like C#, Java, Python, Javascript etc. Participants are assumed to know related languages and frameworks like .net and java well enough.
  • Web topics like HTTP, HTML, CSS, LESS and related topics etc.
  • DB Topics
  • Anything not mentioned in topics above