GoConqr has a new look! Let us know what you think.

Mind map

Unit Tests

Herber Madrigal English

Map content

Unit Tests

  • When doing  tests, you're focusing on one element of the software at a time -hence the common term unit testing-
  1. Solitary Tests

    • A solitary test does not care on other components of the app, they only care about the tested component. They uses test double objects to replace collaborators.
    • Verifies behavior
      • By setting expectations (expected method calls)
      • by recording and replaying (expected methods and parameters calls)
        • Two objects (elements) are  involved:  - Control Object: Replay Expectations, Validates, and more options. - Mock Object: Conforms the protocol (contract) required by the SUT. Sets Expectations
    • Verifies State
    • Test Doubles
      • Test doubles are collaborators which are needed in the unit test, but they're not going to be tested.
      • Dummy
        • An object only used for parameters
      • Fake
        • An implemented object which it is NOT suitable for production
      • Mock
        • Pre-Programmed object with expectations about its methods calls.
      • Stub
        • An object which normally only answers of the tests
  2. Sociable Tests

    • Called sociable tests because they uses other components of the app to perform the tests
    • Verifies State
  3. are Made of

    • Elements
      • System-Under-Test (SUT) or Object-Under-Test (OUT)
        • Object with the functionality to be tested
      • Collaborators
        • Object in the tests which are not being tested, but they're required by the test or by the SUT
    • Sections
      • setup (data/expectations)
      • exercise
      • Verification
      • Clean up
  4. Considerations

    • Driving TDD
    • Fixture Setup
    • Test Isolation
    • Coupling Tests to Implementations
    • Design Style

Information

Description
Mind Map on Unit Tests, created by Herber Madrigal on 01/10/2015.
Created by
Herber Madrigal
Views
1
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?