📜  软件测试|黑匣子测试

📅  最后修改于: 2021-01-08 08:38:54             🧑  作者: Mango

黑匣子测试

黑匣子测试是一种软件测试技术,它可以检查软件的功能而无需查看其内部结构或编码。黑匣子测试的主要来源是客户说明的要求规范。

在这种方法中,测试人员选择一个函数并提供输入值以检查其功能,然后检查该函数是否提供了预期的输出。如果函数产生正确的输出,则将其通过测试,否则将失败。测试团队将结果报告给开发团队,然后测试下一个函数。在完成所有功能的测试后,如果存在严重问题,则将其返回给开发团队进行更正。

黑匣子测试的一般步骤

  • 黑匣子测试基于要求的规范,因此在开始时进行检查。
  • 在第二步中,测试人员通过选择有效和无效的输入值来检查软件是否正确或不正确地处理它们,从而创建肯定测试方案和不利测试方案。
  • 第三步,测试人员开发各种测试用例,例如决策表,所有对测试,等效划分,错误估计,因果图等。
  • 第四阶段包括所有测试用例的执行。
  • 在第五步中,测试人员将预期输出与实际输出进行比较。
  • 在第六步(也是最后一步)中,如果软件中存在任何缺陷,则将其修复并再次进行测试。

测试程序

黑匣子测试的测试过程是一种过程,在该过程中,测试人员对软件的工作有特定的了解,并且开发了测试用例以检查软件功能的准确性。

它不需要软件的编程知识。所有测试用例都是通过考虑特定函数的输入和输出来设计的。测试人员知道特定输入的确定输出,但不知道结果如何产生。黑匣子测试中使用了各种技术来进行测试,例如决策表技术,边界值分析技术,状态转换,全对测试,因果图技术,等效划分技术,错误猜测技术,用例技术和用户案例技术。所有这些技术已在本教程中详细说明。

测试用例

在考虑需求规范的情况下创建测试用例。这些测试用例通常是根据软件的工作描述(包括需求,设计参数和其他规范)创建的。对于测试,测试设计人员通过选择有效的输入值来选择肯定的测试方案,通过选择无效的输入值来选择不利的测试方案,以确定正确的输出。测试用例主要用于功能测试,但也可以用于非功能测试。测试用例是由测试团队设计的,软件开发团队没有任何参与。

黑匣子测试中使用的技术

Decision Table Technique Decision Table Technique is a systematic approach where various input combinations and their respective system behavior are captured in a tabular form. It is appropriate for the functions that have a logical relationship between two and more than two inputs.
Boundary Value Technique Boundary Value Technique is used to test boundary values, boundary values are those that contain the upper and lower limit of a variable. It tests, while entering boundary value whether the software is producing correct output or not.
State Transition Technique State Transition Technique is used to capture the behavior of the software application when different input values are given to the same function. This applies to those types of applications that provide the specific number of attempts to access the application.
All-pair Testing Technique All-pair testing Technique is used to test all the possible discrete combinations of values. This combinational method is used for testing the application that uses checkbox input, radio button input, list box, text box, etc.
Cause-Effect Technique Cause-Effect Technique underlines the relationship between a given result and all the factors affecting the result.It is based on a collection of requirements.
Equivalence Partitioning Technique Equivalence partitioning is a technique of software testing in which input data divided into partitions of valid and invalid values, and it is mandatory that all partitions must exhibit the same behavior.
Error Guessing Technique Error guessing is a technique in which there is no specific method for identifying the error. It is based on the experience of the test analyst, where the tester uses the experience to guess the problematic areas of the software.
Use Case Technique Use case Technique used to identify the test cases from the beginning to the end of the system as per the usage of the system. By using this technique, the test team creates a test scenario that can exercise the entire software based on the functionality of each function from start to end.