Overview of Selenium Architecture
Selenium Automation Framework for web application testing comprises of four components, namely Selenium IDE, Selenium RC, Selenium WebDriver and Selenium Grid. Any or combination of these components can be used for the implementation of the automation testing process on a web-based application, on any browser application. The Testing flow is carried out by scripting the test cases using a programming language that should include all features like fetching the data, capturing the web elements, addressing the link text, navigating through the web application, etc.
The four main architecture of Selenium are listed below –
- Selenium IDE
- Selenium RC
- Selenium Webdriver
- Selenium Grid
1. Selenium IDE or Integrated Development Environment
It can be implemented as an extension of Firefox. No programming logic is required to write test scripts in IDE as it allows you to simply record the events occurring as a result of your interactions with the browser along with the playback, editing, and tests debugging functionalities. All of the recording and playback is allowed to run in an actual environment.
2. Selenium Remote Control
The role of a server here is in launching and killing the browser, receiving and verifying HTTP requests made between the browser and the application under test, interpreting and executing the Selenese commands passed by the test program, and also acting as an HTTP proxy. The Client Libraries, however, act as an interface between the Selenium RC server and different programming languages being used.
The methodology of the Client-Server architecture of RC, with Selenium RC between the Automation Suite and AUT(Application Under Test), makes the execution of scripts slower. This is taken care of by the Selenium Webdriver as it communicates directly to the AUT and makes use of the browser’s natural compatibility to automation without the requirement of any server.
3. Selenium WebDriver
It is the most popular and important component of Selenium. It is one of the most popular automation tools on which presently several Automation Engineers rely. The tool is an “Open Source tool”, i.e; it is available for free.
WebDriver is an improved version of Selenium RC extending its support to different browsers and platforms, unlike Selenium IDE. The execution of test scripts does not require any Selenium server to be started, unlike the Selenium RC. Selenium Webdriver is basically a web-based test automation tool API that is easy to understand and use. It also supports the testing of dynamic web pages. Selenium Webdriver helps in creating and maintaining the test scripts in a very simple way as it is not linked to any test framework or tool. This makes it easy to integrate with any open-source tools like Junit, TestNG, etc., as per our knowledge, requirement, and usage.
4. Selenium Grid
It is one of the components of the Selenium Suite, which supports the execution of multiple test scripts across various different browsers or operating system or machines. After specifying the operating system of your choice along with the browser and the browser version, the selenium grid can be easily connected with the Selenium Remote. These values can only be specified based on the capabilities of the Selenium Remote being used.
Hub and nodes are its two main components. To be able to use the Selenium Grid tool, the very first step to perform is creating a hub. After a hub is created, several different nodes can be connected to this hub. The test scripts are executed in the node. The function of the hub, however, is to make sure the test will end up correctly on the specifications provided, such as the details of the machine, operating system and the browser specified in your test.
To conclude, Selenium is basically a suite of tools, namely, IDE, a Firefox extension that allows record and playback features. The record/playback feature is limiting and only available for Firefox, so the second tool is the RC with Webdriver(third tool) as its extension that provides APIs in different languages and browser compatibility. At last, the Grid is responsible for making parallel execution of scripts in different browsers and machines possible.
This has been a guide to Selenium Architecture. Here we discuss the introduction to of selenium with the top 4 architecture components. You can also go through our other suggested articles to learn more –