Category Archives: Selenium Testing

Benefits of Using Selenium Testing Tools over QTP

QTP

QTP is a functional testing tool having the feature for storing screenshot of every page navigated at the time of execution. Therefore, it can be used as an evidence for completion of testing, and also you can refer the screenshots of earlier executions if there is any requirement to refer them. Test report can be written automatically to a customized report page that will confirm accuracy of the report and also it can enhance the report’s look and feel.

Advantages of Using QTP

  • User friendliness and a little effort for script creation.
  • Advanced solution for regression test and functional test automation.
  • Meets the requirements of both non-technical and technical users.
  • Easy configuration and many inbuilt functionalities by default.
  • Automation scripts are performed within specific interval of time by means of task scheduler or crone job.
  • Easily integrated with test administration tools such as QC.
  • Outstanding object identification process or mechanism.

Disadvantages of QTP

In current economic crisis, software companies are planning for efficient productivity as well as cost reduction. QTP is losing its market owing to the following limitations:

  • Runs in Windows environments only.
  • Unable to test with all types and versions of browser.
  • Restricted to smaller testing teams or organizations.
  • High licensing as well as add-inns costs.
  • Slow in execution as compared with open source tools.

Selenium

Selenium Testing has four variants that can be used in combination or in isolation to create a full automation suite for your web applications.

  1. Recording or Creating as well as enhancing scripts – Selenium IDE
  2. Cross browser testing – Selenium Web Driver (API)
  3. Executing scripts – Selenium Remote Control (RC)
  4. Cross platform testing – Selenium Grid

Advantages of Using Selenium:-

  • Powerful and simple document object model (DOM) level testing can be used for constant combination with agile projects.
  • Has great flexibility and extensibility, with its tight integration with the browser unmatched by proprietary tools that are available.
  • Supports different browsers, for instance, Firefox, Internet Explorer, Opera or Safari on Linux, Windows and Mac OS X.
  • NET, JAVA, Perl, Ruby, PHP and other Object Oriented Programming languages.
  • Offers the option of using various IDEs such as Netbeans, Eclipse, Visual Studio etc. depending on the selection of development language.

Disadvantages of Selenium

  • Doesn’t support uploading files from local machine
  • Doesn’t support the windows application
  • Supports only application based on browsers
  • Offers only one-sided support for dialog boxes
  • Selenium being an open source has no official technical support

Comparison

There are many comparisons between the features of Selenium and QTP. Selenium only supports web applications. QTP supports client server applications only (e.g. built in TCL or TK and PowerBuilder). For Selenium it is portable and open source where as for QTP it is costly and licensed. The price of ten user license is around 60L. From the standpoint of UI object storage and management, For Selenium it is managed applying UI-Element user properties and extension. For QTP, it is a set of dynamically loaded libraries stored in the Java archive file.

Conclusion

Applying Selenium as the Functional Test Automation Tool can help you reduce the cost brought upon yourself for licensing using QTP. In the initial stages, the efforts required to script for Selenium raised by about 15% than QTP. Once all the solutions are ready the efforts of automation using QTP and Selenium were almost the same.

However, to conclude, we can say that Selenium is more beneficial than QTP so far as flexibility and costs are concerned. In addition, it allows you to run tests parallel, where as in QTP you are only allowed to run tests in sequence.

How Selenium Testing Scripts Can Be Performed on Different Browsers?

Many, almost every software application, at present, are written as web-based app which can run in an internet browser. The efficiency of testing these apps differs greatly among organizations and companies. In the period of highly responsive and interactive software procedures, where many companies are relying on Agile methodology, test automation is becoming a necessity for software projects. Test automation indicates using a software tool to perform repeatable tests against the app to be tested.

To ease the task powerful automation tools are coming up in the market like Selenium, as most of the softwares developed today are Agile adopted and browser based. There has been a massive progress in the features of Selenium that focuses on easy- to- use, competent GUIs and can meet the requirements of most app testers by 90% or more. Selenium holds the top position in the software market with these features:

  • Powerful and simple DOM (Document Object Model) level testing, can be employed for nonstop integration with Agile projects
  • Supports numerous browsers like Fire Fox, Safari, Internet Explorer, or Opera on Linux, Mac OS X and Windows
  • Great flexibility and extensibility, tight integration with browser, unmatched by on hand proprietary tools
  • Wires OOP (Object Oriented Programming) languages such as Ruby, JAVA, PHP, .NET, Perl, etc.

Components of Selenium  

There are 4 variations of Selenium, which can be combined or used individually to develop a complete automation suite for web apps. These are:

  • Selenium IDE –Enhancing , creating or recording scripts
  • Selenium Remote Control (RC)– implementing scripts
  • Selenium Web Driver (API) – multiple browser testing
  • Selenium Grid – Cross platform testing

Choosing the right tool

Several people start with Selenium IDE. If if you have no prior experience with scripting or programming language, it is better to use Selenium IDE to familiarize with Selenium commands. By making use of IDE, you can perform simple tests swiftly, sometimes within few seconds.

However, to use Selenium effectively, you will be required to build and run tests by using Selenium 1 or Selenium 2 by combining one supported programming language. So, it is solely on you to decide which one to pick.

While writing, the Selenium developers are setting up on the Selenium WebDriver API. For backward compatibility, Selenium 1 is used. Still, both have weaknesses and strengths which can be figured out at the time of testing.

Activities to be performed during testing

  • Collect the working flows from clients
  • Preparing for test and Selenium framework plan
  • Assign talented resources and offer sufficient training to the new resources
  • Setting up for software installation and test environment
  • Create test scripts with Selenium IDE by using XPath method
  • Use Eclipse to convert scripts
  • Perform every test in Selenium RC using Eclipse as IDE by Batch Scheduling
  • Use WebDriver to run multiple scripts
  • Perform all the tests for each build and multiple builds, every day
  • Reuse test scripts with fewer modifications like revising scripts for every build
  • For speedy actions, generate HTML reports and share it with the team

Areas to be focused while testing

While performing the test, few areas need extensive concentration. These are:

  • Selenium tests as a segment of each build
  • Depending on build release, execute acceptance tests in regression test suite
  • Find bugs in the earlier stages and address the risk of removing bugs in the cycle, later
  • Test the existence of static UI elements
  • Focus on every navigation links to missing pages or broken links
  • Test the functions of input page that comprise of several input fields, check boxes and buttons. Some of these are Account Setting, User Profile, etc.
  • Test dynamic elements with different HTML Ids
  • Execute test in multiple browsers like IE, Chrome, Firefor, etc.
  • Test dynamically varying UI elements like RSS feeds, animation, etc. without having to reload the web page.

It is recommended that those who are new to selenium, and are developing a new test suite from the scrape, it is a good choice to go with Selenium 2, because this variation of Selenium will be supported in the upcoming years.