单元测试 AIR 和 FIRST 原则
所属分类 architecture
浏览量 1002
AIR FIRST
AIR原则
A-Automatic(自动化原则)
自动运行,自动校验,自动给出结果
I-Independent(独立原则)
独立运行,互相之间无依赖,对外部资源无依赖,多次运行之间无依赖
R-Repeatable(可重复原则)
可重复运行,每次的结果都稳定可靠
FIRST原则
F-FAST(快速原则)
可快速运行
I-Independent(独立原则)
可独立运行,单元测试用例互相无强依赖,无对外部资源的强依赖
R-Repeatable(可重复原则)
可稳定重复运行,并且每次运行的结果都是相同的
S-Self Validating(自我验证原则)
用例自动验证,不依赖人工验证
T-Timely(及时原则)
及时的编写,更新和维护,保证用例可以随着业务代码的变化动态的保障质量
Fast
Tests are fast, so fast that developers run them with every small change without waits that break the flow.
Isolated
Tests are isolated.
One test does not set up the next test.
Tests also isolate failures.
Repeatable
Tests are repeatable; repeatable means automated.
Tests run in a loop always giving the same result.
Self-verifying
Tests verify their outcome, reporting a simple “OK” when they pass while providing concise details when they fail.
Timely
Tests are timely.
Programmers write them just in time, in lock-step (but just before) the production code, preventing bugs.
上一篇
下一篇
Java8 Stream过滤null值
string format几种方式
字符串格式化性能对比
SimpleDateFormat并发问题实例演示
云服务器jdk8安装
轻量应用服务器和云服务器的区别