C Unit Testing Google Test and Google Mock

Beginning Test Driven Development (TDD) in C++ with Googletest and Googlemock
C Unit Testing Google Test and Google Mock
File Size :
1.51 GB
Total length :
3h 27m

Category

Instructor

Serban Stoenescu

Language

Last update

Last updated 7/2022

Ratings

4.3/5

C Unit Testing Google Test and Google Mock

What you’ll learn

Google Test (C++ Unit Testing)
Google Mock

C Unit Testing Google Test and Google Mock

C Unit Testing Google Test and Google Mock-screenshot

Requirements

Basic C++
No unit testing experience is required

Description

This course is for software developers and students who want to be better programmers by writing more solid, bug-free code using the Google Test framework. Your code will get better and you will have more confidence that your code is correct, because you will catch more bugs using automated tests.How many times did this happen to you? You wrote new code, and after your hard work is done, you find that you broke features that used to work? And you had to waste more hours finding and fixing the bugs… This problem can get solved in most cases by using automated tests, especially unit tests.No experience with automated testing is required. Very basic C++ knowledge is needed, nothing too sophisticated. If you are completely new to Google Test, this course is just for you! If you already have some knowledge, look at the course content and see if you find some more advanced features that you didn’t know about.Google Test works on multiple platforms. You can use any platform you like. In this course, I am doing it on:Windows (Visual Studio)Linux (CMake or compiling directly from the command line)Other platforms will be added if you suggest them to meThere are slides and hands-on coding examples in each section. I recommend that you try the examples and play around with them.Here’s a brief presentation of the course content:Optional videos: Setting up on Windows (Visual Studio) and on Linux (CMake and GCC)Basics of unit testing:Unit test structureAssertions – numeric, string, exceptionsReusing code between tests (test fixtures, SetUp() and TearDown())Parameterized tests:  generate multiple tests by writing one single function.Mocking – replacing real objects with fakes that you can control):BasicsSetting the behaviour of mocksMatchers

Overview

Section 1: Course Intro

Lecture 1 How to Use This Course

Section 2: Setting Up Google Test

Lecture 2 Intro

Lecture 3 Update for CMake users on all operating systems

Lecture 4 Installing Visual Studio

Lecture 5 Visual Studio – Sample GTest Project

Lecture 6 Small Update

Lecture 7 Googletest with FetchContent in CMake

Lecture 8 About the Next Lecture

Lecture 9 Googletest with FetchContent in CMake Visual Studio

Lecture 10 Installing on Linux

Lecture 11 Google Test CMake Sample (Linux)

Lecture 12 Google Test – CMake With a Test Runner and Actual Application

Lecture 13 Small note

Section 3: Unit Testing Basics

Lecture 14 Intro

Lecture 15 What is a Unit Test?

Lecture 16 Unit Test Characteristics

Lecture 17 Types of Testing

Lecture 18 Unit Test Structure (Slides)

Lecture 19 Unit Test Structure (Code Example)

Lecture 20 Assertions

Lecture 21 Assertions (Code Example)

Lecture 22 Assertions on Strings – Wrong Way To Do It

Lecture 23 Assertions on Strings

Lecture 24 Assertions on Strings (Code Example)

Lecture 25 Assertions on Exceptions

Lecture 26 Assertions on Exceptions (Code Example)

Lecture 27 Summary

Section 4: Fixtures: Remove Redundant Code

Lecture 28 Intro

Lecture 29 Introduction to Test Fixtures

Lecture 30 Test Fixtures (Code Example)

Lecture 31 Fixture Flow

Lecture 32 Parameterized Tests

Lecture 33 GoogleTest update

Lecture 34 Parameterized Tests (Code Example)

Lecture 35 Summary

Section 5: Setting Up Google Mock

Lecture 36 Intro

Lecture 37 Google Mock Visual Studio (Windows)

Lecture 38 Google Mock CMake Sample (Linux)

Section 6: Google Mock

Lecture 39 Intro

Lecture 40 Mocking Project Resources

Lecture 41 Introduction to Mocking

Lecture 42 Mocking Methods

Lecture 43 Presentation of Our Project

Lecture 44 Mocking Methods – Current Way (Code Example)

Lecture 45 Mocking Methods – Legacy (Code Example)

Lecture 46 Setting Expectations and Behaviour

Lecture 47 Mocking – Times (Code Example)

Lecture 48 Mocking – Returns (Code Example)

Lecture 49 Invoking Actions (Code Example)

Lecture 50 Matchers

Lecture 51 Matchers (Code Example)

Lecture 52 Assertions on Vectors (Code Example)

Lecture 53 Callbacks

Lecture 54 Mocking Private and Static Methods

Lecture 55 Summary

Section 7: Bonus: Tips & Tricks

Lecture 56 What’s this?

Lecture 57 Running a subset of tests, FAIL() and SUCCEED()

Lecture 58 Visual Studio Test Runner

Lecture 59 Arguments in Visual Studio (generating XML report)

Section 8: Conclusion

Lecture 60 Conclusion

Software developers and students who want to make their code more robust, bug-free,Anyone interested in Google Test and Google Mock

Course Information:

Udemy | English | 3h 27m | 1.51 GB
Created by: Serban Stoenescu

You Can See More Courses in the IT & Software >> Greetings from CourseDown.com

New Courses

Scroll to Top