1 / 3

Selecting a Programming Language to build Selenium Test Automation Suite

Read this article to learn about the Selenium Test Automation Suite.

olivermoore
Download Presentation

Selecting a Programming Language to build Selenium Test Automation Suite

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Selecting a Programming Language to build Selenium Test Automation Suite Selenium is a widely used open source, portable software testing framework for web applications. Though Selenium comes with a test domain specific language (Selenese), other programming languages (Java, C#, Ruby, Python) can be used to script tests as well. Tests made in other languages communicate with Selenium via calling methods in the Selenium Client API. Selenium is therefore neutral to the client language. All organizations shifting to Selenium for their web app testing face one common question: What language do we select to build Selenium based test automation suites? Let’s start off by looking at programming languages as a whole. Though many different languages exist, and new ones are still being created, one must note that roughly 90% of the concepts one learns in a specific language are also applicable to entirely different languages. When one is familiar with the core basics (program design, control structures, data structures, and basic operation of a programming language), developing similar skills with another language simply boils down to understanding the syntactical nuances. So, which language should one pick? As an individual, the answer is straightforward: go with what you’re most comfortable with.

  2. Dima Kovalenko, in his book titled Selenium Design Patterns and Best Practices, illustrated the flexibility of Selenium by showing how some common Selenium command sendkeys translate across major scripting languages. Consistency offered by the WebDriver API across languages, simplifies the process of porting test knowledge of one language to another. Test engineers become greater assets to their organizations as they can be relocated to any web project, written in any programming language, and still be able to create tests for it instantly. Uniformity between different Selenium bindings is applicable to most commands in the Selenium API. But one must note that the quoted example is a bit oversimplified. Action commands are framed in the same format in every language. But when different languages are used to script code, over time, differences will become apparent between the languages. Therefore, actions that function well in a particular language might be redundant and counter intuitive in a different one. As explained above, no clear favorite emerges when choosing a scripting language for Selenium. But which one should an organization select? The answer to this question is less straightforward. Some factors have to be considered: The current language being used by an enterprise for development: If an organization has everyone using Python, then that should be the ideal language to use. • Introducing a new language isn’t easy. It is also much harder to operate Selenium using a new language. Therefore, the most convenient choice is to use a language that QA testers are already comfortable with. • Local support for the programming language should also be considered. If local developers are experienced with a particular language, then that language is a better choice for QA teams. In case testers require help with the language, defects, or development tools, it becomes easier to make use of the already available in-house expertise. For individuals who haven’t programmed before, using script-friendly languages like Python, Ruby, and others could be the best way to go. They have an easy learning curve, and also allow Selenium tests to be written quickly and with less code. Java is the most commonly used language, but its scripts can be complex because of the relatively complicated syntax. • • •

  3. When all is said and done, every language has something unique to offer, and so there is no absolute winner. Selecting the most appropriate language comes down to the team’s particular situation, and what they’re trying to accomplish. It is important in this regard to seek some guidance and real-world help from players who have some experience in the field, and whose insights can aid you when making that crucial pre-development decision.

More Related