Testing and Code Review

Testing Hardware Prototypes Methodically

How to plan bench tests for a physical prototype, state what you expect, record results carefully and change one variable at a time to learn what matters.

On this page
  1. Why method matters
  2. Safety first
  3. Plan the tests
  4. Start simple and work up
  5. Change one variable at a time
  6. Record everything useful
  7. Make results trustworthy
  8. When something fails
  9. Close the loop

Why method matters

A first prototype rarely works perfectly, and the bench is where you find out how it differs from the design. Without a method, testing becomes a series of poking, adjusting and hoping. Several things get changed at once, the board starts working, and nobody knows why. Or it gets worse and nobody knows why either.

A methodical approach does not need to be elaborate. It means deciding in advance what you are testing, writing down what you expect, measuring carefully, recording what you saw and changing one thing at a time. The same thinking underlies good software testing, applied to physical objects.

Safety first

Before anything else, consider safety. Prototypes can involve mains voltage, stored energy in capacitors or batteries, heat, moving parts, high currents or chemicals. Know the hazards of what you are testing, use appropriate protective measures and follow the rules of your workplace, laboratory or country. For anything beyond low-voltage work you are trained for, involve someone qualified. General information here does not replace a qualified engineer’s judgment or your organisation’s safety procedures, and a basic grounding in hazard identification is worth having before you start.

Plan the tests

Start from the requirements. What must the prototype do, and how would you know? For each requirement, define a test:

  • What is being checked. One property at a time, such as “output voltage under load” or “response time after a button press”.
  • Conditions. Supply voltage, temperature, load, orientation, and anything else that could change the result.
  • Method and equipment. Which instrument, which probe point, which settings.
  • Expected result. A number or range, with a tolerance, taken from the design or datasheets.
  • Pass or fail rule. Decide before measuring what counts as acceptable.

Writing the expected result first has a practical benefit: it stops you from rationalising whatever you happen to measure. If a datasheet gives typical and worst-case values, use the worst-case figures for pass criteria, because a prototype that only meets the typical value may fail on other samples. The difference between those is covered under typical versus worst-case values.

A short test plan with a numbered list of tests is enough for a small project. For a larger one, tracing each test back to a requirement shows which requirements have not yet been checked.

Start simple and work up

A sensible order moves from the least to the most risky:

  1. Visual inspection. Look for solder bridges, missing or reversed parts, damaged traces and mechanical interference before applying power.
  2. Passive checks. With power off, check for shorts between supply rails and ground using a multimeter, and verify key connections.
  3. Power-up with limits. Use a current-limited supply, set a conservative limit, and watch the current draw as power is applied. Unexpectedly high current is an early warning.
  4. Supply rails. Verify that each supply voltage is correct and stable before testing anything that depends on it.
  5. Individual blocks. Check each section on its own: clocks, sensors, drivers, communication interfaces.
  6. Integration. Test blocks together, then the whole assembly, then under realistic load and environmental conditions. The same progression of testing combined components applies as in software.

Testing in this order means that when something fails, the possible causes are limited to the newest step.

Change one variable at a time

This is the central discipline. If you replace a component, adjust a setting and reroute a wire all at once, and the behaviour changes, you cannot tell which change did it. Worse, two changes may cancel or mask each other.

Instead:

  • Change one thing.
  • Observe the result.
  • Record it.
  • Decide whether to keep the change, revert it or try another.

This is slower for each step but usually faster overall, because it avoids long confusion. If you do need to change several things because of time pressure, note clearly that you did, and be cautious in interpreting what follows.

Reverting is part of the method. Keep the ability to go back to a known state, whether that means a notebook entry listing what was changed or marked-up photographs of the original wiring.

Record everything useful

Memory is unreliable on the bench. Write down, at the time of the test:

  • Date, prototype identifier (such as a board revision and serial number) and who performed the test.
  • Equipment used, including settings.
  • Conditions, such as supply voltage and ambient temperature if relevant.
  • The actual measurement, with units.
  • Whether it passed.
  • Anything odd, including things that seemed unimportant.

Photographs of the setup and screenshots or saved traces from instruments are valuable. A bound lab notebook or a consistently used digital document both work; the key is consistency. Good technical notebook habits make results usable months later, and spreadsheets for engineering calculations help when you need to tabulate and compare many readings.

Record failures as carefully as successes. A test that behaves strangely once and normally the next time is a sign of an intermittent problem, which is very hard to find later if the first occurrence was not written down.

Make results trustworthy

  • Repeat measurements. One reading is an anecdote. Repeat the test to see how much results vary; the spread tells you about measurement uncertainty and sample-to-sample differences.
  • Check the instrument. Confirm your meter or oscilloscope probe is set up properly, and verify with a known source when practical. A probe’s own loading or a poor ground connection can distort what you see.
  • Test more than one unit if you have them. A single prototype might be unrepresentative, and behaviour across samples matters if the design will be produced in quantity.
  • Test beyond the happy path. Try the edges of the intended operating range, such as the lowest and highest supply voltage, and power cycling. Consult the absolute maximum ratings so you do not damage parts in the process, and stay within them unless a test is specifically designed for that and done safely.
  • Sanity check what you see. If a reading is wildly different from expectation, ask first whether the setup is wrong; running quick sanity checks on the numbers often finds a misplaced probe or wrong unit.

When something fails

Resist the urge to fix immediately. First reproduce the failure, then narrow down where it lives: power, signal, mechanical, software or environment. Compare against a working unit or a known-good state if you have one. Form a hypothesis, predict what a measurement would show if you were right, and test that prediction. This is the same logic used in debugging software, and deeper analysis methods such as root cause analysis are useful when a fault keeps returning.

After a fix, repeat the original failing test and also re-run earlier tests that could have been affected.

Close the loop

Summarise the findings: what passed, what failed, what was changed and what remains uncertain. Feed this back into the design, and update the documentation so the next revision starts from what you learned. A prototype that taught you something specific has done its job, even if it did not work at first.

The complete guide to testing and code review

Software Testing Concepts Every Engineer Should Know
Read the guide

Keep exploring

Guides from other topics

All topics →