Skip to main content

Bug Automation

In many of my clients, more effort is spent on 'test automation' than on other forms of testing or quality assurance. That can be the right choice, for example, I worked on a Data Warehousing project where we needed to write some test automation before we could test the data and its processing.

Many other projects in different technology areas also spend a lot of time on their test automation. To be precise, they spend an increasing amount of time fixing & maintaining old 'tests' and 'frameworks'.

There are great tools around to help us write these automated checks quickly. But as with many software systems: maintenance, in the long term, is where the time and money goes. That is why I'm surprised we don't use short term automation more. We have the skills.

One good example of short term automation is Bug Automation. A simple script / executable that recreates or demonstrates a bug. This isn't a new idea, I've been doing it for years and I know other people have to.

Its common on open source projects to report an issue with example code, to clarify the exact issue you are reporting. Its a quick way to demonstrate the issue.

I'm not referring here to the idea of building a regression test suite from 'tests' (checks) from each bug fix. You can do that if you want, It can be very useful, but you are back to maintenance overhead.

By Bug Automation I'm referring to a disposable script that proves the system is broken. We can falsify the assumption that we have 'working' software. We can't prove the system is bug-free with our automation, but we can show its broken. 

The automation isn't there to indicate when we have fixed the issue - but to highlight that we, as a team, have created one.

In many situations a quick chat, screen-shot or URL is enough to help a developer fix a bug. But not always. For example, A tool like BlueBerry Test Assistant could help demonstrate a bug quicker than I can explain it. But in some contexts the best tool is code.

For example: I discovered a security flaw in an open source Content Management System used by several large media corporations, including my client at the time.  I could have described the issue to people, but that would have been a poor substitute to an actual demonstration.

Its hard to persuade someone that their 'secure' random token generator isn’t random - its easier to show them.  So I wrote some Bug Automation, and sent this along with a summary of the issue. (And together we figured out a more secure solution)

Another simple example: Google has a minor bug whereby if you enter Hebrew or Arabic text (with white-space) the full stop on the 'Press Enter...' message is placed at the wrong end of the sentence.


While the issue isn't hard to describe, or screen grab (see above). Recreating the issue might not be so easy. Therefore we can create some simple Bug Automation, like this.

Other members of your team can run this script and see the issue on their own PC. They don't have figure out how to type Right To Left languages or battle an OS or bug tracking system that doesn’t like you to copy and paste such things. Used purely as a communication aid, It also doesn’t have the maintenance overhead of trying to maintain a 'proof' of a fix long term.

Bug Automation is already a multimillion dollar industry, its called the Zero Day Exploit industry. Unfortunately that automation is often used for nefarious purposes. But as an example of positive deviance, it might be wise to pick-up on the clever things other developers & testers are doing, and use them for ourselves and for good.

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!

Google Maps Queue Jumps.

Google Maps directs me to and from my client sites. I've saved the location of the client's car parks, when I start the app in the morning - it knows where I want to go. When I start it at the end of the day, Google knows where I want to go.
This is great! It guides me around traffic jams, adjusts when I miss a turn and even offers faster routes en-route as they become available.
But sometimes Google Maps does something wrong. I don't mean incorrect, like how it sometimes gets a street name wrong (typically in a rural area). I don't mean how its GPS fix might put me in a neighbouring street (10m to my left - when there are trees overhead).
I mean wrong - As in something unfair and socially unacceptable. An action, that if a person did it, would be frowned upon.
Example:
Let’s assume a road has a traffic jam, so instead of the cars doing around 60 mph, we are crawling at <10 mph.
In the middle of this traffic jam, the road has a junction, an example is shown here: