Introduction to Selenium
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.
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:
- 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
|2||Works on all OS||Works on Windows only|
|3||Tests only Web applications||Tests web and desktopapplications|
|4||Code can be converted to any one of languages such asJava, C#, Ruby, Python, pearl, php etc||Uses VB script|
|5||No object repository||Has got an object repository|
|6||IDE sometimes does not record some fields||Recording is a little reliableevents|