当前位置:网站首页>Unittest unit test framework
Unittest unit test framework
2022-06-29 18:57:00 【It's Joe Joe】
background
unittest Also known as PyUnit, It's a reference to Java in JUnit Frames produce .
unittest Enable us to create test cases 、 test suite 、 Test fixture capability .
form
- Test Fixture( Test fixture ): You can define the preparation work before single or multiple test execution and the cleaning work after test execution .
- Test Case( The test case ):unittest The smallest unit of test execution in .
- Test Suite( test suite ): A test suite is a collection of multiple tests or test cases , It is a set of tests created for the corresponding functions and modules of the tested program , The test cases in a test suite will be executed together .
- Test Runner( Test the actuator ): The test executor is responsible for test execution scheduling and generating test results to users .
- Test Report( Test report ): The execution of all use cases passes through the results , And a summary of the overall health status and running time .
In general ,unittest The test can be divided into three parts :
- Arrane: Preconditions for initializing tests , Contains initializing the object being tested 、 Related configurations and dependencies .
- Act: Used to perform functional operations .
- Assert: It is used to verify whether the actual results are consistent with the expected results .
边栏推荐
- 移动端测试
- 如何在树莓派上使用OAK相机?
- Shandong University project training (VII) add navigation bar to select city
- Anfulai embedded weekly report no. 271: June 20, 2022 to June 26, 2022
- JS-判断数组键名是否存在
- C Primer Plus 第12章_存储类别、链接和内存管理_代码和练习题
- RocketMQ的tag过滤和sql过滤
- Shandong University project training (VIII) design rotation map entry page
- 【日常训练】535. TinyURL 的加密与解密
- TP5 where queries whether a field in the database contains a value. Fuzzy queries are performed without the like method
猜你喜欢
Anaconda安装并配置jupyter notebook远程
第02章_MySQL的数据目录
报错[warning] Neural network inference was performed on socket ‘RGB’, depth frame is aligned to socket
[how the network is connected] Chapter 3 explores hubs, switches and routers
About microservices
Using protobuf to link MySQL in unrealeengine plug-in
JDBC knowledge
Redis(一)--Redis入门(1)--Redis介绍、安装与启动、常用配置
Anfulai embedded weekly report no. 271: June 20, 2022 to June 26, 2022
Adobe Premiere foundation - opacity (mixed mode) (XII)
随机推荐
Deep learning --- the weight of the three good students' scores (2)
第三方工具與框架集成
压测并发数的确定
Shandong University project training (VIII) design rotation map entry page
[how the network is connected] Chapter 3 explores hubs, switches and routers
Understanding of strong caching and negotiation caching
C Primer Plus 第12章_存储类别、链接和内存管理_代码和练习题
selenium的跨浏览器测试
Mac: MySQL 66 questions, 20000 words + 50 pictures!
Sd6.24 summary of intensive training
JWT login authentication
Amazing pandaverse:meta "borderless, to activate fashion attributes in the new journey of 2.0
How to use the low code platform of the Internet of things for service management?
美法官裁定,被控掩盖黑客行为的Uber前安全主管必须面对欺诈指控
Apache InLong百万亿级数据流处理
Failed to allocate graph: myriad device is not opened
2. 在STM32CubeMX建立的Keil5工程中添加自定义的相关文件
Cannot retrieve repository metadata processing records
tp5 where查询数据库中的某个字段是否包含某个值,不用like的方法,模糊查询
Us judge ruled that the former security director of Uber accused of covering up hacking must face fraud charges