M&IB Devx - Test Driven Development

18 Questions | Total Attempts: 114

SettingsSettingsSettings
Please wait...
M&IB Devx - Test Driven Development

This is part of the DevX course assessment that will be taken by delegates before and after the programme.


Questions and Answers
  • 1. 
    Functional Testing tests the results of a use case
    • A. 

      True

    • B. 

      False

  • 2. 
    Code reviews are a type of static testing
    • A. 

      True

    • B. 

      False

  • 3. 
    Select THREE of the following which describe a good unit test
    • A. 

      Simple

    • B. 

      Fast to execute

    • C. 

      Comprehensive

    • D. 

      Quick to write

  • 4. 
    Test Driven Development dictates which one of the following?
    • A. 

      Code is written first

    • B. 

      Tests are written first

    • C. 

      Tests and code are written at the same time

    • D. 

      Write one bit of code, then test it. Write the next bit, then test it, etc.

  • 5. 
    Which of the following best defines a Mock Object?
    • A. 

      Replicates an existing object in a different system

    • B. 

      Is a place-holder object with no functionality

    • C. 

      Occurs rarely and is difficult to produce artificially

    • D. 

      Mimics the behaviour of another object in a controlled manner

  • 6. 
    When refactoring, you can change the behaviour of the code
    • A. 

      True

    • B. 

      False

  • 7. 
    It is possible to have 100% test coverage, yet still have untested interactions in your code.
    • A. 

      True

    • B. 

      False

  • 8. 
    Advantages of test driven development include which TWO of the following
    • A. 

      The ability to find regressions in a code base

    • B. 

      Quick and accurate deugging

    • C. 

      100% compliance with the requirements

    • D. 

      No bugs

  • 9. 
    Each use case will be tested by a single unit test
    • A. 

      True

    • B. 

      False

  • 10. 
    DBUnit is used for testing stored procedures
    • A. 

      True

    • B. 

      False

  • 11. 
    Unit testing removes the need for static testing
    • A. 

      True

    • B. 

      False

  • 12. 
     A depth-first testing strategy is always perferable to breadth first strategy
    • A. 

      True

    • B. 

      False

  • 13. 
    TDD is an example of which type of methodology
    • A. 

      Waterfall

    • B. 

      Iterative

    • C. 

      Static

    • D. 

      Dynamic

  • 14. 
    Unit tests need not be automated
    • A. 

      True

    • B. 

      False

  • 15. 
    Which is not a goal of test-driven development
    • A. 

      High performance code

    • B. 

      Better designed APIs

    • C. 

      More maintainable code

    • D. 

      Loosely coupled components

  • 16. 
    Failure to execute all tests successfully contitutes a failing build, even when all code compiles
    • A. 

      True

    • B. 

      False

  • 17. 
    Select each of the following that describe a good unit test
    • A. 

      Is easy to run

    • B. 

      Runs on the developer's machine

    • C. 

      Does not require complex setup

    • D. 

      It uses mocking

  • 18. 
    Which represents the steps in test-driven development?
    • A. 

      Write code, cover with a test

    • B. 

      Discover bug, cover with test, fix bug

    • C. 

      Write a test, write code, refactor

    • D. 

      Write all tests and then write all code

Related Topics
Back to Top Back to top