Mastering Test-Driven Development and advanced testing patterns
Tests can guide design rather than follow coding. Use TDD to structure development cycles and apply suitable patterns. Strengthen your ability to evolve software with rapid feedback on its behaviour.
- Duration
- 2 days 14 hours
- Code
- DEV004-FR Code
Presentation
Test-Driven Development (TDD) is a software development methodology in which tests are written before the code itself. This test-guided approach produces higher-quality, more robust and maintainable code. Complementing TDD, advanced testing patterns provide proven techniques for structuring and organising tests effectively. This 2-day course develops a solid command of these concepts and their practical application in a JavaScript (TypeScript) environment.
You will learn to implement TDD rigorously, mastering unit testing, continuous integration and different testing strategies. You will explore advanced testing patterns to structure test code effectively and maintain a solid test suite over time. You will also discover key refactoring and dependency injection concepts, essential to agile, high-quality development. Practical web and Node.js application examples help you apply your new skills.
This 2-day programme covers all aspects of TDD and advanced testing patterns. You will learn to master unit testing, refactoring and dependency injection, alongside many other key concepts.
Objectives
By the end of this advanced TDD course, you will be able to:
- implement Test-Driven Development in your projects;
- build comprehensive test coverage to ensure high code quality and support frequent deployments;
- master different test types, including unit and integration tests, and apply them effectively;
- structure and maintain a robust, scalable test suite;
- deepen your understanding of refactoring to continuously improve code quality;
- learn Clean Architecture fundamentals to design robust, scalable applications.
Program
Day 1: introduction to TDD fundamentals
- Welcome and introductions:
- your expectations and an overview of the planned programme.
- Getting started with TDD:
- TDD benefits: quality, agility and productivity;
- key TDD principles: Red–Green–Refactor;
- choosing the language and testing model.
- Online labs:
- Level 1 coding katas, such as FizzBuzz and a calculator, to become familiar with the TDD cycle.
- Test doubles and dependency injection:
- different types of test doubles: mocks, stubs and spies;
- the benefits of dependency injection for writing isolated tests.
- Online labs:
- Level 2 coding katas involving interactions with external dependencies such as databases and APIs.
Day 2: deepening knowledge and developing skills
- London School of TDD and Endo-Testing:
- introducing the London School of TDD approach;
- using Endo-Testing to test a class's internal behaviour.
- Advanced mocks:
- using mocks to simulate complex behaviour and verify interactions;
- pitfalls to avoid, including over-mocking and fragile tests.
- Online labs:
- Level 3 coding katas with 1 or 2 complete real projects, such as a console multiple-choice quiz generator, a React to-do application or an account creation platform.
- Experience review:
- a question-and-answer discussion of challenges encountered and lessons learned.
Audience
This course is intended for:
- professionals with at least 2 years of back-end development experience, including:
- back-end developers seeking deeper software architecture knowledge and the next step in their development;
- technical leads seeking to optimise the design and maintenance of their teams' applications;
- software architects looking for new approaches to designing more robust, scalable systems.
Prerequisites
The following prerequisites apply:
- Equipment: a computer with a camera, microphone and stable internet connection.
- Software:
- the latest stable version of Node.js (French page);
- the latest stable version of Docker;
- a development environment such as Visual Studio Code or WebStorm (French page).
- Skills:
- solid JavaScript and TypeScript knowledge, including types and interfaces;
- experience writing unit tests;
- basic knowledge of object-oriented programming concepts.
Technical stack: TypeScript and Vitest.
Teaching and assessment methods
- Initial skills assessment
- Training materials provided to participants
- Continuous assessment throughout the course
- End-of-course feedback questionnaire
- Combination of theory and practical application
- Attendance records
- Post-course follow-up evaluation
- Practical exercises
Course highlights
Dates and sessions
Choose the date and delivery format that suit you.
No upcoming sessions are currently available.
fr
en