Skip to main content

Should testers learn to code?

Should testers learn to code?

This question has been discussed on twitter quite frequently, and to be honest is getting a little boring. If testers want to learn to code then they should. If they don't then that's fine as well. This post is my humble opinion on whether as testers we should learn to code. The reason for this blog post was because recently Trish Khoo‏ (@hogfish) asked the question:

Should testers learn to code?

She did a blog post on the results of the poll, which can be found here

http://trishkhoo.com/2017/08/yes-all-testers-should-learn-how-to-code/

In my humble opinion testers should learn to code. For me it is a no brainer and something that isn't about keeping up with the industry trends or doing what is fashionable for testers, its about:
  • Developing skills you may not know you possess
  • Give you the chance to spend more time 'testing' (By this I mean exploratory testing)
  • Making you a more valuable member of your team (Before anyone reading this says "I am valued and I don't code!!!" I'm not saying that if you cant code you don't add value, i'm saying that IMO you will add even more value)
I think that testers, when they hear the word code, think automation. Lets be honest most blog articles and discussions on testers coding are around selenium and other automation frameworks. Now there is value in learning automation frameworks but as a tester, coding can mean something more.

What is coding to a tester?
Coding to me can be one of two things:

1) Automating the testing of the UI e.g. Selenium
2) Developing of tools that aid you or your teams testing process

Now if you are a tester who has no interest in testing the automation of a UI then there is still value to be had in learning to code. Developing tools that aid the testing process can yield invaluable gains (in terms of both time and knowledge) and give you more time to do 'testing'.

During testing there are probably times when you need something done quicker and more efficiently than how you currently do it. Now if you have learnt to code you may be able to identify how code could help you become more effective, and you could then start to write a little program.

For example.....

You have spent some time learning powershell.

Your test database servers have to have SQL Server 2016 installed on them, but the features that are required will vary from environment to environment. You could write a little powershell script that installs SQL Server 2016 and uses a list of parameters that allow you to specify what features you want to install.

Now you may not identify this as 'coding' but it is. You have written some commands that sit inside a script, and the scripting language you have used supports the typical coding basics, such as variables, loops and functions. Now this script would mean that you could get an environments database installed whilst you were doing something more interesting. Now I appreciate that learning to write this script will take time but what you learn will not be wasted, going forward you have some knowledge that can be used in other areas. And also there are plenty of resources online to get you up to speed quite quickly with a programming language, my personal favourite is Pluralsight. Now i'm not saying that you need to know all the ins and outs of a programming language but just to have some knowledge will go a long way. I wrote a similar script to the one mentioned above and it took me only a couple of hours and I had no powershell experience before hand. You may find that you have a real talent for coding and this could lead you down other paths which will help you develop as a tester.

From this you could move on to setting up an entire test environment using a script. How much time could this save you? Think of the savings across a whole team if each tester
just has to run a script compared to installing a database manually.

There is another advantage. If you sit with a developer and are discussing various aspects of the system, your coding knowledge will help you when (and if) they start trying to explain the code to you. You can ask better questions and enhance you knowledge of the system you are testing. This will
make you more valuable to your team as you can point out potential issues to the developer. You will also have more insight into the code which in turn will help you come up with different test ideas.

What should I learn to code?
Well that can depend on the technologies your company uses and the resources  you have available. I work in a .NET environment so I have done a little powershell learning but my main push is to learn c#. The reasons for this are:
  •  I have multiple developers to ask about the language should I need help
  •  When I'm looking at our application code I will have more chance to understand it
  •  C# can be used across many platforms.
So try coding. You may surprise yourself and realise it adds a nice new weapon you your testing arsenal.

Comments

Popular posts from this blog

How to deal with pauses and timeouts in specflow

So this blogpost is in response to the weekly Specflow blog posts and challenges that have been written by Gojko Adzic. This weeks challenge was how would you rewrite or rephrase the below scenario: Given a user registers successfully When the account page reloads And the user waits 2 seconds Then the account page displays "Account approved" My initial though was something like this: Given a user registers successfully  When the account page reloads   Then the account page is displayed within a satisfactory time period     And the account page displays "Account Approved" Now the problem with this scenario is what defines a satisfactory time? You could add it as a comment or in a scenario outline but over time the time a user waits could change and if this is updated in the code behind but the scenario outline or comments are not, then what the test does and what is described do not match - this would potentially cause issues in the future. My next ide

Testing and Mindfulness

How aware are you? Do you live in the here and now or is your mind always somewhere else? This blog post is about Mindfulness. Mindfulness is a simple meditation and is defined as (According to Wikipedia): "The intentional, accepting and non-judgemental focus of one's attention on the emotions, thoughts and sensations occurring in the present moment" Now Mindfulness has become more popular in the west in recent years as it has shown to have benefits for people who are suffering from Depression and Anxiety. It has been around for a while and is often thought to of originated from Buddhism and some people believe it started thousands of years ago. Now modern life is hectic and I’m sure we all have lots of things going on in our lives that keep our Brains busy and trying to focus on one thing at a time can be a challenge. I can't remember the number of times I've been doing something and my mind is somewhere else entirely. Mindfulness helps you focus on

Building a test strategy for a new team

Teams, we have all been on them. Some are good and some are bad. Some we never wanted to leave and others we probably couldn't wait to leave. Now most of the time (well in my experience anyway) you tend to get put into a team that already exists. Maybe you are a new hire or maybe you have asked to change to a different product team.  When you do this, more than likely there will already be a testing strategy in place. It may be that you adapt it and change it in any way you see fit to improve the testing. But imagine if everyone on the team was new? How would you decide your testing strategy? This post will go through some useful things you can do to help a new team develop a test strategy. Table of Contents ๐Ÿ“ˆ What is a Test Strategy? ๐Ÿค” Where should I start? ๐ŸŽฏ Understand the company and their goals ๐Ÿ’ช Play to the teams strengths ๐Ÿ‘️‍๐Ÿ—จ️ Understand what quality looks like ๐Ÿ“ Understand Scope ๐Ÿงช Understand the type of tests you need ๐Ÿ“Š Measure your success ๐Ÿค Collaborate ๐Ÿ“ Summar