Can Selenium Automation really save businesses from an online breakdown?


There are instances where you try to key in a Web page address and encounter an HTTP error. This could probably be a typo error while entering the website address, but most of the times it is an error with the website. Google has identified the top 5 most common HTTP errors – Error 500, Error 404, Error 403, Error 400, and Error 401. The hit list has been created using Google’s search statistics, where the idea is to find out the most common errors that are searched by users for solutions on the search engine.

Cases like these can take away any prospective customer and create a sorry figure for the brand. It is a universal truth in today’s digital landscape that websites, web applications, or mobile applications with high-performance drive more and relevant traffic, engage better, and bring brand loyalty. Gaining and missing out on a business opportunity just takes fraction of a second.  This mounts the importance of constantly evaluating and optimizing the performance of your Web properties.

Some key parameters for assessing the performance of Web applications are:

  • Average Application Response Time
  • Requests per second
  • Peak Response Time
  • Concurrent users
  • Throughput
  • Error Rate

Functional  Testing comes into play to ensure and test that the website is showing the required results, irrespective of the challenges in the digital space. While the process has been done manually for a long time, the benefits of automated testing are immense. Automated testing and implementing a Test Automation framework helps accelerate the process, brings enhanced accuracy and reduces the test cycle. This holds tremendous benefits commercially, where businesses are able to get products and services faster to the market with assured quality.

The market is flooded with licensed Test Automation tools like HP QTP/UFT, TestComplete, and many more that facilitate faster test cycles. However, these tools come at a cost that additionally requires regular upgrades and regular training costs. As market and technology moves towards Open-Source, even Test Automation is taking the same course.

Industry reports validate that Selenium is coming up as an absolute winner in the domain. Selenium is an open-source test automation tool that enables automated functional testing. Most importantly, it is a freeware that can be customized as per the testing needs.

There are numerous Open-source test automation tools in the market, namely, Serenity (formally Thucydides), Robot Framework, RedwoodHQ, Gauge, etc. However, there are some obvious reasons why Selenium is increasingly gaining popularity over many other Open-source tools and the long-dominating licensed tools.

Capability to operate on every Operating System (OS), support across multiple languages, and compatibility on multiple browsers, almost zero training costs, easy interface, and scalability in the longer run, are some of the major highlights of Selenium that businesses are capitalizing on.

With the current security breaches and modern day hackers prying in the digital ecosystem, enterprises need more and more robust websites and sustain vigorous consumer engagement. How does migrating to Selenium help enterprises to do so?

  • It’s Compatible:

Selenium brings convenience and adaptability, as it provides mechanisms to allow the same tool to run across multiple platforms. As mentioned above, it supports almost all Operating Systems, namely, Windows, Linux, and Mac and operates across popularly used browsers like Firefox, Microsoft, Internet Explorer, and Safari. So, Selenium becomes the tool of choice for cross browser/cross platform validation.

Selenium is JavaScript-based and can run directly on the browser and supports multiple languages. Though it was written in Java, it supports PHP, .Net, Pearl, Ruby, and Python, which means that the developer can create the testing framework in a language that is widely used within the enterprise.

This kind of flexibility is unmatched when compared to established test automation tools like HP QTP/UFT, which predominately operate on Windows and some limited browsers.

  • It’s Flexible:

Selenium is known amongst testers for supporting flexible test architectures, as most testers choose to keep the tests independent to make the process more flexible and sustainable. This gives them the freedom to shift them, erase them, or redesign them as required.

Selenium supports test suite, and runs tests in a recurring and sequential manner. This enables flexibility to play around with the tests as per functionality or any other parameter.

  • It’s easy to implement:

Selenium provides an in-built, user-friendly interface to create and execute test suites. Its open-source features help users write their own extensions, which makes it easy to develop customized actions that enables advanced manipulations.

Most importantly, the tests can run directly in the browsers and the user can actually watch the tests getting executed. The commands executed get highlighted and the testers can evaluate the success ratio, which eases the entire testing process.

  • It reuses the Code & incorporates add-ons:

Selenium’s Test Automation Framework uses simple scripts that can make tests run directly across multiple browsers. At the same time, it is possible to execute numerous tests simultaneously with Selenium. It covers almost all features of functional testing. It brings several add-on tools that widens its scope.

Selenium IDE enables users to port their applications on Firefox and record them. It is increasingly getting popular amongst testers for all functional testing needs. So much so that there is threat that testers could exploit it for even lower-layer of testing needs.

  • It Reports effectively:

Selenium’s reporting capabilities are one of the key highlights for choosing the framework. It allows testers to extract the results and even take follow-up action effectively. It provides comprehensive test execution results along with all-inclusive summary and snapshots of the errors. It further generates HTML reports for sharing with the concerned group.

While Selenium wins on various grounds, its strength dwells in the fact that it is an Open-Source tool and brings in all the required advantages. It has zero licensing costs and almost zero training expenditure. It has an active user community, which keeps sharing key findings and learnings.

It is known to tackle key legacy issues while automating the functional tests and offers a platform that constantly explores and innovates.

The Strategic Planning Assumption from a recent Gartner Report states that by 2020 Selenium WebDriver will become the standard for functional test execution, which will side-line vendors that can’t provide strong, agile and advanced test functionality.

Is Migrating to Selenium on your agenda?

Know it all. Gallop is hosting a Webinar on Migrate to Selenium on 29th September, 2016, 11 AM EST, covering key insights on drivers for Migrating to Selenium, and the challenges associated while embarking on this transformation journey. Reserve your slot now!

Migrate to Selenium

The opinions expressed in this blog are author's and don't necessarily represent Gallop's positions, strategies or opinions.

Leveraging Selenium Grid in Public/Private Cloud

Leveraging Selenium Grid in Public/Private Cloud

Selenium-Grid is a method of testing using Selenium that enables simultaneous testing on different devices running different operating systems and browsers; basically a number of machines running multiple tests in parallel. Selenium Grid has two versions at the moment – Grid 1 and Grid 2 – but the newer Grid 2 is now more widely used. It has been designed to follow a hub and node fashion, where a single device known as the hub runs the test, and the nodes are constituted of various other machines that do the execution. Selenium-Grid supports distributed test execution.

When should one use Selenium-Grid?

Usually, there are two reasons for using Selenium-Grid.

  1. To run tests against multiple browsers (even varying versions of the same browser) running on different operating systems on different devices.
  2. To significantly reduce time consumed for a test suite to complete a test pass.

A Selenium-Grid is extremely useful for reducing time on large and long-running test suites by executing the test pass on multiple machines at the same time, thereby dividing the time consumed by the number of machines used. This allows teams using Agile software development to receive test feedback faster. As mentioned earlier, another feature is being able to run tests on multiple environments (browsers, browser versions, machines, operating systems) at the same time.

Since the core idea is to run automated tests with Selenium, the ability to scale your testing is paramount. Therefore, organizations look to build a local infrastructure that can help scale their testing or be able to test against more browsers or operating system platforms. The infrastructure, however, comes at a significant cost, and so becomes cumbersome to maintain. A large organization can afford to run such a setup, which offers its own benefits, such as control over the system, and greater efficiency. But the downsides are high setup costs and getting fault positives because of infrastructure malfunctions.

The alternative is to implement a public/private cloud service to help scale up test suites.

Selenium Grid

Clouds and Selenium-Grid

Using a public/private cloud enables the use of Selenium-Grid on the cloud, thereby entirely eradicating the need for any infrastructure and ensuing maintenance costs. A cloud-based testing bed is much more convenient to implement as depending on the cloud service provider one can immediately gain access to a large number of browser and operating system platforms to be able to test one’s mobile and web applications. Clouds are available for use throughout the day and help substantially increase developer productivity. Also, the use of a cloud provides various feedback mechanisms such as logging, screenshots and video support, thereby appreciably reducing debugging times.

Some of the benefits of using the cloud are:

  1. Support for any new testing platform or updates for existing ones is almost immediate. In the case of using actual infrastructure it could take weeks or months to source the required hardware to run tests depending on the testing platform – for example, a new operating system for a mobile device. But the cloud is updated almost instantly with the latest platforms that hit the market, be it a new browser version or support for a new type of device.
  2. Another feature of a public/private cloud is the ability to scale testing based on one’s specific requirements. It is up to you if you wish to choose to test against 10 or 50 browsers at the same time. The cloud is usually on standby and will create Virtual Machines based on your requests and needs.
  3. As already mentioned before, debugging becomes appreciably easier. Screenshots and videos are recorded at every step, so with this kind of visual information it becomes much easier to pin-point a test failure instead of having to wade through a complex Selenium log.

The only downside to using a cloud is that since one has to use the internet the use of a cloud is usually much slower as compared to a local grid, because the test has to travel to and from the cloud via a network that might not always be reliable. This issue can be worked around by running many parallel test runs, which shortens the overall testing time.

* On June 1, 2015, SeleniumHQ labeled Gallop Solutions as an Silver Level Sponsor on their official website, This recognition confirms Gallop’s position as a specialized software testing service provider, committed to making sure clients get value from their QA investments. Contact Gallop for you Selenium Test Automation needs.

The opinions expressed in this blog are author's and don't necessarily represent Gallop's positions, strategies or opinions.

Challenges and Solutions in Managing Selenium Test Automation Projects

Challenges and Solutions in Managing Selenium Test Automation Projects

Selenium is a well-known open source testing tool, which provides a robust set of tools that supports rapid development of test automation for web-based applications. It provides a vast set of testing functions designed to fit the needs of testing web applications. Operations in Selenium allow many options for locating UI elements and methods to compare expected test results with actual real-world application behavior. It also supports almost all web browsers to run test cases and also supports many different programming languages to help create or modify test scripts. Languages such as: Java, Ruby, PHP, .Net, C#, Perl, etc.

Challenges faced using selenium automation testing, and how to solve them

