What Programming Language To Learn For Test Automation

A fellow tester asked me recently what programming language would be best to start out learning for test automation.

She tried learning C++ awhile back without success.

She was also asking if , for a tester, knowing a programming language is a "must learn" to succeed and grow in testing.

In other words, do testers have to write code?

I agree that learning a programming language is intimidating and difficult for manual testers.

But it should not be so.

What is the best programming language for test automation?

My suggestion is Java or C#.

Let's take Java for example since C# is very similar to Java.

People say that Python and Ruby are easier to learn for a novice and they are probably right.

I don't know Python and used Ruby for just a month to see how it is (very interesting).

I suggest Java because

- Java is available for a long time compared with Ruby and Python which are rather new

- Java is very popular; it is the language with the highest popularity increase (5.94%) in 2015

- a lot of documentation is available on the internet for Java, many online Java courses and many Java books

- learning the first language is difficult regardless of the chosen language; some people recommend learning first Python and Ruby and then learning Java; but if you will put the effort and time into learning, why not learn Java from the start?

- learning Java may be more difficult than Python and Ruby, especially the object oriented part of it; but as soon as you learn it, Java can be applied to many testing types like test automation with Selenium for web and mobile apps, API testing, performance testing (with JMETER)

- while learning the new language, you will have a lot of questions and may get stuck; if your learning is through a Java course, you can ask your instructor for answers; otherwise, it is important to know people that have experience with the language that you are learning; most of developers know Java or C#; Ruby and Python developers are rather rare; I still haven't met a developer on the local market (Vancouver, Canada) that uses these languages for work projects; most of developers use either Java or C#

- Java has a very good IDE (Eclipse)

- if you are planning on using Java for test automation, 65% from all Selenium downloads are for Java

Is learning a programming language a "must-do" for a tester?

More and more companies are moving away from hiring pure manual testers and prefer testers with test automation skills.

Learning a programming language has additional benefits to get you started with test automation.

A tester that knows a programming language will speak the same "language" as developers.

He will understand better what developers do and get a better appreciation of how complicated development is.

He can do unit testing and participate in code reviews.

Share this