Preview

04 - Testing: Importance of and types

 1. Testing is essential in any project. It ensures that:

  the program works correctly

  all of these options

  the program meets the end user's and client's requirements

  the program does not have any errors

 2. A test plan is a formal document that details the tests to be performed on software when complete.
A test plan details: the scope of testing, tests to be performed, 
reason for each test, data used in each test and the expected 
outcome of each test.

  True

  False

 3. Given the following code, ____________ would involve entering two random numbers and analysing the output against the expected output.
# This program adds two numbers

num1 = 1.5
num2 = 6.3

# Add two numbers
sum = float(num1) + float(num2)

# Display the sum
print('The sum of {0} and {1} is {2}'.format(num1, num2, sum))

  beta testing

  black box testing

  white box testing

  alpha testing

 4. In black box testing, one of the advantages is that:

  the tester will know the code and also be able to input random numbers

  none of these options

  the tester will know the code intimately

  the tester does not have to know anything about the software

 5. A disadvantage of black box testing is that:

  if the code fails, the entire project will be contained in a metaphorical black box and put on hold

  if the code fails, the tester will not know why it failed

  if the code fails, it will cause additional errors (hence the name black box)

  none of these options

 6. White box testing involves looking into the details of the algorithm. One method is:

  using random input values and comparing the output against expected output

  using a white piece of paper to write down the outputs based on random inputs

  none of these options

  using a trace table

 7. Iterative testing is when a programmer writes code, tests it and returns to it if there are errors, before moving on and doing the same for the next stage.

  TRUE

  FALSE

 8. Final testing or user acceptance testing is also called the ...

  project sign-off, when the project is complete

  final requirements check, at the start of the final implementation stage

  none of these options

  final acceptance strategy, where the end user pays the bill

 9. Final testing is broken down into two stages: alpha and beta.

  True

  False

 10. Alpha testing is carried out by a group of volunteers unconnected to the development process and beta testing is carried out by the developers.

  False

  True