You get a bonus - 1 coin for daily activity. Now you have 1 coin

Component (Unit) Testing

Lecture



Module testing (unit testing): see component testing
Component testing: testing of individual software components (according to IEEE 610)
Component: The smallest element of software that can be tested separately.

Unit tests are checks of individual classes in our application, and this is a white-box technique. Since classes also fall under the definition of «a constituent part, an element of something», we can say that unit testing is a type of component testing, most often performed (or, more precisely, most often NOT performed) by developers.

Component (module) testing checks functionality and looks for defects in parts of the application that are accessible and can be tested separately (program modules, objects, classes, functions, etc.). Component (module) testing is usually performed by invoking the code under test, with the support of development environments such as frameworks for module testing or debugging tools. Defects found are typically fixed directly in the code without being formally logged in a bug management system (Bug Tracking System). In doing so, code is written with functions (methods) that are as clean as possible, so that tests are isolated from the environment (DB, network, file system, time).

One of the most effective approaches to component (module) testing is preparing automated tests before the main coding (development) of the software begins. This is called test-driven development or the test first approach. In this approach, small pieces of code are created and integrated, against which tests written before coding began are run. Development continues until all tests pass successfully.

Difference between component and module testing

Essentially these testing levels represent the same thing; the only difference is that component testing uses real objects and drivers as function parameters, while module testing uses specific values.

Types of testing

Component (Unit) Testing

See also

  • [[b5691]]
  • [[b5192]]
  • [[b5191]]
  • [[b5187]]
  • [[b8214]]
  • [[b7769]]

See also

created: 2016-04-02
updated: 2026-03-10
414



Was this answer useful?
Choose a quick rating so we can improve the next answer for you.
How satisfied are you?


avatar
5.5.2020 11:34

в некоторых языках есть встроенные функция для мокинга даты и времени , например у карбона уже есть глобальные функции, удобная для этого-
Carbon::setTestNow () / Carbon::hasTestNow() , которая глобально Любое время для Now сделает

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Quality Assurance"

Terms: Quality Assurance