Software Development and Project Management

Which describes black-box testing?

  1. AWithout looking at the internal structure of the program, inputs and expected outputs are determined from the specification to check that it works correctly
  2. BTest cases are created based on the internal structure of the program, using whether statements and branches have been executed as the criterion
  3. CUsers finally confirm, in their actual business environment, that the system can be used as required
Show answer and explanation

Answer: A. Without looking at the internal structure of the program, inputs and expected outputs are determined from the specification to check that it works correctly

Black-box testing treats the test object as a box whose contents cannot be seen and creates test cases from the specification alone; its techniques include equivalence partitioning, boundary value analysis, cause-effect graphs and decision tables. It is good at finding functions that are in the specification but not implemented, but it cannot tell whether a particular path in the implementation has been exercised. Creating tests based on internal structure and using coverage as the criterion is white-box testing. The final confirmation by users is acceptance testing, which is the name of a test level.

  • A. Correct. Test cases are created from the specification alone and checked through inputs and outputs.
  • B. This describes white-box testing.
  • C. This describes acceptance testing, which is a test level rather than a way of designing test cases.
Practice this topic Back to topic

Related calculators

Books on Software Development and Project Management Ad

As an Amazon Associate I earn from qualifying purchases.

More Software Development and Project Management questions

  1. An input field accepts only integers; values from 1 to 100 inclusive are accepted and all others cause an error. When the input is divided by equivalence partitioning, how many equivalence classes are there in total (valid and invalid classes combined)?
  2. A program sets the admission fee by age (an integer of 0 or more): ages 0 to 17 pay the child fee, 18 to 64 the adult fee, and 65 or older the senior fee. Which set of test values is most appropriate for boundary value analysis to check the boundaries where the fee category changes?
  3. The specification says 'issue a warning if the temperature is 85 °C or higher', but the firmware mistakenly contains 'if (t > 85)'. The temperature t is an integer. Which of the following test values can detect this error?
  4. The values of temp and err can be chosen independently of each other. For the code 'if (temp > 80) { fan = HIGH; } else { fan = LOW; } if (err) { log(); }', what is the minimum number of test cases needed to achieve statement coverage (executing every statement at least once)?
  5. The truth values of a, b and c can be chosen independently of each other. For the code 'if (a) { S1; } if (b) { S2; } if (c) { S3; }', what is the minimum number of test cases needed to achieve branch coverage (executing both the true and false outcomes of every decision at least once)?