I should probably start with the apologies for the false header 😁
There’s no such thing as the best programming language for Selenium. Every language has its own benefits and drawbacks; each is unique and beautiful in its way. However, there may be a language which fits best for your project.
I’m a strong believer that the test automation should utilize the same technology the developers use, as much as possible. The advantages are huge:
1. Reusable code
Let’s assume you are requesting API in your test automation script and the endpoint got multiple steps to obtain the authorisation key. The developers already covered this in their integration so you can reuse their methods/functions. However, coding on a different language will force you to redevelop existing functionality. Isn’t that a double effort?
2. Speaking the same “language” with the developers
You’re writing the code and stuck with one module. Can you imagine taking your Python code to a Java developer asking for advice? You will most probably hear: “Sorry, I don’t code Python”.
3. The test automation team scalability
Developers have finished their tasks but the test automation is still in progress? Not a drama, a quick induction session to your programmers explaining the test project structure and standards and you got a highly qualified extension to your test team.
4. Integration constrains
There are still systems, especially the legacy ones, which only provide SDK as the integration tool. And as you guess, the SDK may be limited to a particular language (most probably the one developers use).
5. CI/CD troubles
Are you planning to add your Ruby tests to VSTS/TFS builds? Ah… Ok, have fun configuring this 😂
There are still projects where developers and testers “speak different languages”. Sometimes this happens because of some legacy and environment limitations, sometimes because the testers prefer one language/technology over the other, and sometimes because the project team doesn’t really mind the language you use for your automation. But it often turns to significant expenses at the end.
So, this article is a call to invest more time to analysis, design and architecture, while you’re building the test automation from scratch. If you’re planning to introduce new technology/language to your project environment, ensure it will be effective in the long run.
A programming language is a tool and the best programming language (for automation with Selenium) is the one which will benefit your project most.
Thanks for reading and have a great day!
Please post your questions and suggestions below.