JavaScript, Java, .NET - which language to choose?

test-automation-choice.png

When it comes to choosing the right course for you, it can be difficult to decide between the different languages and frameworks out there. In this blog post, we try to sort the apples from the pears, the sheep from the goats, and (hopefully) make things a little clearer. Let’s start with JavaScript.

Jump to:

JavaScript

TLDR; Wonderful innovative tools that draw you in, even if the weirdness of the language may cost you your sanity. Learn this if working on a NodeJS application or if you’re only interested in UI automation and front-end testing.

Web browsers natively use JavaScript to perform dynamic actions on a page. It’s also an exciting and thoroughly modern language. This means that the Test Automation tools available are at the cutting edge when it comes to innovation and power.

Innovation

When it comes to innovation, nothing beats JavaScript. All the most exciting and beautiful tools are coming out of this space and if any tool is going to ultimately usurp Selenium, then this is where it will happen.

The Live Testing feature of Cypress is a revelation, while TestCafe also frees us from the confines of Selenium, giving us some much-needed stability while easily fitting into any wide testing framework. If you’re committed to Selenium, then WebDriverIO makes it simple, giving you a powerful mature platform that integrates with almost everything.

However, the price of innovation can mean you hit issues that haven’t been resolved yet. And these tools are innovating fast, haemorrhaging bugs right, left and centre.

However there are huge and enthusiastic communities supporting these tools, and any issues generally have workarounds or are fixed quickly. It also means any queries you have will be answered fast, a refreshing change from the support communities in other languages.

Ease of Use

All tools have great documentation and strive to make things as easy as possible for the tester.

Most of them excel when they’re reinventing what it means to do Automation Testing - Cypress and WebDriverIO in particular stand out when it comes to this - rather than trying to fit old models into their frameworks.

However, very much like the JavaScript language itself, it’s when you want to perform something bespoke that the learning curve suddenly becomes very steep.

For those just starting out, they will find the tools and the language much, much easier than Java and .NET. However, they can flatter to deceive. To get the most out of these tools and create Test Automation frameworks for complex applications, you will need knowledge of all the wonderful weirdness of JavaScript async/awaits, promises, prototypes, duck typing, function recursion and that can very quickly blow your mind.

Very much like Alice in Wonderland, some strong drugs may be needed to understand what is going on and to keep you sane.

Practicality

If you intend to purely be focussed on UI automation, or you’re working on NodeJS applications, then these are the tools for you. Plus they really are a joy to use.

However if you’re looking to automate the full stack of testing on a Java or .NET application, then read on to the next sections.

Overall

Innovative new tools such as TestCafe and Cypress make Test Automation fun. They also free us from the instability and limited commands of Selenium.

However, you will come across issues that haven’t been solved, and be prepared for a very steep learning curve later down the line - which will still be enjoyable for those who love to learn bizarre and wonderful things. For those of you who like their programming a little more predictable, take a look at the next sections.

Interested? You can book on our JavaScript courses here:

4 day Manual to Automation Tester course

2 day Crash Course in Test Automation



Java

TLDR; Learn this if you’re working in a Java software house and you want to manage or integrate with the the full-stack of automation testing. Otherwise, attend the JavaScript course for purely UI automation.

It goes without saying that you would only use a Java framework if you’re working on a Java application. The same is true for Test Automation in .NET (see the next section). There’s a steep learning curve right at the start as you must get to grips with Object-Oriented Programming in order to use any decent framework, however once you do, everything is simple from then on. There are none of the constant surprises of JavaScript.

Innovation

Any UI automation in Java will lean heavily on Selenium as this is the market leader in this area. Java is also a relatively stable language and once you understand the core concepts, these can be applied everywhere.

That isn’t to say that innovation isn’t happening in this space (hello Spock), however these tools will only make life easier for you, rather than introducing new concepts.

Ease of Use

As previously mentioned, for a non-developer to learn an object-oriented language is hard. However, once you get your head around the syntax (which is a nightmare) and the ways of working, then things only get easier.

If you’re using the IntelliJ IDE, then this will give you a lot of support and take some of the pain out of coding.

Practicality

If you work for a Java house and are looking to create a full-stack test automation framework for a complex application, then this is likely to be the best option.

Overall

A steep learning curve that it’s well worth overcoming to make you a better automation tester. The test automation models are generally a bit old and rely completely on Selenium, however there are innovations coming through that look to shake up this space and bring Test Automation with Java into the 21st Century.

Interested? You can book on our Java courses here:

4 day Manual to Automation Tester course

2 day Crash Course in Test Automation




.NET (C#)

TLDR; Learn this if you’re working in a .NET software house and you want to embrace the the full-stack of automation testing. Otherwise, attend the JavaScript course for purely UI automation.

Much like Java, if you work in a .NET software house and are working on a .NET application, then building your UI automation framework in .NET will make it much easier for you to build a robust test automation framework that sits tightly within your solution.

Innovation

The release of dotnet core into the open-source ecosystem has led to a nascent explosion in innovation around this area. Microsoft are also continuously nabbing all the best features of other frameworks and including them in their tools.

In particular, SpecFlow is much more user friendly and feature-rich than the Java version of Cucumber.

Ease of Use

Again, you will need to contend with the steep learning curve of Object-Oriented Programming and the horrible curly brackets syntax that confuses every new starter. Although, weirdly, C# has started incorporating a lot of the syntax of scripted languages, which can be confusing or exciting, depending on your point of view.

We love C# however, and do think it’s an enjoyable and lively language. Automation frameworks are built in a modular fashion that still remains tightly coupled to your application project thanks to solutions.

However you do need to contend with the bloated instability of Visual Studio, which is by far the worst IDE ever invented. In addition, the documentation that Microsoft provides for any of its products is at best horrible and at worst out-of-date. Visual Studio Code is one of the best IDEs, but has a steep learning curve for non-developers.

The documentation problem is changing though, as demonstrated by Microsoft’s recent release of Azure DevOps, so maybe they’re getting better in this area.

Practicality

The frameworks integrate well with any .NET project and can be as complex or as simple as you make them.

It’s also getting easier to use .NET tools for free as Microsoft embraces the open-source methodology, however, when using them in an enterprise environment, expect to be paying lots of licensing fees.

Overall

Once again there’s a reliance on Selenium for any web application UI testing, however the frameworks are powerful and integrate tightly with any .NET application under development.

A must if you’re working on a .NET project.

Interested? You can book on our .NET courses here:

4 day Manual to Automation Tester course

2 day Crash Course in Test Automation