C++ Unit Testing: Google Test and Google Mock

所在平台: Udemy

课程主页: https://www.udemy.com/course/cplusplus-unit-testing-google-test-and-google-mock/

课程评论:没有评论

第一个写评论        关注课程

课程简介

课程名称:C++单元测试:Google Test和Google Mock 课程概述: 本课程适合希望通过使用Google Test框架编写更健壮、无错误代码的软件开发者和学生。您将提高代码质量,并更有信心确保代码的正确性,因为可以通过自动化测试捕捉到更多错误。您是否曾因编写新代码后不小心破坏了原有功能而浪费时间寻找和修复漏洞?这种问题在大多数情况下可以通过使用自动化测试,特别是单元测试来解决。本课程无需自动化测试经验,仅需基本的C++知识,非常适合初学者。如果您已有一定基础,可以查看课程内容,了解一些您未掌握的高级特性。 Google Test支持多种平台,您可以选择任何喜欢的平台。课程中将展示在Windows(Visual Studio)和Linux(CMake或直接从命令行编译)上的应用,并欢迎您提出其他平台的建议。每个模块都有幻灯片和实操编码示例,建议您尝试例子并进行探索。 课程内容简述: - 可选视频:在Windows(Visual Studio)和Linux(CMake和GCC)上的设置 - 单元测试基础: - 单元测试结构 - 断言- 数字、字符串、异常 - 在测试间重用代码(测试夹具,SetUp()和TearDown()) - 参数化测试:通过编写单个函数生成多个测试 - Mock功能:用您可以控制的假对象替换真实对象,包括基础知识、设置Mock行为和匹配器。 此课程将帮助您提升编码能力,使您能够编写出更少错误的代码。

课程评论(0条)

课程详情

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

课程标签

0人关注该课程

主题相关的课程