Which language for automation – Java or JavaScript?
There is NO silver bullet answer and it might not even be these two (Python or Ruby)
Here’s what I have used historically:
- Browser automation : Javascipt
- Interacting with the DOM is easier,
- Using AUT exposed methods is easy
- Scripting languages quicker to write and lesser code
- Popular tools: WebDriver, Cypress, NightWatch
Services automation: Java (Where prod code is in Java)
- Same language as production code – critical for component tests
- More options for mocks
- Can reuse prod code (e.g. POJOs)
- Extensive community support
- Popular tools: RestAssured, WebTestClient
Again, no silver bullet answer – need to consider various factors to decide for your team.
#TestAutomation #Testing #Programming
Leave A Comment