Unittest Framework 简明教程

UnitTest Framework Tutorial

单元测试框架是一种测试方法,源代码中的各个单元,例如函数、方法和类,会通过该框架进行测试,以确定它们是否适合使用。本教程简明扼要地解释了单元测试框架的功能。

UnitTest Framework is a testing methodology by which individual units of source code, such as functions, methods, and class are tested to determine whether they are fit for use. This is a brief tutorial that explains the functionality of UnitTest Framework.

Audience

本教程为初学者准备,以帮助他们了解 UnitTest Framework 框架的基本功能。完成本教程后,你会发现自己在 UnitTest Framework 框架的使用中处于中等水平,可以从中学到更多。

This tutorial has been prepared for beginners to help them understand the basic functionality of UnitTest Framework framework. After completing this tutorial, you will find yourself at a moderate level of expertise in using UnitTest Framework framework from where you can take yourself to the next levels.

Prerequisites

为了从本教程中受益,建议对 Python 和测试技术的理解有所了解。

To draw benefits from this tutorial, it is recommended to have prior knowledge of Python and also a basic understanding of testing techniques.