Reactions to “What’s the best programming language to learn for test automation?”

Previously I wrote what I thought about the best programming language to learn for test automation.

Spoilers: I picked Python.

I posted links to that article on a test automation discussion site. People also posted links to the article on social media.

A couple of reactions on Twitter:

Mark and Brian raise valid counterpoints. Of course, the real answer is always “It depends!”

An expert knows exactly the right tool to select because they have experience to inform that choice. A beginner has almost no experience and their choices are arbitrary.

Sometimes a beginner becomes so overwhelmed by the number of choices, they become paralyzed with indecision. For a beginner, it’s often far more important to get clear direction and get some small victories under their belt. It’s about gaining momentum.

For a beginner, any choice is perfectly fine as long it gets them started. Once a beginner learns one programming language, picking up the next one will be easier.

It’s kind of like the old saying about exercise: “Which exercise is the best? The one you will do.”

What’s the best programming language to learn for test automation?

People ask this question in other ways, too.

How do you choose a programming language for software testing automation?

Does it matter that I am writing automation code in a different language to that used in development?

How would you rank [insert language here] and what is the most popular language used in building automated frameworks?

In the “real world”, the tool you use to build a test automation tool depends on a lot of things – who are you working with, how much experience do you have with the system under test, is the system a web application or an API, etc.

If you are just starting out then the first thing you must do is to learn how to program.

When you are just starting to learn about programming there are many choices. You are not sure which path is the right path. Everything looks like it is important. You are not sure which way to go or what to do.

You need a clear answer. You need an answer that pushes aside all of the doubt and stress about picking the right thing.

The short answer is: Python.

Python has a lot of advantages for someone learning how to program.

You can write short programs and run them to get quick feedback with Python. Fast feedback means you don’t spend time waiting to see if what you did was right or wrong. You learn and correct mistakes quickly.

Python’s syntax (the rules of how a program is structured) is similar to other programming languages such as Java, and C#. Once you learn the patterns of how a Python program is built, you’ll learn your second language much faster.

Python also enjoys a lot of help for the beginning programmer.

Here are some of the books I recommend:

There are many more out there, but this list should be a good starting point.

Let me know if this was helpful.