User Tools

Site Tools


unit_test

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
unit_test [2025/09/09 19:09] plidaunit_test [2025/09/10 07:04] (current) plida
Line 1: Line 1:
 Source: Software Testing course at ITMO university by Kochubeev Nikolay Sergeevich Source: Software Testing course at ITMO university by Kochubeev Nikolay Sergeevich
 +
 ====== Unit tests ====== ====== Unit tests ======
  
-Unit tests check individual units of software (be it functions, methods or classes) in isolation from the rest of the system. The goal is to ensure that every module works as intended.+Unit tests check individual units of software (be it functions, methods or classes) in isolation from the rest of the system. The goal is to ensure that every module works as intended. They're usually placed in a separate from the source code directory.  
 + 
 +==== Concepts ====
  
 [[test_doubles|Test doubles]] are used to ensure Unit tests are truly isolated. [[test_doubles|Test doubles]] are used to ensure Unit tests are truly isolated.
  
 [[testing_factory|Factories]], [[testing_builders|builders]] and [[random-based_tests|random-based tests]] are used to generate test data. [[testing_factory|Factories]], [[testing_builders|builders]] and [[random-based_tests|random-based tests]] are used to generate test data.
 +
 +[[property-based_testing|Property-based testing]] is an approach to testing in which we test the properties of a function rather than individual examples.
 +
 +[[data-driven_testing|Data-driven testing]] is an approach in which one test function is executed multiple times with different sets of input data.
 +
 +[[fixture|Fixture]] is a defined and reliable context for the tests.
  
 ==== Benefits ====== ==== Benefits ======
unit_test.1757444979.txt.gz · Last modified: by plida