There’s an oft asked question in the testing community; “Do testers need to know how to program?” I feel that this is the wrong question. It’s often asked because knowing how to program will allow the tester (it is thought) to understand where the weak points in what they are testing exist, as well as aid them in their own work with automation and the like.
The better question is “What benefits does knowing how to program bring me?”
My instinctive answer is “it’s incredible how many benefits you get from learning how to program”, but instinct was evolved to stop you being eaten by a tiger or eating rotten meat. It’s really handy, but you can’t always rely on it.
So let’s break down the pros and cons.
I’ll start with the cons as I see them.
It takes a long time to learn to program well. It’s not just a case of reading the documentation and away you go. You need to practice and you need to learn whole new ways of thinking. If you want to learn to program really well, you need to learn a good deal of maths too.
Not only do you need to spend a long time on it, you’ll spend most of that learning the basics and doing things you don’t feel are especially useful. This can be very tedious.
You’ll need to learn your way past the limitations of the computer and/or language. Even things you think should be easy can have hidden complexity sometimes. Python division in 2.7, I’m looking at you*
If you don’t relish always failing forwards, you won’t enjoy programming. Programming exists on the edge of what you know, you’re always solving a new problem and that means continual failure.
The pros are easier for me to write. I’m biased.
In today’s world programming gives you access to a tool that will let you get a lot more from the evolving technology we surround ourselves with. You’ll be able to write the app you personally need, or grab an open source repo and play with the program until it works for you. Or if you’re like me, you’ll write your own toolbox when you enter a new role, which can really help you cut a lot of time out of testing and expose whole new areas of bugs that were hidden in the code.
As a tester the benefits are even more pronounced than for other people. Firstly it teaches you how a program, an OS, and a computer work. You might think you have a good idea of how a computer works, and maybe you do, but nothing teaches you the vagaries of an operating system like learning how to make it do anything useful. Knowing the basics of how to program will help to illuminate the dark parts of the program,where the bugs live. It helps even if you don’t read the actual code, because you know the areas where interactions are complex and so bugs are more likely to spawn.
Secondly it lets you read the code for your program, at least at a high level, and it’ll let you see where the developer(s) might have missed a trick or slipped a race condition into the program.
Thirdly, it lets you automate your checks. Now you might already have automation engineers and wonder if you really need to learn how to write your own checks. You do. You might not think you do, but you do. Automation engineers don’t want to write checks, they want to build and maintain frameworks. They probably don’t mind adding the odd check here or there, but really that’s not a great use of their time from their perspective, because it’s saving your time, not theirs. Writing your own checks means you’re certain what’s being checked too.
Essentially for me, it’s a given that learning to program is both beneficial and fun. I have never encountered a situation in which I’ve seriously thought “I wish I didn’t know how to program”, though I’ve seen some commits that have come close!
DISCLAIMER: I am a not a good programmer, but I am trying to get better every time I write a script. I am also a complete Python fanboy.
*In Python division takes two arguments and if both are integers, it’ll return an integer. So 5/2 = 2 in Python 2.7.
Really interesting post, thank you. I have spent a lot of time trying to learn various programming languages and it is very tedious. I’ve also met plenty of situations where I thought “I wish I knew how to program”. Thank you again :-)