Banner

Test-driven Development Workshop

Live Classroom
Duration: 3 days
Live Virtual Classroom
Duration: 3 days
Pattern figure

Overview

Test-driven development (TDD) is a design engineering process relying on a very short development cycle. A TDD approach software development would need a comprehensive review of the requirements or design before writing out the functional code. In this process, development begins by writing the test case, and then the code is put to test, followed by refactoring until completion. Using a TDD approach ensures faster feedback, higher acceptance, reduce scope creep and over engineering, maintaining the customer-centric and iterative nature of the process and ensuring the code remains modular, flexible and maintainable.

This 3-day TDD training course explores test-driven development including the essential steps for effective implementation. The course covers unit tests, user stories, design, refactoring, frameworks and how to apply them to existing solutions. The course also explores the implications of code dependencies fluid requirements and early detection of issues. The course includes hands-on lab exercises.

What You'll Learn

  • Provide knowledge and understanding of unit testing principles and practices
  • Understand the role of unit testing in software development
  • Write effective unit testing
  • Properties of effective unit testing
  • How to use mock objects to isolate the ‘system under test’
  • Effective refactoring of the code base
  • Benefits of test-first and test-driven development
  • Techniques and practices to aid in the successful adoption of test-driven development
  • How to use acceptance testing and behavior-driven development to further advance test-driven development

Curriculum

  • DevOps overview
  • The Agile manifesto
  • Scrum vs. Agile

  • User stories
  • Tasks
  • Bugs
  • Automated Builds
  • Automated Tests
  • Continuous inspection

  • Automated unit tests
  • Automated acceptance tests

  • Kanban board
  • User stories
  • Tasks
  • Bugs
  • Work in progress
  • Burndown chart

  • Reasons to do unit testing
  • What to test: Right BICEP
  • CORRECT boundary conditions
  • Properties of good tests

  • What is JUnit?
  • JUnit building blocks
  • Test cases
  • Test suites
  • Examples

  • Agile testing quadrant
  • Automation pyramid
  • Assertions

  • Setup/Teardown
  • JUnit lifecycle
  • System under test
  • Test design strategy
  • Naming our tests
  • Exceptions

  • IDE and Project setup
  • Running our first unit test
  • Explore the JUnit framework
  • Test attributes
  • Assert statements

  • TDD overview
  • Red, green, refactor
  • TDD benefits

  • Development without TDD
  • Test last
  • Test last in parallel
  • Test-driven development

  • Collective ownership
  • Continuous integration

  • Ripple effect of defects
  • Partially done work
  • Extra features
  • Re-learning
  • Hands-off
  • Task switching
  • Delays
  • Defects

  • Automate, automate, automate
  • Automate early and often
  • Additional topics identified

  • Start Test Driven Development on our example App
  • Write unit test cases
  • Experience RED, Green, Refactor Process

  • Introducing test doubles
  • Stubs
  • Fakes
  • Mocks

  • Setting up test doubles for example app
  • Discuss and implement test dummy and test stubs

  • Red, green, refactor
  • Benefits
  • Development without TDD

  • Reduce local variable scope
  • Replace Temp with Query
  • Remove Dead Code
  • Extract Method
  • Remove Unnecessary Code

  • Implement new test cases
  • TDD Cycle
  • Discuss and implement Refactoring Needs

  • Pairing Setup
  • Results: Time
  • Results: Defects
  • How it works

  • Both Halves of the Brain
  • Focus
  • Reduce Interruptions
  • Reduce Resource Constraints
  • Multiple Monitors
  • Challenges

  • Pair Rotation
  • Ping Pong Pairing
  • Promiscuous Pairs
  • Pair Stairs
  • Cross-Functional Pairing

  • Acceptance Tests
  • Why Acceptance Tests?
  • Acceptance Test Execution
  • Who Writes Acceptance Tests
  • Pair Test Writing

  • Keys to Good Acceptance Tests
  • Writing Acceptance Criteria
  • Acceptance Test Example
  • Acceptance Test-Driven Development (ATDD)

  • Specification by Example
  • BDD Frameworks
  • BDD Examples

Experience ATDD and BDD, and discuss impact to TDD

  • Continuous unit testing
  • Collective ownership

  • Unit testing legacy applications
  • Techniques for legacy code
  • External dependencies
  • Mocking frameworks
  • Unit testing the database

  • Working with database
  • Working with mocking frameworks

  • Continuous integration
  • Batch execution of test cases

  • More tests
  • Algorithm

  • Reduce local variable scope
  • Replace Temp with Query
  • Remove Dead Code
  • Extract Method
  • Remove Unnecessary Code

  • Working with the database
  • Working with mocking frameworks
waves
Ripple wave

Who should attend

The course is aimed towards professionals who have experience in language programming, including C++ or Java. The course is highly recommended for –
  • Software Developers and Programmers
  • Agile Practitioners
  • Quality Assurance Professionals
  • Software Testers
  • Product Owners
  • Project Managers
  • IT Managers
  • Software Engineers

Prerequisites

There are no mandatory prerequisites for this course. However, completing the self-paced Agile testing course would be helpful.

Interested in this Course?

    Ready to recode your DNA for GenAI?
    Discover how Cognixia can help.

    Get in Touch
    Pattern figure
    Ripple wave