Put tests around code that has none

The code works, nobody can prove it, and every change is a small act of faith. First what it does today is written down as tests; then it changes with confidence.

A drawing: on the left, a dashed box marked changed on hope, every change a gamble. An arrow leads to two steps: first, what it does today, written down as tests; then, change calmly, because if a change breaks what the code did, a test says so. Under both runs one band: confidence before change.
  • The code works, nobody can prove it, and every change is a small act of faith.
  • First what it does today is written down as tests in your own repository.
  • Then it changes with confidence instead of hope.

The code works, as far as anyone knows, and nothing proves it. Every change is a small act of faith, and every release is a held breath. First what it does today is written down as tests; then it changes with confidence.

What changes for you

You stop changing code on hope. Before anyone touches the parts your business depends on, what those parts do today is written down as tests, so a change that breaks something meets a test before it meets a customer.

Many products reach this point without anyone choosing it. The first version had to ship, and tests were for later. Later never came, because there was always a feature waiting. Now the codebase is large, the people who knew its edges have moved on to other work, and each change is reviewed by people who can only guess what it might disturb. Releases slow down, not because the team is slow, but because nobody can say with certainty that the last change was safe.

Carried for you, the tests arrive around the code you have, as it is. They describe its behaviour today, including the odd rules nobody remembers agreeing to, so the next change starts from something known rather than something assumed. Confidence comes before the change, not after the release.

The work lands in your own code repository. The code we build for you is yours.

What you decide

You decide where confidence matters most. The billing rules, the import nobody dares rerun, the part the next feature has to pass through: you name the areas, and they are covered first.

You decide what counts as correct. When a test exposes behaviour that looks wrong, it is not quietly fixed or quietly kept. It comes to you, and you say whether it is a bug or a rule your customers rely on.

You decide what ships. Nothing reaches your users without your approval.

What you see along the way

You see the tests themselves, arriving in small pieces with a plain note on which part of the product each piece covers and what it now protects. Your engineers can read them, run them and argue with them.

You also see the questions that only your business can answer. Should an order with no lines be accepted? Is that rounding on purpose? Each one comes with the context needed to answer it, and your answer becomes part of what the tests hold.

Over time you see the change that matters: requests that used to be answered with “better not touch that” start being answered with a date.

What it costs you in time

A little of your product people’s time, for the questions about intended behaviour. Your engineers keep building features while the safety net grows under them, and they gain a place to check their own changes against.

What if you want to stop

Every test already approved stays in your repository and keeps working for your team. Your code and your product stay yours to take anywhere.

A good first piece is the one area your team is most reluctant to change. Put tests around it, read what they say, and decide what comes next. It starts with a conversation, with no obligation.

Start with one small first piece and judge the result yourself.

Questions leaders ask

Will the tests change how our product behaves?

No. The first tests record what the code does today, odd corners included, and leave the behaviour as it is. If one of them shows something that looks like a flaw, it comes to you as a question, and you decide whether it is a bug to fix later or a rule the business depends on.

Our code was never written with tests in mind. Does that rule this out?

It is the usual case, not the exception. Code that was never meant to be tested is exactly the code that most needs it, and the first tests start where it is, as it is, without asking your team to rewrite anything first.

Which parts get tests first?

The parts you are most afraid to change, or the ones the next feature has to touch. You set the order, and a quiet corner nobody plans to change can wait as long as you like.

Can our own engineers keep the tests going afterwards?

Yes. The tests are ordinary code in your repository, readable by your team and runnable by them. New work can add to them in the same style, and they stay with you whatever you decide about us.

Lift your eyes and let us carry the rest.

Talk to us and see what carrying your product forward looks like.

Book a conversation

Prefer to write directly? contact@zefana.com