Java or JavaScript: What do I choose for QA Automation?
I was recently asked the following:
I trying to decide between using Java and Javascript.
I prefer Java because it is more demanded in QA Automation, but I hate the community, the API's look old and I don't like IDE's, Maven, etc.
However, there are tons of tutorials for Java + Selenium and I can find nearly any answer to questions I may have.
As for Javascript, I really love the community, NPM and opportunities (like switching from QA Automation to anything I want (back-end, front-end, mobile)). I also love IDE's and their extensions, BUT unfortunately there aren't as many resources for Javascript and Selenium.
Frankly, I'm afraid to start with Javascript because I may get stuck, and lose motivation/hope that I can do it by myself.
Do you think it is a good idea to pick Javascript as first language for QA Automation?
If so, what would the learning path be? Like watch a couple of Javascript video tutorials in Udemy (the best and recent ones, like Modern Javascript), then practice in freecodecamp? Would that be enough to write some basic tests, implement page objects with webdriver.io and use API's?
During your live videos I see that even you struggle to find some answers to questions. Sometimes you can spend 20 minutes figuring it out.
It frightens me that if you get stuck for 20 minutes, then I may stuck for days and may not even solve the problem.
This was a really great question and something I think a lot of folks in that situation probably struggle with. Here was my response.
You're right that the general QA community is built around Java Selenium (and I definitely agree with your criticisms as well).
That said, I don't see JavaScript nor WebdriverIO going away anytime soon. JavaScript is still the de-facto browser language and WebdriverIO is still actively growing (my course sales have been steadily climbing over time).
I think JS would be a great first language, as the basics are fairly simple. There are definitely complex parts to it, but you don't necessarily need those to write automation.
Apart from freeCodeCamp, I'd check out Wes Bos' free JavaScript 30 course. That's a great resource for seeing real-world scenarios of when and how to use specific JS functionality.
The thing about getting stuck in programming is that it's going to always happen. Thankfully the answer usually appears so long as you keep looking at the code.
Also, programs like Thinkful and Codementor are great if you're looking for some professional mentorship.
And like you said, anything you learn on the JS side of things can translate to non-automation oriented tasks. Automation is a great way to learn more advanced topics, since you can do basic things in it pretty easily, but can learn some coding tricks to try some more advanced ideas.
So I personally would recommend going with JS on this. It's a tough choice and comes down to what really motivates you, but it sounds like your gut is saying JS.
What are your thoughts on the preferred language of QA automation? Is Java the top choice, or does JavaScript based tooling have a real future?
Header Photo by Kyle Glenn on Unsplash