C++ Unit Testing
Course
Inhouse
Description
-
Type
Course
-
Methodology
Inhouse
-
Duration
3 Days
At the end of the course student will know. how to evaluated a C++ testing framework. how to setup, integrate and work with common C++ Unit testing frameworks. how to design, implement and carry out C++ Unit tests using either CppUnit, CppUnitLite, Boost.test, CxxTest. follow best practices in testing and software development. improve their effectiveness in software. Suitable for: The course is aimed at C++ developers (including developers of Computer Game software), quality-assurance engineers, and project managers. Students are expected to have a good understanding of C++ and the STL, as well as some familiarity with testing concepts (e.g. unit, integration, functional, and load testing)
Reviews
Course programme
The course provides a thorough introduction to unit testing concepts and strategies. It makes use of several of the more widely used C++ unit testing frameworks (CppUnit, Boost.test, CppUnitLite and CxxTest) It covers the concepts underlying unit testing, the requirements and characteristics of good unit testing frameworks and the way these concepts are realised in some practical frameworks. The hands on exercises will familiarise students with test-driven development as a methodology for implementing highly reliable C++ code.
Course Benefits
At the end of the course student will know
- how to evaluated a C++ testing framework
- how to setup, integrate and work with common C++ Unit testing frameworks
- how to design, implement and carry out C++ Unit tests using either CppUnit, CppUnitLite, Boost.test, CxxTest
- follow best practices in testing and software development
- improve their effectiveness in software testing and the quality of the code they are developing
Key Delivery
Instructor led in-house training with a great deal of hands-on practice.
Course Contents
Overview of C++ and Unit Testing
- Basic concepts
- Requirements of a good testing framework
- Overview of CppUnitLite and CppUnit
- Overview of Boost.test
- Overview of CxxTest
- Using Asserts
- Test Composition
- Exceptions and exception testing
- Right results
- Boundary Conditions - CORRECT
- Conformance
- Ordering
- Range
- Reference
- Existence
- Cardinality
- Time
- Inverse Relationships - checking for
- Cross checking
- Error conditions - forcing of
- Preformance characteristics - met
- Composing Test Cases into Test Suites
- Combining Test Suites
- Organizing Tests and Test Suites
- Executing Tests
- Showing Test Results
- Reporting (XML and HTML)
- Testing with Stubs
- Mock Objects
- Best Practices with C++ Unit testing and TDD
- Designing C++ code with testing in mind
- Integration and functional testing using C++ Unit testing frameworks
- Automatic
- Thorough
- Repeatable
- Independent
- Professional
- Quality controlling tests
- Designing for testability
- Refactoring for Testing
- Defining and verifying Class Invariants
- Test Driven Design Strategies
- Testing for Invalid Parameters
- Where to place the test code
- Testing etiquette
- Frequency of testing
- Testing when working with legacy code
- Testing and Code Reviews
C++ Unit Testing