Test Driven Development TDD in C++

Test Driven Development, TDD in C++ training: Writing code test first with automated tests. A hands-on, highly interactive training course.

Automated test first development reduces the space in which bugs can hide. TDD and refactoring are key skills for C++ teams looking to undertake Agile Software Development.

Teams practising TDD in C+ can expect significantly lower defect count and consequently shorter schedules, more predictable deliveries, lower sunk costs and happier customers. In one study a Microsoft team reduced their bug count by 91% using test driven development.

Test driven development is one of the key Agile practices and TDD training is complements Agile training for teams.

TDD in C++ training: Unit Testing with Refactoring

  • 2 days hands-on TDD in C++ training workshop.
  • Delivered on-site at your location in private for your
  • Optional day add-on to provide extra time with exercises / to look at code and discuss legacy issues.

A test-driven approach, in which design is grown and code delivered incrementally according to functionality or risk, forms the basis of the construction phase of an iterative and incremental development. The use of unit testing provides confidence in existing code and supports the ability to refactor code as development unfolds.

About this course

The Test-Driven Development in C++ course presents a number of modern practices for developing code based on an adaptive development life cycle. Agility and predictability are two qualities often missing from software development.

The TDD in C++ workshop intended as a practical course: the best way to appreciate how test-driven development works and what it feels like is to do it in practice, making sense of the principles item bodies. In this form the course is based on lecture material, demonstration, discussion, exercises and hands-on labs.

Who should attend?

The course is suitable for software developers experienced in C++ and familiar with object-oriented principles and practices. Any previous exposure to unit testing or Agile development concepts is beneficial but not essential.

What Will I learn?

  • Appreciate the benefits of TDD testing as a design tool and not just a defect reduction technique.
  • Recognise the purpose and practice of refactoring C++ in keeping a system supple and adaptable.
  • Know how to build up a set of unit tests in C++.
  • Understand the consequences of dependency management on testing and code quality.

Topics included

  • Programmer Testing Evidence of care: Testing viewpoint, Pragmatic testing, Automation, Bug pathology and Testing frameworks.
  • Good Unit Tests Test quality: Good unit tests (GUTs), Not-so-good unit tests, Fine-grained tests, Behavioural tests, Functional versus operational testing and Black-box tests.
  • Overview of xUnit xUnit and the xUnit family: Tests in xUnit, xUnit assertions, Testing thrown exceptions, other xUnit features and Organising xUnit tests (please see below for other test frameworks).
  • Testing Approach Testing sensibility: passive, reactive, active, Plain Ol’ Unit Testing (POUT), Defect-Driven Testing (DDT), Test-Driven Development, Key TDD practices, The test-first cycle and Definition of done.
  • More GUTs Cohesive and focused tests: Propositional test names, Example-based tests, Choosing example data, Quality of failure, What to include and exclude, Short test cases, Single level of abstraction and Anatomy of a test case (Given – When – Then).
  • Listening to Your Tests Feedback from testing: Reasons testing can be hard, Technical debt, Classifying and reacting to technical debt, White-box testing issues and Coverage.
  • Refactoring Kinds of changes to code, Code smells: Dimensions of change, Elements ofrefactoring, Some common refactorings and refactoring motivation and applicability.
  • Test-Driven Decoupling Unit testability and coupling: Unmanaged dependencies, External dependencies, Unit versus integration tests, Characterising testability, Singletons and statics,Test doubles and Doubling techniques in C++.

This training course is largely framework neutral, where appropriate it can be customimsed to match your C++ TDD tresting framework, e.g. Boost, Catch, CppUnit, or other library.

Call today

For more information on TDD in C++ or to discuss scheduling and pricing please contact me, e-mail contact@allankelly.net or complete the contact form.