VMware Communities
admin
Immortal
Immortal

Introduction to Selenium

Introduction

What is automation testing?

Test automation has grown in popularity over the years because teams do not have the time or money to invest in large test teams to make sure that applications work as they are expected to. Developers also want to make sure that the code they have created works as they expect it to.

Developers use a multitude of different testing frameworks to test different aspects of the system. Selenium is one of the most well?known testing frameworks in the world that is in use. It is an open source project that allows testers and developers alike to develop functional tests to drive the browser. It can be used to record workflows so that developers can prevent future regressions of code. Selenium can work on any browser that supports JavaScript since Selenium has been built using JavaScript.

Software applications today are written as web?based applications to be run in an Internet browser. The effectiveness of testing these applications varies widely among companies and organizations. In an era of highly interactive and responsive software processes where many organizations are using some form of Agile methodology, test automation is frequently becoming a requirement for software projects. Test automation is often the answer. Test automation means using a software tool to run repeatable tests against the application to be tested. For regression testing this provides that responsiveness.

What is the use of automation testing?

  • There are many advantages to test automation.
  • Most are related to the repeatability of the tests and the speed at which the tests can be executed.
  • There are a number of commercial and open source tools available for assisting with the development of test automation.
  • Selenium is possibly the most widely?used open source solution.
  • Frequent regression testing
  • Rapid feedback to developers
  • Virtually unlimited iterations of test case execution
  • Support for Agile and extreme development methodologies
  • Disciplined documentation of test cases
  • Customized defect reporting
  • Finding defects missed by manual testing

What we need to automate?

It is not always advantageous to automate test cases. There are times when manual testing may be more appropriate. For instance, if the application’s user interface will change considerably in the near future, then any automation might need to be rewritten anyway.

When automation is not recommended:

  • Sometimes there simply is not enough time to build test automation.
  • For the short term, manual testing may be more effective.
  • If an application has a very tight deadline, there is currently no test automation available, and it’s imperative that the testing get done within that time frame, then manual testing is the best solution.

What is selenium?

Selenium is a robust set of tools that supports rapid development of test automation for web?based applications. Selenium provides a rich set of testing functions specifically geared to the needs of testing of a web application. These operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behaviour.
Selenium: Selenium is a suite of tools to automate web app testing across many platforms. Selenium…runs in many browsers and operating systems. Can be controlled by many programming languages and testing frameworks.

  • Create by developers at ThoughtWorks
  • Released publically as an Open Source project on OpenQA
  • Selenium is a test tool for web applications.
  • Selenium tests run directly in a browser.
  • Runs on Windows, Linux, and Macintosh.
  • Runs in Internet Explorer, Mozilla and Firefox.
  • Enables Browser Compatibility Testing.
  • Enables System Functional Testing.

How it works:

  • Uses JavaScript and Iframes in the browser
  • Core runs the tests and interrogates the DOM
  • RC server and Core communicate via AJAX
  • Language hooks communicate with the RC server.

Advantages of selenium

Below are the advantages of selenium

  • Open source, Free software
  • Easy Installation
  • Easy Record and Play back
  • Supports Multiple operating systems
  • Supports Multiple Browser Testing
  • Can convert scripts in to other languages (Java, C#, Python, Pearl etc…)
  • Esay to learn
  • Script once, Run on multiple browsers
  • Testing tool for browser?based testing of web applications. It can be used both for functional, compatibility (it has extensive cross?browser support) and regression testing.

Selenium is the best open source tool for doing automation for web based application and it does not have any cost attached to it. The only cost is the effort which will go for designingand developing the script for the application.There are Huge Openings in selenium because companies are trying to migrate from QTP or commercial tools to Selenium – Open source tool.
There are a set of Selenium tools which when combined provides you the power to automate simple to complex web application.

What is the difference between selenium and qtp

S.NoSELENIUMQTP
1Open sourceCommercial
2Works on all OSWorks on Windows only
3Tests only Web applicationsTests web and desktopapplications
4Code can be converted to any one of languages such asJava, C#, Ruby, Python, pearl, php etcUses VB script
5No object repositoryHas got an object repository
6IDE sometimes does not record some fieldsRecording is a little reliableevents
0 Kudos
0 Replies