Test Automation for Web Applications and Introducing Selenium

Many software applications today are written as web-based applications to be run in an Internet browser. The effectiveness of these applications varies widely among companies and organizations. Automated tools are becoming more important for many software projects in order to verify key functionality, test for regressions in a short period of time.

Test automation is the use of special software (Separate from the software being tested) to control the execution of tests and comparison of actual outcomes with predicted outcomes.

There are many advantages to test automation. Most are related to the repeatability of the tests and speed at which the tests can be executed. There are number of commercial and open source tools available for the development of test automation. Selenium is possibly the most widely used open source solution.

Test automation has specific advantages for improving the long-term efficiency of a software team’s testing processes. This supports:

  1. Frequent regression testing
  2. Rapid feedback to developers
  3. Virtually unlimited iterations of test case execution
  4. Support for Agile and extreme development methodologies
  5. Disciplined documentation of test cases.
  6. Customized defect reporting
  7. Finding defects missed by manual testing
  8. Avoids user boringness.

Is automation always advantageous?

It is not always advantageous to automate test cases.  For short term, manual testing may be more appropriate. If the application’s user interface will change considerably in the near future, then any automation might need to be rewritten anyway. If an application has a very tight deadline there is currently no automation available then manual testing is the best solution.

Introducing Selenium

It is a set of software tools each with a different approach to support test automation. It provides many options for different automation problems. Also, this allows many options to locate UI elements and compares expected test results against the actual application behavior. Selenium is an open source automation tools for testing different types of web applications. One of the key features is the support for the execution of one’s tests on multiple browsers. It was released under apache 2.0 license.

selenium

Components of Selenium

  1. Selenium IDE (Integrated Development Environment)
  2. Selenium RC (Remote Control)
  3. Selenium Web driver
  4. Selenium Grid

What tests can be done by selenium?

Mainly selenium is used for functional, regression and load/stress testing for web applications.

Advantages of Selenium

  1. It is freely available in net (Open source).
  2. Installation of selenium software is easy.
  3. Record and playback feature is available.
  4. It supports multiple OS.
  5. It runs on multiple browsers.
  6. It has a feature like converting scripts into other language like java, c#, python, Ruby etc, so it is a language independent tool.
  7. It supports the projects which are developed using agile methodologies.
  8. Easy access of test results.

Disadvantages of Selenium

  1. This is not suitable for client-server applications.
  2. Complete setup of selenium is somewhat difficult.
  3. Testers need some programming knowledge to use this tool.
  4. Boring error analysis.

Programming languages supported by selenium:

Java, Javascript, PHP, C#, Perl, Python and Ruby.

Browsers supported by selenium:

Firefox Chrome, Safari, Opera and Internet Explorer.

Operating systems supported by selenium:

Windows, Linux, Mac, Solaris and supports almost every browser out there.

Most of the QA engineers focus on the one or two tools that most meet the needs of their projects. This can be easily available by this tool.

Selenium IDE(SIDE – Selenium Integrated Development Environment).

  • Selenium IDE is a prototyping tool for building test scripts. It is a Firefox add-on and provides an easy-to-use interface for developing automated tests.
  • Selenium IDE has a recording feature, which provides user actions as they are performed and then exports them as a reusable script in one of many programming languages.

Advantages of using Selenium IDE:

  1. Record & Playback mechanism is used to create & execute the test cases.
  2. Once the script is generated using one language, then it can be exported in different languages like Java, C#, PHP and Python etc.
  3. Easier debugging with step-by-step break points.

Disadvantages:

  1. Even though selenium IDE has a “save” feature that allows users to keep the tests in a table format for later import & export execution, It is not designed to run all test passes nor it is possible to build all the automated tests the user will need.
  2. It doesn’t provide any iterations or conditional statements for test scripts.
  3. It requires some programming language.
  4. It supports only firebox browser.

Documentation:

Refer http://www.seleniumhq.org/docs/

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *