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

Component or Unit Testing

Lecture



Component (modular) testing verifies the functionality and looks for defects in parts of the application that are available and can be tested separately ( program modules, objects, classes, functions, etc. ). Usually component (modular) testing is performed by calling code that needs to be verified with the support of development environments such as frameworks for modular testing or debugging tools. All defects found are usually corrected in the code without their formal description in the Bug Tracking System.

One of the most effective approaches to component (unit) testing is the preparation of automated tests prior to the start of basic coding (development) of software. This is called test-driven development or a test first approach . With this approach, small pieces of code are created and integrated, opposite which tests run before the start of encoding are run. Development is carried out until all tests are successfully passed.

The difference between component and unit testing

In essence, these levels of testing represent the same thing, the only difference is that in component testing, real objects and drivers are used as parameters of functions, and specific values ​​are used in the unit testing.

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

Quality Assurance

Terms: Quality Assurance