Test-Driven Development in C++


Details
You might think that test-driven development is all about testing, but it is really a design activity. How do you design clean interfaces before you implement them? How do you create objects that follow the SOLID design principles (http://en.wikipedia.org/wiki/SOLID_(object-oriented_design))? How do you design objects without gold plating (https://en.wikipedia.org/wiki/Gold_plating_(software_engineering))?
Test-driven development is a fun way to achieve these design objectives by writing code. Along the way we get positive feedback from our system that it is working properly and we're making forward progress. Come join us to experience the fun and the joy of test-driven development!
Along the way we'll look at the practical aspects of how to write a unit test using Boost.Test, how to integrate tests into your C++ build, good test case design, tests as documentation, how to mock collaborators in a test and how to test the logic in the user interface.
Bring along your laptop and learn how to practice test-driven development in C++! Richard Thomson will present a workshop on test-driven development in C++ using the Prime Factors Kata (http://butunclebob.com/ArticleS.UncleBob.ThePrimeFactorsKata) as a working example. You can follow along on your laptop with the code provided to you. This will give you a chance to experience the workflow of test-driven development and gain insight into how test-driven development can help you produce better code and better designs incrementally. We'll also show you how to unit test your GUI by developing the behavior of a dialog in a test-driven manner.
For the best experience, you will want to get the following prerequisites on your laptop:
• A C++ development environment: for Linux/MacOS CLion (http://www.jetbrains.com/clion/) is recommended; for Windows Visual Studio 2013 Community Edition (http://go.microsoft.com/?linkid=9863608&clcid=0x409) is recommended.
• CMake (http://www.cmake.org/)
• Boost Libraries (http://www.boost.org/users/download/) (we'll be using Boost.Test)
• Turtle (http://turtle.sourceforge.net/) (aka Boost.Mock), a mock framework for C++
The presentation is available (https://github.com/boostcon/cppnow_presentations_2014/tree/master/files/test_driven) from the C++ Now! 2014 github repository. The original workshop was for a longer period of time, so we will skip some steps in the presentation so that we have time to talk about mocks and the GUI.
6:00 - 6:30 Setup
6:30 - 7:30 Presentation
7:30 - 8:00 Discussion
Snacks and drinks will be provided. Attendance is always free!

Test-Driven Development in C++