Thursday, November 3, 2011

What is Selenium?, Benefits of Selenium, Configure Selenium

What is Selenium?, Benefits of Selenium, Configure Selenium, Selenium Notes, Examples, Videos.By www.laxmiroy.blogspot.com/


What is Selenium?

_______________________________________
Selenium is an open source automation testing tool for automating web based applications. It can only automate web based applications. It works on multiple browsers and multiple operating systems. Being open source and very strong in nature, demand for this tool is increasing. It is also helpful if you want to distribute/scale your test cases accross multiple platforms.

Benefits of Selenium
________________________________________
- Open source
- Works on multiple browsers Mozilla,
  Chrome, IE, Opera, Safari
- Works on multiple Operating Systems
- Supports many languages
- Tests Ajax Applications
- Tests Flash Applicatons
- Can do Database Testing
- Multiple test frameworks are supported
- Can be used for Functional and UI testing

Download and Configure Selenium
________________________________________
There is nothing known as installing selenium.
Selenium is always configured. You need to download the jars of selenium from the selenium website. After downloading the jar files, you need to open eclipse, create a new eclipse project and add the selenium jars into that project. Jar files for selenium RC and Selenium Webdriver are different.

Selenium RC
________________________________________
Selenium RC is the older version. It has been officially depricated. It can be used to implement test cases across multiple browsers. It has an interface called Selenium whose methods are used to perform operations on browsers and test web applications. Although it is old but still many companies use RC as their automomation frameworks have been developed using Selenium RC. You need to start selenium server in order to work with Selenium RC. Starting and stopping the selenium server causes alot of overhead.

Selenium 2 or WebDriver
________________________________________
Selenium 2 or Webdriver is the new version of Selenium. Its architecture is completely different from RC. Its not necesary that you need to learn RC in order to learn Webdriver. But Webdriver supports RC code. Unlike RC, there is no server in Webdriver.

What is Selenium IDE
________________________________________
Every automation tool has a record and run functionality. Selenium IDE is used to record and run web applications. It gets installed as an add-on on mozilla and works only on mozilla. IDE cannot work on browsers other than mozilla. Thats why RC or webdriver is used. Many testers have a misconception that IDE can just record and run. But there is a lot more than simple record and run in IDE. We can write our own extensions and implement loops, if statements, use arrays, parameterize test cases. All this is done with the help of user extensions. One needs to know Javascript in order to do this because the core engine of IDE is javascript based.

What is Selenium GRID
________________________________________
Selenium GRID can be used to run Selenium test cases parallelly accross multiple machines or parallelly on a single machine. It saves time and one can use multiple browsers as well to execute Selenium tests parallelly.

Selenium Flex Testing
________________________________________
Both selenium RC and selenium Webdriver can be used for flash/flex application testing. Procedure is same for testing flash and flex applications using selenium. FlashSelenium API in Selenium RC helps us to test flash/flex based applications using RC. While in webdriver, you need to make your own custom Javascript Execution functions in order to test flash applications using Selenium. But in order to test such appications, you need to make sure that you have the access to source code of the application. This means that you cannot just go and test any flash application present on the internet.

Junit Selenium
________________________________________
Junit is a framework for unit testing. When implementing Selenium Test cases using RC or Webdriver, you can implement using Junit. It is a very powerful testing framework and provides us with features like report generation, batch running, skipping tests etc. Selenium along with Junit and ANT can generate very good Selenium test reports in HTML. You can write the code without using Junit as well but Junit provides features which make our task very easy. Features like running multiple test cases in differnt suites in a particular order, test reports, annotations etc

TestNg Selenium
________________________________________
TestNg is getting very famous with Selenium. Similar to Junit its also a testing framework. Its very easy to use TestNg with Grid and run the test cases parallely. Testng XSLT reports are very famous and are easy to generate. When we use combination of Testng Selenium and ANT, we generate these reports.

Selenium with ANT and Maven
________________________________________
ANT is a tool which can help you run Selenium test cases through command prompt or on Unix or Linux servers. It is a very Strong tool by apache ANT. Maven is used to maintain the verions of jar files in your selenium framework.

Selenium Continuous integration
________________________________________
Continuous integration can be done in Selenium with the help of many tools like SVN, Hudson etc. These tools can help in version management and maintaining your Selenium builds over a period of time. They also help other team members to update their systems with the latest code.

No comments:

Post a Comment