TDD with Design & Refactoring
4 Days
agilec#nunitjavajunitpythonpytestjavascriptjest
agileautomation
Intermediate
developer

More and more organisations are looking to Test Driven Development (TDD) and related practices, as a way to gain or maintain their competitive advantage in software delivery. 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 demonstrated with Jest/Jasmine. Program includes many demonstrations. All demonstrations will be good for programmers knowing any object oriented language like C#, Java, Javascript, python etc. Mocking is explained in details with relevant frameworks. Participants will have hands-on during program with their choice of unit testing framework. On top of this, program includes topics like OO design principles, SOLID, GRASP, Refactoring, Pair Programming, introduction to Patterns, and Role of TDD in Agile Development. Beyond basic contents, program introduces concept of Behavior Driven Development (BDD) and Acceptance Test Driven Development (ATDD).

Audience

Program is primarily for developers and designers that are directly involved with source code.

Prerequisites

Participant must be able to code simple application with standard library using their choice of IDE and language (C#, Java, Javascript, Python).

Topics

Introduction
  • Types of testing
  • Key Testing Principles
  • Developer Vs. Tester
  • Traditional coding
  • Test-First Vs. Code-First
  • Red-Green-Gold
  • Why TDD?
  • Role of TDD in agile SDLC
  • View of TDD as process
  • Reducing Technical Debt
  • Practicing Emergent Design
  • TDD benefits
Unit Tests
  • Manual unit testing and its problems
  • Goals of unit testing
  • Architecture of Unit testing framework(s)
  • JUnit/TestNG, xUnit/NUnit/MSTest, Jasmine/Jest
  • Syntax and use cases
  • Extension
  • Naming Conventions
  • AAAC Technique
  • Commonality of test code
  • Testing non-public elements
  • Triangulation – How to find test cases?
  • Good test cases
  • Bad test cases
  • Data driven testing
  • Mock Objects
  • Why Mocking?
  • Manual Mocks
  • Mock Objects Framework
  • Syntax and use cases
  • Mocking various elements
  • Limitations
Design & Refactor
  • Complexity
  • Code Smells
  • Key Refactorings
  • Anti-patterns
  • Legacy Code
  • OO principles
  • Encapsulation Vs abstraction
  • SOLID+
  • GRASP
  • Packaging
  • Introduction to GoF Patterns
  • TDD Patterns
  • Cost of flexibility
  • Code Coverage
  • Testability
  • Observability
Simple Intro
  • Pair Programming
    • Styles
    • Guidelines
    • What not to do
    • Benefits
    • Challenges
  • BDD & ATDD
  • Stories
  • Scenarios
  • Acceptance Criteria
  • Gherkin
  • Step Definitions
  • Benefits
  • Frameworks and Usage

Exclusions

Nothing significant to mention.

Anything not mentioned in Topics

Software Requirements

Participant's choice of IDE for hands-on

Internet Requirements

Good unrestricted internet connection is required.

Hardware Requirements

Laptop capable to run MS Office

Classroom Requirements

Projector with HDMI, White Board, Markers with Eraser

Online Requirements

Appropriate meeting software e.g. Zoom, MS Teams Please make sure that camera, speaker and mic are working

If you have any query, please contact now.