Simple play icon Course
Skills

Advanced C++ Mocking Using Google Mock 1

by Dror Helper

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.

What you'll learn

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.

Table of contents

Course Overview
1min

Course FAQ

What is Google Mock (gMock)?

Now known as the Googletest Mocking Framework, Google Mock is the standard mocking framework for C++ developers.

What is the Googletest Mocking Framework used for?

gMock is used for creating fake objects in order to remove external dependencies for effective testing.

What materials will I need for this course?

The latest Google Mock download is found on Google's Open Source site.

What prerequisites are needed for this course?

This course is for C++ developers but can also be applied to testing in other objective-oriented languages like Java or C#.

What will I learn in this course?

This course will teach you how to use Googletest and the Google Mock Framework.

About the author

Dror is a freelance software architect. He has been writing software professionally for more than a decade, during which he has worked for industry giants such as Intel and SAP as well as small startup companies. He has extensive knowledge of many programming languages and platforms including C++, assembly, .NET (C#/VB) and Java. Dror is an expert in agile methodologies and software engineering practices. When not writing code, Dror mentors developers and conducts courses about clean code, unit... more

Ready to upskill? Get started