3 ms·
"The smallest amount of testable code. Often a single method/function," I hate (HAAAAATE) that definition of unit test. That's how some IDEs implemented unit
by JoeNr76 6y ago
"The smallest amount of testable code. Often a single method/function,"
I hate (HAAAAATE) that definition of unit test. That's how some IDEs implemented unit tests, but it's not what was originally meant with the term 'unit'
The unit tests the author means has no value outside testing while you are programming the code. For real value, unit tests shouldn't be bound to the implementation of your code.
Unit tests should test a "unit of functionality", not a technical part of the code.
- nerdponx 6y agoThat's why they said "often". A better definition might be "the smallest amount of testable functionality".
- WolfOliver 6y agoactually the origin of the term unit test means a test can be executed as a unit, it does not has dependencies to other tests. It had nothing to do with testing code in isolation.