版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/seagal890/article/details/85527974
Sanity Testing 和 Smoke Testing的区别
Sanity testing 和Smoke Testing是两个非常容易混淆的测试类型。
Smoke Testing(冒烟测试)
Smoke Testing(冒烟测试)是在软件构建(build)后进行的一种测试,用来确定程序的关键功能是否正常工作。在软件构建上执行任何详细的功能或回归测试之前执行。目的是拒绝一个严重损坏的应用程序,这样测试团队就不会浪费时间安装和测试软件应用程序。
在冒烟测试中,测试用例选择覆盖系统最重要的功能或组件。其目的不是执行详尽的测试,而是验证系统的关键功能是否正常工作。例如,典型的Smoke Testing(冒烟测试)是验证应用程序是否成功启动,检查GUI是否响应…等。
Sanity Testing
Sanity Testing 是在接收到软件构建(Build)后进行的一种测试,在代码或功能上做了细微的更改,以确定缺陷已被修复,并且不会因这些更改而引入进一步的问题。目标是确定所建议的功能大致如预期的那样工作。如果Sanity Testing失败,那么构建(Build)将被拒绝,以节省进行更严格测试所需的时间和成本。
这两者咋一看,看起来都差不多。其实,两者之间还是有很多的不同,首先测试的目的就不同。一些关键的区别参照下面的表格:
Smoke Testing | Sanity Testing |
The objective of this testing is to verify the "stability" of the system in order to proceed with more rigorous testing | The objective of the testing is to verify the "rationality" of the system in order to proceed with more rigorous testing |
Smoke Testing is performed to ascertain that the critical functionalities of the program is working fine | Sanity Testing is done to check the new functionality/bugs have been fixed |
This testing is performed by the developers or testers | Sanity testing is usually performed by testers |
Smoke testing is usually documented or scripted | Sanity testing is usually not documented and is unscripted |
Smoke testing is a subset of Acceptance testing | Sanity testing is a subset of Regression Testing |
Smoke testing exercises the entire system from end to end | Sanity testing exercises only the particular component of the entire system |
Smoke testing is like General Health Check Up | Sanity Testing is like specialized health check up |
- Sanity Testing和Smoke Testing都是避免浪费时间和精力的方法,可以快速确定应用程序是否有缺陷,不值得进行任何严格的测试。
- Sanity testing 也称为测试人员验收测试。
- 对特定构建(Build)执行的Smoke testing也称为Build验证测试。
- 最佳的实践之一是在软件项目中进行每日构建(daily build)和 Smoke testing。
- Sanity Testing和Smoke Testing可以手动执行,也可以使用自动化工具。当使用自动化工具时,测试通常由生成构建本身的同一进程启动。
- 根据测试的需要,您可能需要在软件构建中执行Sanity Testing和Smoke Testing。在这种情况下,您将首先执行Smoke Testing,然后继续进行Sanity Testing。在工业中,为了加快测试的执行,通常将Sanity Testing的测试用例与Smoke Testing的测试用例结合起来。因此,这些术语经常混淆,可以互换使用,这是很常见的。