Software Testing Foundation Course

12 Questions | Attempts: 490
Share

SettingsSettingsSettings
Software Testing Quizzes & Trivia

Testing


Questions and Answers
  • 1. 
     Given the following code, which is true: IF A > B THEN C = A – B ELSE C = A + B ENDIF Read D IF C = D Then Print “Error” ENDIF
    • A. 

      1 test for statement coverage, 3 for branch coverage

    • B. 

      2 tests for statement coverage, 2 for branch coverage

    • C. 

      2 tests for statement coverage. 3 for branch coverage

    • D. 

      3 tests for statement coverage, 3 for branch coverage

    • E. 

      3 tests for statement coverage, 2 for branch coverage

  • 2. 
    You have designed test cases to provide 100% statement and 100% decision coverage for the following fragment of code. if width > length then biggest_dimension = width else biggest_dimension = length end_if The following has been added to the bottom of the code fragment above. print "Biggest dimension is " & biggest_dimension print "Width: " & width print "Length: " & length How many more test cases are required?
    • A. 

      One more test case will be required for 100 % decision coverage.

    • B. 

      Two more test cases will be required for 100 % statement coverage, one of which will be used to provide 100% decision coverage.

    • C. 

      None, existing test cases can be used.

    • D. 

      One more test case will be required for 100" statement coverage.

  • 3. 
    What is the MAIN benefit of designing tests early in the life cycle?
    • A. 

      It is cheaper than designing tests during the test phases.

    • B. 

      It helps prevent defects from being introduced into the code.

    • C. 

      Tests designed early are more effective than tests designed later.

    • D. 

      It saves time during the testing phases when testers are busy.

  • 4. 
    What is the KEY difference between preventative and reactive approaches to testing?
    • A. 

      Preventative tests and reactive tests are designed as early as possible.

    • B. 

      Preventative tests are designed early; reactive tests are designed after the software has been produced.

    • C. 

      Preventative testing is always analytical; reactive testing is always heuristic.

    • D. 

      Preventative tests are designed after the software has been produced; reactive tests are designed early in response to review comments.

  • 5. 
    Given the following fragment of code, how many tests are required for 100% decision coverage? if width > length then biggest_dimension = width if height > width then biggest_dimension = height end_if else biggest_dimension = length if height > length then biggest_dimension = height end_if end_if
    • A. 

      3

    • B. 

      4

    • C. 

      2

    • D. 

      1

  • 6. 
    A thermometer measures temperature in whole degrees only. If the temperature falls below 18 degrees, the heating is switched off. It is switched on again when the temperature reaches 21 degrees. What are the best values in degrees to cover all equivalence partitions?
    • A. 

      15, 19 and 25.

    • B. 

      17, 18 and19.

    • C. 

      18, 20 and22.

    • D. 

      16, 26 and 32.

  • 7. 
    With which of the following categories is a test comparator tool USUALLY associated?
    • A. 

      Tool support for performance and monitoring.

    • B. 

      Tool support for static testing.

    • C. 

      Tool support for test execution and logging.

    • D. 

      Tool support for the management of testing and tests.

  • 8. 
    Which of the following is a purpose of the review planning phase?
    • A. 

      Log defects.

    • B. 

      Explain the documents to the participants.

    • C. 

      Gather metrics.

    • D. 

      Allocate the individual roles.

  • 9. 
    Which is the best definition of complete testing:
    • A. 

      You have discovered every bug in the program.

    • B. 

      You have tested every statement, branch, and combination of branches in the program.

    • C. 

      You have completed every test in the test plan.

    • D. 

      You have reached the scheduled ship date.

  • 10. 
    Complete statement and branch coverage means:
    • A. 

      A. That you have tested every statement in the program.

    • B. 

      B. That you have tested every statement and every branch in the program.

    • C. 

      C. That you have tested every IF statement in the program.

    • D. 

      D. That you have tested every combination of values of IF statements in the program

  • 11. 
    Reviews, static analysis and dynamic testing have the same objective
    • A. 

      Identifying defects.

    • B. 

      Fixing defects.

    • C. 

      A and B

    • D. 

      None of the above

  • 12. 
    Contract and regulation testing is a part of
    • A. 

      System testing

    • B. 

      Acceptance testing

    • C. 

      Integration testing

    • D. 

      Smoke testing

Related Topics

Back to Top Back to top
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.