Home > Training Course Catalogue > Software Development Courses > Agile Development Training Courses > Current Page


Perpetual Solutions
Tuition House
27-37 St Georges Road, London
SW19 4DS

+44 (0)20 7620 0033
+44 (0)20 7620 0055

 




Test-Driven Development in C++


This course includes classroom labs for live hands-on training


View course dates


Course Duration: 2 days


Course Code: PSD012


Course Description:


The Test-Driven Development in C++ course presents a number of modern practices for
developing code based on an iterative and incremental development lifecycle. Agility and
predictability are two qualities often missing from software development. 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.

 

The course is 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 it
embodies. In this form the course is based on lecture material, demonstration, discussion and
hands-on labs. However, the course can also be run as a seminar without hands-on labs, which
puts more emphasis on understanding the principles through the demonstrations.

 

 

Objectives

 

 

  • Appreciate the benefits of a continuous and iterative approach to design and delivery
  • Recognise the purpose and practice of refactoring in keeping a system supple and adaptable
  • Know how to build up a set of tests and simple test frameworks for units of code
  • Understand the consequences of dependency management on testing and code quality


Prerequisites:

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


Prerequisite courses:

C++ for Non C Programmers


This course includes the following modules:

Agile Development Microprocess

  • Traditional versus agile development processes
  • Iterative and incremental development
  • Informal and continuous design
  • The role of refactoring
  • Refactoring versus other code changes
  • Extreme Programming
  • Test-Driven Development

Testing in Principle

  • Traditional view and reality of testing
  • Driving development through testing
  • Testing early, often and automatically
  • Testing versus debugging
  • White-box versus black-box testing
  • Functional versus operational testing

Basic Unit Testing in Practice

  • Test plans versus test code
  • Use of assert
  • Testing at the interface
  • Testing the simplest things first
  • Testing incrementally
  • Testing correctness of failure

Refactoring a Test Harness

  • Common unit test frameworks (xUnit and Boost)
  • Refactoring to a simple framework
  • Test cases, test suites and test runners
  • Throwing exceptions on failure
  • Continuing tests after failure
  • Customising assertions
  • Testing correctness of exceptions

Test-Writing Techniques

  • Red, green, refactor
  • None to one to many
  • Faking it
  • Telling the truth
  • Isolated and short tests
  • Refactor common fixture code
  • Declare, prepare, assert
  • Test by function, state or scenario
  • Asserting compile-time constraints

Common Refactorings

  • Renaming variables, functions, classes and headers
  • Restructuring class hierarchies by extracting interface classes, base classes and derived classes
  • Partitioning classes by extracting classes and functions
  • Changing private representation

Decoupling Techniques

  • Unmanaged dependencies
  • Test-driven decoupling
  • Layering
  • Eliminating cyclic dependencies
  • Mock objects
  • Eliminating Singletons, statics and other globals
  • Testing I/O

 

To make an enquiry for this course to be run ONSITE at your location, click here or call Sales on +44 (0) 20 7620 0033.


Perpetual Solutions are a global provider of onsite training solutions throughout London, UK and the rest of the world. For scheduled training our UK partner network provides an unrivalled choice of courses.


Save as PDFSave as PDF

PrintPrint this course



© Perpetual Solutions Ltd 2008.   Perpetual Solutions, Tuition House, 27-37 St Georges Road, London, SW19 4DS. +44 (0)20 7620 0033 +44 (0)20 7620 0055