04 - Testing: Importance of and types

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

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

  all of these options

  the program works correctly

  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.



 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))

  black box testing

  white box testing

  alpha testing

  beta testing

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

  the tester does not have to know anything about the software

  the tester will know the code intimately

  none of these options

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

 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, it will cause additional errors (hence the name black box)

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

  none of these options

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

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

  using a trace table

  using random input values and comparing the output against expected output

  none of these options

 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.



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

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

  final acceptance strategy, where the end user pays the bill

  project sign-off, when the project is complete

  none of these options

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



 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.