IT Glossary
What are unit tests?
Small, fast checks that verify each building block of the code in isolation: one function, one calculation, one business rule.
Serious car manufacturers do not test the brakes for the first time on the track; every part is checked separately on a bench before assembly. Unit tests apply that principle in code: each small piece — the function calculating VAT, the rule validating an identifier, the discount formula — gets its own automatic checks, which run in seconds at every modification. A developer who changes something learns immediately whether a calculation broke, rather than hearing about it a fortnight later from an angry customer. For the company buying the software, the presence of unit tests is a quality indicator you can require in writing: a project delivered without them will be expensive to modify, because every future change becomes a gamble played with your product. They form the base of the testing pyramid — many of them, cheap to write today, disproportionately valuable at every change tomorrow. They also happen to be the most honest documentation a codebase carries, because a test states in plain terms how a piece of logic is supposed to behave, and unlike a written specification it cannot quietly drift out of date without the build going red and somebody noticing.
Let’s talk about your project
Message us on WhatsApp or send an email — you talk directly to a developer.
office@northdan.com · +40 752 070 247
Why it matters for your business
Calculation errors caught in seconds
Business rules covering prices, taxes and discounts are verified automatically at every code change, so a VAT mistake surfaces before release rather than inside customer invoices.
Cheaper changes in future
Code covered by tests can be changed quickly and without fear, which over years separates applications that keep evolving from the ones nobody wants to touch.
Living documentation for new people
Each test states plainly how a piece of code should behave, so an incoming team learns the project by reading tests instead of doing archaeology through undocumented code.
Frequently asked questions
What unit test coverage counts as good?
As a guide, seventy to eighty per cent on business logic is a healthy target; a hundred is rarely economic, because the last percentages cover trivial code. More important than the global figure is where the coverage sits: the areas involving money — calculations, validations, rules — should be covered nearly completely, and a report showing the opposite balance deserves a question.
Do unit tests make a project more expensive?
Writing them typically adds fifteen to thirty per cent to the initial effort and recovers the difference within the first months: fewer defects released, shorter debugging, changes made without fear. The real cost is paid in the version without tests — only later, and with interest, usually at the moment the business needs a change quickly and cannot risk one.
If we have unit tests, do we still need other kinds of testing?
Yes. Unit tests verify the pieces in isolation but say nothing about how they behave assembled, which is what integration tests and end-to-end tests exist for, walking complete journeys through the application. The healthy pyramid has many fast unit tests at the base and progressively fewer, slower tests towards the top.
Let’s talk about your project
Message us on WhatsApp or send an email — you talk directly to a developer.
office@northdan.com · +40 752 070 247