The application and E2E tests may (should!) use different programming languages. (2024)

Being different is better as they serve different purposes.

The application and E2E tests may (should!) use different programming languages. (3)

The End-to-End (E2E) testing process is a crucial step that verifies an application’s compliance with its specifications from the end user’s perspective. This involves utilizing E2E test scripts to drive the application in a web browser for web test automation.

E2E test scripts are designed independently of the code, thereby fitting the category of Black-Box Testing. It is generally agreed upon that the E2E scripting language choice is not related to the programming language used. Through the use of Selenium + Python, I have achieved successful E2E testing for numerous applications coded in various languages, including Java, C#, JavaScript, Python, and Ruby.

In certain software companies, senior technical managers/leads may prefer a specific programming language to be used for E2E test scripts. During my experience in test automation, I have noticed that this can be a challenging issue to navigate.

Despite demonstrating the effectiveness of a Selenium + Python solution and receiving positive feedback from many testers, some individuals may insist on using Java or JavaScript, which may not provide any tangible technical advantages. Although some may argue that a particular language must be used to ensure support for the test scripts after the consultant leaves, this may not always be the case.

In my experience, this preference may be rooted in personal opinions rather than technical requirements. As a consultant, I have been called upon to rescue failed test automation implementations. I have consistently relied on Selenium WebDriver + Python, a proven solution for many years, which has yielded promising results.

While successful E2E test automation should be celebrated, some individuals may feel threatened by change and question using a particular language, even when the results demonstrate efficacy. It is important to acknowledge that such issues are human and can require a diplomatic approach to overcome. Through clear and respectful communication, finding a mutually beneficial solution that meets the goals of all parties involved is possible.

Here's an overview of popular programming languages and their suitability for automated testing.

  • Java/C#

While compiled languages such as Java and C# may not be the optimal choice for this purpose, a scripting language is recommended for automated testing.

Automated test scripts are vital for the entire team, not just for programmers. It is essential to consider that manual testers, business analysts, and customers may not possess strong programming skills, which presents a unique challenge. For users who need more technical expertise, configuring a 100MB Eclipse (a Java IDE) and setting up library and JDK paths may be as daunting as the first chapter of automated testing orientation. And then, be prepared to hear a “What does ‘compiler error’ mean?” shortly after.

A well-designed functional test script language should be easy to learn, not require compilation, using a non-proprietary, concise and readable syntax, supporting an extensible syntax for domain-specific language usage, and, ideally, having one operation per line.

  • Javascript

JavaScript is widely used for coding web applications and as an E2E scripting language. However, it has a history of failed or outdated automation frameworks, such as PhantomJS, WebDriverIO, Nightwatch, TestCafe, Puppeteer, etc. Recently, the outlook for Cypress.io has become uncertain.

In my experience, almost every attempt at JS test automation (including Cypress and Playwright) has failed.

However, I acknowledge that my definition of test automation success may differ from others. Successful test automation, as I see it, involves 500+ e2e (via UI) tests that are automated and continuously running — which is surely feasible for large/complex apps.

  • Python/Ruby

Python and Ruby are both suitable scripting languages for E2E scripting and are perfect for the job. While Python’s use of indenting may pose a challenge for business analysts and manual testers, training can resolve this. It is worth noting that the audience for E2E testing may include business analysts and manual testers.

Hired’s 2023 State of Software Engineers Report states that Ruby on Rails and Ruby are the top two most in-demand skills. Additionally, Ruby is largely used for web development. If the team’s coding language is Ruby (or Python), using the same language for E2E testing may be acceptable.

The argument for using a different programming language for E2E scripting is primarily based on human factors worth considering. E2E testing is intended to verify the developer’s work independently. However, conflicts can arise easily when both parties share the same repository and likely use the same IDE. In my experience, in this setup, QA engineers are often overshadowed by developers, testing loses independence, and quality becomes a liability.

These observations stem from personal experiences.

The application and E2E tests may (should!) use different programming languages. (2024)
Top Articles
Latest Posts
Article information

Author: Rueben Jacobs

Last Updated:

Views: 5820

Rating: 4.7 / 5 (57 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Rueben Jacobs

Birthday: 1999-03-14

Address: 951 Caterina Walk, Schambergerside, CA 67667-0896

Phone: +6881806848632

Job: Internal Education Planner

Hobby: Candle making, Cabaret, Poi, Gambling, Rock climbing, Wood carving, Computer programming

Introduction: My name is Rueben Jacobs, I am a cooperative, beautiful, kind, comfortable, glamorous, open, magnificent person who loves writing and wants to share my knowledge and understanding with you.