User Tools

Site Tools


test_doubles

This is an old revision of the document!


Sources:

  1. Software Testing course at ITMO university by Kochubeev Nikolay Sergeevich

Test doubles

Test doubles are used in unit tests to mimic the real objects the tests depend on.

There are several test doubles types:

  • dummy;
  • stub;
  • fake;
  • spy;
  • mock.

Dummy

Dummy is an object that's not actually used in the test. It is used as a placeholder, for example, when there needs a certain type of object to be passed as a parameter to initialize a method.

test_doubles.1757435813.txt.gz · Last modified: by plida