How to choose a programming language for test automation
If you have decided to take the step of learning a programming language for test automation. First, let me congratulate you! Learning something new like programming is never easy. But the first time you see that ‘Hello world!’ text appear on the screen. It ignites an addiction that is hard to extinguish.
Second, which programming language are you going to learn? There are a lot after all (just look at the list here). And since not all of them are used in test automation or have many jobs that utilise them. Deciding on the right language to invest your time and effort is crucial for maximizing your future gains.
If you already have a job and want to learn automation to add value to your testing strategy. It might make sense to go with the same programming language that the developer team is already using.
The pros of this are:
- Developers can be a source of help for the test team.
- New testers can integrate more easily with only one programming language to learn.
- Existing tools and libraries can be leveraged if needed.
However, sometimes this might not make sense.
Let’s say you are part of a project that is producing an application developed using C++. Although there are some automation tools for C++ and the concepts will translate over to other scenarios. If it is your first programming language, then it might make sense to choose something else to learn first.
Not only because the range of tooling is not the same as other languages. But you might struggle to obtain another test automation role that requires C++.
But what if I want to get a job in test automation?
If you want to advance your testing opportunities. Get a new job, or even begin a new career. Since time is our most valuable commodity as humans. I advise you to go through an in-depth research process before deciding on a learning path to follow.
Your research should cover these key areas:
- Job opportunities.
- Tools available.
- Community support.
It might also be helpful to look at the IDE’s that support a language. Notepad or another text editor can’t do everything.
If, for example, you want to learn a programming language that supports a feature-rich IDE like PyCharm. Then that may swing your decision.
Conversely, if a language’s supported IDE is NetBeans for example and most developers use it. Then you might be swayed against (can you tell I’m not a fan?).
However, with editors like the excellent VSCode, Sublime Text or Atom. Then an IDE might not be a huge deal-breaker for you. Just note though that you might not be able to do everything that is possible with an IDE.
I recommend reading this article to learn the advantages and disadvantages of using an IDE.
What does this process look like?
First. You want to start by discovering the popularity of each programming language. Popularity doesn’t always translate into the best solution. But it will the basis for you to gauge all the number of job opportunities for that option.
I recommend referencing a survey like the Stack Overflow developer survey. Which according to their site:
Stack Overflow’s annual Developer Survey is the largest and most comprehensive survey of people who code around the world.
The survey provides multiple interesting statistics from location, age and job titles. But the one we are after is the technology section which details the programming languages used the developers are using worldwide.
So as we can see here. JavaScript is the most popular language being used by developers. But because it is popular with developers, doesn’t mean that it always translates into a high number of job opportunities.
To gauge that you need to make use of a job board like Indeed. You should take each of these languages and by typing in ‘<language> automation’ within your local area. This will give you the number of available opportunities to help steer you into making an informed decision about your learning.
There are other programming languages surveys and indexes which can also be used. Such as the TIOBE index which is updated more frequently.
What languages do you use?
As I have mentioned in previous articles and on about page. I program in a variety of languages from C#, to Java and JavaScript. But my first love, and the one that I always recommend to beginners or those who want to pick up a new language, is Python.
Not only because it’s vast community support, a high number of testing libraries and multiple use cases. It’s also a fun and expressive language to code in.
That’s not to say that other languages like C# or JavaScript can’t have the same attributes as Python. But it’s the one I am most experienced with. From driving the browser with Selenium and API testing with Pytest to using Appium to solve a Sudoku puzzle on Android with OCR. Python is cool.
Learn for learning’s sake
However, I do not advise that once you pick up one programming language that you stop and learn nothing else. Additional languages make use of new programming concepts that you might not have else come across. They make you more rounded, providing opportunities for future advancement. Not to mention supplying the extra fuel that feeds the fire of curiosity that testers should have.
Programming opens the door for testers to discover more about the software that we are working with. And rarely can that ever be done with one tool, one library or one execution.
[…] How to choose a programming language for test automation Written by: Kevin Tuck […]
[…] How to choose a programming language for test automation Written by: Kevin Tuck […]