测试套件,测试用例和测试类别之间的区别 [英] Difference between test suite, test case and test category

查看:243
本文介绍了测试套件,测试用例和测试类别之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

测试套件,测试用例和测试类别之间有什么区别? 我在此处

What is the difference between test suite, test case and test category. I found a partial answer here

那类别呢?

推荐答案

测试用例是一个为测试特定执行路径而开发的一组测试输入,执行条件和预期结果.通常,这种情况是单一方法.

Test case is a set of test inputs, execution conditions, and expected results developed to test a particular execution path. Usually, the case is a single method.

测试套件是相关测试用例的列表. Suite可能包含特定于所包含情况的通用初始化和清除例程.

Test suite is a list of related test cases. Suite may contain common initialization and cleanup routines specific to the cases included.

测试类别/组是一种标记单个测试用例并将其分配给类别的方法.使用类别,您无需维护测试用例列表.

Test category/group is a way to tag individual test cases and assign them to categories. With categories, you don't need to maintain a list of test cases.

测试框架通常提供一种指定要从给定测试运行中包括或排除的类别的方法.这使您可以标记不同测试套件中的相关测试用例.当您需要禁用/启用具有公共依赖性(API,库,系统等)或属性(慢速,快速案例)的案例时,此功能很有用.

Testing framework usually provides a way to specify which categories to include or exclude from a given test run. This allows you to mark related test cases across different test suites. This is useful when you need to disable/enable cases that have common dependencies (API, library, system, etc.) or attributes (slow, fast cases).

据我了解,测试组和测试类别是在不同框架中使用的同一概念的不同名称:

As far as I can understand, test group and test category are different names for the same concept used in different frameworks:

  • @Category in JUnit
  • @group annotation in PHPUnit
  • TestCategory in MSTest

这篇关于测试套件,测试用例和测试类别之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