Selenium is an open source automation testing tool for automating web-based applications. It can only automate web based applications. It work on multiple browsers and multiple operating systems. As its open source and very strong in nature, demand for Selenium tool is increasing day by day. It is also helpful if you want to distribute/scale your test cases across multiple platforms.
Benefits:
- Open source
- Works on multiple browsers like Mozilla,Chrome, IE, Opera, Safari
- Works on multiple Operating Systems
- Supports many languages
- Tests Ajax Applications
- Tests Flash Applications
- Perform Database Testing
- Multiple test frameworks are supported
- Can be used for Functional and UI testing
Download and Configure Selenium:
Good question. Well... there is nothing 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.
Note: Jar files for selenium RC and Selenium Webdriver are different.
Selenium RC:
Selenium RC is now older version. It has been officially deprecated. 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). The main drawback of Selenium RC is you need to start and stop the Selenium RC every-time when you use it. 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 necessary that you need to learn RC in order to learn Webdriver. But Webdriver supports RC code. Unlike RC, there is no server in Webdriver.
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 as it is plug-in of Mozilla Firefox. The core engine of IDE is JavaScript based.
Selenium GRID:
Selenium GRID can be used to run Selenium test cases parallel across multiple machines or parallel on a single machine. It saves time and one can use multiple browsers as well to execute Selenium tests parallel.
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 different 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 parallel. Tesng XSLT reports are very famous and are easy to generate. When we use combination of Testng Selenium and ANT, we generate these reports.
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 applications, 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.
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 versions of jar files in your selenium framework.
No comments:
Post a Comment