Engineering

Bench first: how we test code before it touches equipment

Code that runs a megawatt-scale battery cannot be tested on a client. A bug here doesn’t mean a red test; it means a stopped production line or damaged equipment. Here is how our simulators, test benches and evidence packs work.

Published
November 18, 2026
Reading time
2 min

The simulator is our first client

Every new adapter, policy or type of command first runs against a simulator: a battery, an inverter, a meter, a charger. A good simulator isn’t perfect. It has current limits and delays, it sometimes loses the link and sometimes answers with an error, just like real equipment.

The main thing is that it does so the same way every time. If a test failed today, it will fail tomorrow with the same inputs. So a bug can be reproduced, found and fixed, rather than waiting for it to show up again on site at three in the morning.

Steps you can’t skip

We split the road from code to control into stages. First we check the data contracts: are the units, signs and formats right. Then the behavior on a simulator. Then a bench with a real device. Then a site in read-only mode. And only after that, control.

Each stage has a pass condition written down in advance. You can’t move on without meeting it, however much you want to and however long the client has been waiting. More than once we have seen an “almost ready” project turn out not to be ready at exactly the stage someone wanted to skip.

The evidence pack

Each stage leaves an evidence pack behind. It holds the exact software versions, the device profile, the logs of every check and hashes of every file. A year later you can open the pack and say exactly what was tested, on what and with what result.

A pack is always labeled for what it is. If the check ran on a simulator, it says so in capital letters. We never pass it off as a device certificate. A simulator proves the logic is right. Only a real device proves a real device behaves the same way.

A bench for other people’s equipment

Over time we realised our bench was not only useful to us. Equipment makers and integrators asked whether they could connect their device, run it through the same profiles and get a report they could show a client without embarrassment.

That is how Wesfin Lab came about. It is a bench and simulator where a device or a piece of software can be tested before it goes to a site. Lab runs in production, and we set up the test profiles for the specific equipment and the client’s jobs.

Why this is cheaper than it looks

Benches and simulators look like extra cost until you count what one engineer’s trip to a site two hundred miles away costs, just to find out an adapter had a sign the wrong way round. And then what the client’s trust costs after a trip like that.

We would rather find the bug on the bench on Monday than on site on Friday evening.