Software Testing: Black Box, White Box, and More

Criteria for Choosing Black Box Data

Values should include easy, typical, realistic, extreme, and illegal values.

Techniques Using Black Box Testing

  • Boundary value analysis
  • Equivalence partitioning

White Box Testing of Warrant

  • Run at least once all the paths of each module.
  • Use decisions at their true and false values.
  • Run all loops.
  • Use internal data structures.

Flow Graph

Represents the program flow control and is used to more easily trace the paths.

Cyclomatic Complexity

Represents the number of independent paths of the basic set of a program.

Evidence of Coverage

  • Run at least once every sentence; this takes several test cases.
  • Identify possible independent paths.
  • Each condition must be met in one case and not in another.
  • It is impossible to cover 100%.
  • Impossible conditions exist where code is never executed.

Simple Conditions

A simple condition is a logical variable or a relational expression.

Compound Condition

A compound condition is formed by two or more simple conditions, logical operators, and parentheses.

Types of Loops

  • Simple
  • Concatenated
  • Nested
  • Unstructured

Systematic Test Phase

There are two types:

  • Black box: Tests the functionality of the module without considering its content.
  • White box: Looks very closely at the structure of the written code.

Documentation

Documentation preserves history, facilitates use by the user, and reduces operating costs and project implementation.

Characteristics of Documentation

Documentation must include the test plan, test cases, metrics, statistics, summaries, bug reports, test tools, and automation.

Test Plan

Describes the methods used to verify that the software meets customer requirements and product specifications.

Historical Evidence

Documents all significant events that occurred during the execution of tests.

Incident Report

Documents each incident in the test.

Acceptance Tests

Acceptance tests are intended to validate that the system meets the basic requirements for expected performance and allow the user to determine the acceptance of the system.

How to Get System Validation

System validation is achieved through black box testing.

How Acceptance Testing Works

It works against the input data. The results are compared with the expected results. If it passes, the test is correct; otherwise, the system can accept or reject the terms obtained by the user.

Main Purpose of Acceptance Testing

The main purpose of acceptance testing is that once the test is successful, the system user will be satisfied with the outcome.

Debugging

Debugging is the process of resolving a program error.

Steps in Debugging a Program

Phase 1: The program is almost completed and submitted for laboratory testing to verify that everything goes without error. This is undertaken by the developer prior to publicizing the product.

Phase 2: When the developer believes that their program is ready, they proceed to distribute the product to a series of selected testers, called beta testers.

Phase 3: With the information, opinions, and suggestions, the first public version, also called the gamma version, will be launched.

Steps in Debugging a Software Error

  1. Recognize that there is an error.
  2. Isolate the source of the error.
  3. Identify the cause of the error.
  4. Determine a fix for the bug.
  5. Implement and test the software solution.

Validation

Validation checks that what is specified is what the user really wanted.

Limitations of Black Box Testing

Black box testing does not check if the program also does things that it should not. It is not enough to just use black box testing.

Limitations of White Box Testing

White box testing may show that the program does what it is supposed to do well, but it does not check if it does what we wanted it to do. We need to test the functionality with black box testing.

Integral Test

Integral testing refers to the test or tests of all the elements that make up a unit, performed together at one time.

Types of Integration

  • Downstream integration: Performed from the larger modules to the smaller ones.
  • Upward integration: Performed from the smaller modules to the larger ones.

What Integration Depends On

Integration depends on the software features and, sometimes, the project plan.