|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/the-speedrun-python-unit-testing-course-unittest-mock/
课程评论:没有评论
Coursera 课程《Python 单元测试速度通关课程 (unittest, mock)》总结: 本课程教授如何使用 Python 的 unittest 框架对应用程序进行单元测试。单元测试是软件测试的第一层,旨在验证软件的最小可测试单元是否按预期执行。unittest 是 Python 中一种 xUnit 风格的测试框架。 课程将涵盖以下核心概念: * **单元测试基础**:理解不同软件单元的作用。 * **测试夹具 (Test Fixtures)**:学习如何准备和共享测试数据。 * **测试代码组织**:掌握测试代码的结构化方法。 * **测试套件 (TestSuite)**:了解如何使用 TestSuite 对测试进行分组。 * **测试跳过**:学习如何在特定情况下跳过某些测试。 * **测试集合执行**:掌握执行测试集合的方法。 * **对象和函数的 Mocking**:学习如何使用 Mock 对象来模拟依赖项的行为。 * **Mock Decorators for Objects Patching**:通过装饰器实现对象打补丁。 * **Mock Objects**:理解 Mocking 的原理,即用 Mock 对象替换原始依赖对象,以隔离被测单元,使其独立于其他单元。 本课程将通过示例深入讲解这些概念,并且所有视频的源代码均可下载。
In this course is that we're gonna learn how to test applications with python unittest framework.Unit Testing is the first level of software testing where the smallest testable parts of softwareare tested. This is used to validate that each software unit performs as designed.The unittest test framework is Python xUnit style framework. In this article, we will learn about unittest framework with the help of examples.You're gonna learn the basics concepts of applications testing such as:Individual unit of testingMake preparations and sharing test data by using test fixturesTest code organizationTest grouping using TestSuiteTest skippingExecution of test collectionsMocking of objects and functionsUsing mock decorators for objects patchingYou'll also learn how to use mock objects. Mocking Test is a technique or methodused in testing within the scope of software testing by replacing theoriginal object (dependent object) with a mock object. The mock object created can simulate the behavior of the dependent object thatis temporarily replaced. Testing in mock testing focuses on the unit being testedwithout involving or depending on other units by isolating the object to be tested.All source code for each video is available for download.