Selenium at times fails to function correctly if a dynamic event or change takes place during the test cycle. A few common problems faced are listed below, along with how to mitigate them with selenium test automation.

  1. Dealing with pop-up windows: Selenium can sometimes fail to record common popups in web apps. To handle any kind of alert popup, you can apply a getAlert function. Before actually running the script, you must import a package that can generate a WebDriver script for handling alerts. The efficient interface brings with it the following commands: void dismiss(), void accept (), getText(), void sendKeys(String stringToSend). The first two basically click on the “cancel” and “OK” buttons respectively on a popup window.
  2. No event trigger from value changes: Because Selenium does not initiate events with a change in values, one must do it oneself using fireEvent: selenium.FireEvent(cmbCategory, “onchange”);
  3. Timeout resulting from synchronization problems: One should ideally use selenium.IsElementPresent(locator) to verify that the object is in a loop with Thread.Sleep
  4. Testing Flash apps: To automate flash apps with Selenium, one can use Flex Monkium. The application source code must be compiled with the swc files generated by Flex Monkium. Then the app and the Selenium IDE are connected, and the tests can be recorded with IDE.
  5. Unexpected error launching Internet Explorer. Browser zoom level should be set to 100% by default for the IE browser to overcome this error
  6. Protected Mode must be set to the same valueerror occurs when trying to run Selenium WebDriver on a fresh Windows machine. This issue can be fixed by using capabilities as below when launching IE

DesiredCapabilities caps = DesiredCapabilities.internetExplorer(); caps.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true); WebDriver driver = new InternetExplorerDriver(caps);

* On June 1, 2015, SeleniumHQ labeled Gallop Solutions as an Aluminum Level Sponsor on their official website, This recognition confirms Gallop’s position as a specialized software testing service provider, committed to making sure clients get value from their QA investments. Attending Selenium Conference 2015 at Portland, Oregon on Sep 8-10th 2015? Schedule a meeting with us.

The opinions expressed in this blog are author's and don't necessarily represent Gallop's positions, strategies or opinions.

How to Succeed with Selenium: Open Source Test Automation Tool

How to Succeed with Selenium Open Source Test Automation Tool?

In software development, it is a common practice to adopt test automation, once the software completes the stable phase of manual testing. Every organization thinks of automated testing as a way to cut down manual testing costs. The cost of testing is significant for any software project and organizations are keen to invest in open source testing tools than expensive commercial testing suites. There are varieties of open source testing tools available online, but this blog explores factors to succeed with the open source web automation tool – Selenium.

Why Selenium Testing

Selenium is one of the popular automated website testing tools available online and is used to test GUI and functionality of the website. Selenium is easy to get started with and any novice tester can handle it with minimum difficulties. Here are more reasons to select Selenium:

  • Selenium can run on any mainstream browser.
  • Selenium supports tests in many languages such as JAVA, C#, Python, Ruby, Perl and more.
  • Selenium can be operated on your local computer, a third-party cloud server, on a server (with selenium remote) and on set of servers (with selenium grid).
  • Selenium allows testers to write their own tests and run them across multiple browsers.

However, here are certain things to keep in mind when you decide to go with Selenium:

  • Clear Understanding of Vision and Scope of Testing
    A thorough preparation is needed to succeed with Selenium. First of all you need to chart out a testing strategy and for that you need to outline following basics regarding the application– your revenue model, expected user behavior with application and type of browsers they might use and problems experienced with the application.
  • Select An Appropriate Programming Language for Test Automation
    Selecting an appropriate programming language for writing acceptance tests for your website or application is a very important step to consider. It is always a best practice to consult with your application development team and understand their experiences and proficiencies with a particular language. A point to remember: functional knowledge of a chosen language is critical to evaluate the appropriateness of automated tests.
  • Pick an Appropriate Text Editor
    In order to succeed with tests, you need to select an appropriate text editor. If you are a new tester and inexperienced with text editors, it is better to stick with something as basic as Sublime Text editor.
  • Features of a Good Acceptance Test
    While creating new acceptance tests, you should keep these things in mind – tests should be descriptive, autonomous, atomic, should cope up with a test runner and should adhere to version control. Ensure that you create resilient test cases that specify an action or the time.
  • Make it Robot and Human Friendly
    It is important to follow a simple testing architecture that is accessible to robots and humans as well.

    • Simplify test code with set up and tear down actions
    • Create a new spec file and store your tests in it
    • Follow simple tagging
    • Reporting – Junit, XML output (for robots) and screenshot, logs, videos for humans)
  • Scaling
    You can scale automated tests through cloud execution, continuous integration and parallelization.

If you are skeptical about the success of selenium automated tests, Gallop consultants can work with your team to maximize your productivity and returns with automated selenium tests.

Gallop has developed Gallop Test Automation Accelerator Kit (GTAAK) that offers tool agnostic framework, reusable object library as well as guidelines on best practices for automation. Get in touch with experts at Gallop to know more about Selenium Testing.


The opinions expressed in this blog are author's and don't necessarily represent Gallop's positions, strategies or opinions.