Advanced C++ Mocking Using Google Mock

Writing unit tests is not trivial. In this course, you'll learn how to succeed using a powerful tool, Google Mock. It has become the standard mocking framework for C++ developers who want to write high quality code faster.
Course info
Level
Intermediate
Updated
August 17, 2017
Duration
3h 49m
Table of contents
Getting Started
27m 46s
Description
Course info
Level
Intermediate
Updated
August 17, 2017
Duration
3h 49m
Description

Writing unit tests looks simple in blogs, books, and tutorials. However, it can be quite difficult when attempted in the real world where real code has dependencies that make unit testing difficult. The solution is to isolate unit tests using mocks, stubs, and fakes. Using mocks is crucial for any developer who attempts to unit test his code. In this course, Advanced C++ Mocking Using Google Mock, you'll learn how to fake dependencies in C++ using Google Mock. First, you'll learn about how to make unit tests simpler and more predictable using mocks. Next, you'll explore how to run Google Mock with different unit testing frameworks, and cover mocking frameworks best practices. Finally, you'll learn useful unit testing patterns for existing legacy code. By the end of this course, you'll have a working knowledge of mocking frameworks and Google Mock, and you'll be able to efficiently unit test any code.

About the author
About the author

Dror is a Software developer, architect, and consultant who likes to help software developers write better code. He's a public speaker and blogger. Dror teaches, mentors, and writes code using clean code principles, TDD, and BDD.

More from the author
Transcript
Transcript

Hi everyone, my name is Dror Helper and welcome to my Pluralsight course “Advanced C++ Mocking Using Google Mock”.

I am a software developer, architect and consultant who cares about his code and enjoys teaching other developers how to write better code.

Mocking frameworks are crucial when writing unit tests, without them we cannot write good, deterministic tests, isolated from dependencies outside of our control.

This course is a deep dive into Mocking, we will learn how to unit test real C++ code using Google Mock.

Some of the major topics that we will cover include:

  1. Why you need a mocking framework when writing unit tests
  2. How to use fake objects to eliminate external dependencies
  3. Running Google Mock with difference unit testing frameworks
  4. Mocking frameworks best practices5
  5. Useful unit testing patterns for existing legacy code

By the end this course, you’ll know how to test real world C++ code using Google Mock.

Before beginning the course you should be familiar with C++ so in case you need a refresher check out one of the excellent Pluralsight courses from the C++ track. In case you never written unit tests before I suggest you check my other course on C++ unit testing fundamentals using Catch.

I hope you’ll join me on this journey to learn about real world unit testing, mocking and google mock with the “Advanced C++ Mocking Using Google Mock course”, at Pluralsight.