Skip to main content

Shutter Sync, when failure provides enlightenment

Shutter sync is an interesting artefact generated when we video moving objects. Take a look at this video of a Helicopter taking off:

Notice how the boats are moving as normal, but the rotors appear to be barely moving at all. This isn’t a ‘Photoshop’. It’s an effect of video camera’s frame rate matching the speed/position of the rotors. Each time the camera takes a picture or ‘frame’ the rotors happen to be in approximately the same relative position.

The regular and deterministic behaviour of both machines enables the helicopter to appear to be both broken and flying. The rotors don’t appear to be working, while other evidence suggests its rotors are providing all the lift required.

What's so exciting is that this tells us something useful, as well as apparently being a flaw or fail. We could both assume the rotors move with a constant rotation, and estimate a series of possible values for the speed of the rotors, given this video.

Your automated checks/tests can be exhibit this too. Take for example a check that often/always ‘fails’. But when you examine the software with other tools the problem disappears.
This might be a probe effect - that is, the ‘bug’ may only happen because of the testing tool. This is actually quite common. It was a bugbear of mine in the days of pre-webdriver browser automation e.g. Selenium RC, as RC inserted a lot of JavaScript into the page - often resulting in erroneous behaviour.

The ‘failure’ could also be a race condition. The regular systematic behaviour of the the testing framework, interacts with near perfect timing with the software being tested. The checking code, sees the problem frequently & repeatedly - as it always checks in the narrow window of time, when there is a problem.

Automated test/check ‘failures’ like the above are often dismissed immediately as things to work-around or fix. While it might make sense to ‘clean’ this from our results, we could miss potentially valuable avenues for testing. The ‘failing’ test is presenting us with information. That information might be more valuable than a clean pass/fail result - especially if the apparent failures have an inconsistency of this kind.

Just as with shutter sync, where we determine the behaviour of the rotors from the video. We can glean useful information from the ‘failing’ test/check. Investigation of these test ‘failures’ might show that the GUI is not quite in sync with the database or other users screens etc.  Maybe when the UI suggests an action is done - the user/system could actually still write some data for a short while. Or two events that as far as an API shown happen sequentially - in reality happen at the same time.

Comments

Popular posts from this blog

Why you might need testers

I remember teaching my son to ride his bike. No, Strike that, Helping him to learn to ride his bike. It’s that way round – if we are honest – he was changing his brain so it could adapt to the mechanism and behaviour of the bike. I was just holding the bike, pushing and showering him with praise and tips.
If he fell, I didn’t and couldn’t change the way he was riding the bike. I suggested things, rubbed his sore knee and pointed out that he had just cycled more in that last attempt – than he had ever managed before - Son this is working, you’re getting it.
I had help of course, Gravity being one. When he lost balance, it hurt. Not a lot, but enough for his brain to get the feedback it needed to rewire a few neurons. If the mistakes were subtler, advice might help – try going faster – that will make the bike less wobbly. The excitement of going faster and better helped rewire a few more neurons.
When we have this sort of immediate feedback we learn quicker, we improve our game. When the f…

Thank you for finding the bug I missed.

Thank you to the colleague/customer/product owner, who found the bug I missed. That oversight, was (at least in part) my mistake. I've been thinking about what happened and what that means to me and my team.

I'm happy you told me about the issue you found, because you...

1) Opened my eyes to a situation I'd never have thought to investigate.

2) Gave me another item for my checklist of things to check in future.

3) Made me remember, that we are never done testing.

4) Are never sure if the application 'works' well enough.

5) Reminded me to explore more and build less.

6) To request that we may wish to assign more time to finding these issues.

7) Let me experience the hindsight bias, so that the edge-case now seems obvious!

Being a square keeps you from going around in circles.

After a weary few hours sorting through, re-running and manually double checking the "automated test" results, the team decide they need to "run the tests again!", that's a problem to the team. Why? because they are too slow. The 'test' runs take too long and they won't have the results until tomorrow.
How does our team intend to fix the problem? ... make the tests run faster. Maybe use a new framework, get better hardware or some other cool trick. The team get busy, update the test tools and soon find them selves in a similar position. Now of course they need to rewrite them in language X or using a new [A-Z]+DD methodology. I can't believe you are still using technology Z , Luddites!
Updating your tooling, and using a methodology appropriate to your context makes sense and should be factored into your workflow and estimates. But the above approach to solving the problem, starts with the wrong problem. As such, its not likely to find the right ans…