How Would You Test a Clock That's Inside a Steel Box?

I saw a tweet from @pekka_marjamaki recently that I thought would be fun to share here to discuss.

I shared this on Slack and had some interesting replies:

I wouldn’t believe that the clock was in there unless someone showed me. Sounds like when you send the apprentice to the hardware shop to get skyhooks
Also, whoever wanted it tested completely failed at testability.
Wonder if there’s any test hooks for it?

ask what the object i am holding is supposed to do. if that is “showing the time” then it’s obviously failing for me

Try asking the box for the time, maybe the clock has voice recognition…

I guess you would want to try to figure out what type of clock it is first, digital or analog? Can you hear it ticking when you listen? Are there any alarms - is is beeping or a chime? Is there a power source coming out of the box?

I think I’d first find out how the steel box is put together. Is it welded shut or is there a lid? How is it closed? And also the purpose of the steel box. Is it to contain a clock, and why? Is the clock radio-active? What kind of clock is it? Wrist-watch, wall clock, alarm clock, smart watch? Size? What powers it?

How would you test the clock?

Going back to first principles, what outputs/feedback can get out of the steel box to indicate the current state of the clock? In other words, can we treat it as a black-box test and see if we get the expected output, which then raises the question of what are we expecting from the clock in the box - do we just need to know that it’s there and doing something or do we need to know the current time displayed?

Can we open or otherwise “see” into the steel box, so doing a white-box test? You could blast a powerful x-ray through the box but if the clock was digital not analogue then that would tell you nothing about the time it was currently displaying. What if the clock was analogue but stopped and you chanced to x-ray the box at the time it was showing, if you want to prove the clock is telling the time correctly then you’ve got a false positive there.


I’d want to know a lot more about the situation, so I guess I’d start by asking questions.

  1. What tools do I have available to me? Tools that might help me to test the clock itself, or to open the steel box, or I/O tools, or observability tools?
  2. What is the purpose of the clock? Is the clock’s time data the key piece of functionality? If so, for whom is it important? How will I know if the time is correct? Or is the clock’s timekeeping incidental/irrelevant, for example it’s an art installation?
  3. Is there anything timezone related to factor into the scenario?
  4. What is the purpose of the steel box?
  5. Is there anything else in the box besides the clock (honestly, my first thought was a bomb, not sure what that says about me) and, presumably, air?
  6. Why is the clock in a steel box? Is it important?
  7. Can I open, see into, or otherwise investigate the contents of the box?
1 Like

I’d reflect on the role of a can opener as a testing tool :wink: