APPIUM-VS-SELENIUM

What is Selenium?

Selenium is an open-source automation testing tool for automating tests carried out across different web applications and platforms. It is best suited for testing functional and regression test cases.

Architecture/Elements

There are four components of Selenium Architecture :

  • Selenium client library

It is the storehouse where the language used in writing the Selenium framework is stored. Selenium has language bindings to support multiple programming languages such as Java, Ruby, Python, etc.

  • JSON wire protocol over HTTP

JSON is an acronym for JavaScript Object Notation. It serves as a data exchange channel between a server and a client on the web. JSON Wire Protocol is a REST API which transfers information between the HTTP server.

  • Browser drivers

For every browser, there is a separate browser driver. This driver communicates with its browser without revealing the internal logic of the browser functionality. Each browser driver (e.g., FirefoxDriver, Chrome Driver, etc.) has its HTTP server.

  • Browser

Selenium works well with multiple browsers such as Firefox, Chrome, Safari, etc. It also supports some of the non-conventional or rare browsers like HTMLUnit.

Programming languages

Selenium is great for cross browsing, whereby test cases run across multiple platforms simultaneously. It’s test scripts can be written in a diverse amount of programming languages such as Java, C#, Ruby, Python, etc. It is also supported across multiple platforms such as Linux, Windows, Mac OS, Solaris, and they work well across different browsers like Firefox, Mozilla, Safari, Chrome, Opera, etc.

Beginner Guide: Automation Testing Execution and Report for Beginner

Testing capabilities

Selenium has a suite of tools that caters to different testing needs. These tools allow testers to validate their web applications for cross-browser compatibility on mobiles and desktop using automation. They are:

  • Selenium IDE

Selenium IDE (Integrated Development Environment) is the simplest framework in the suite. It is a Firefox plugin that can only be used in creating simple test cases and suites. while also allowing for recording and playback of test scripts.

  • Selenium RC

Selenium RC refers to Remote control (it is officially deprecated and merged with Selenium WebDriver to form Selenium 2). It allows testers to write automated web applications UI Test in any supported programming language of choice. It also involves a proxy HTTP server that enables the browser to believe that the web application under test comes from the proxy server’s domain.

  • Selenium Webdriver

Selenium Webdriver is an automation framework implemented through a browser-specific driver that it communicates with and has total control. The framework accepts commands and sends them to a browser. Webdriver also supports different operating systems (Window, Linus, MacOS, etc.), browsers (Firefox, Chrome 12.0.712.0 and above, Safari, etc.), and programming languages (Java, Phyton, PHP, etc.)

  • Selenium Grid

Selenium Grid is a tool that is paired with Selenium RC. It allows testers to run multiple tests across different machines against different browsers in parallel. It relies on the hub-and-nodes concept to achieve parallel execution of the test scripts. The hub acts as a central source of Selenium commands to each node connected to it.

What is Appium?

Appium is an open-source, cross-platform automation testing tool. It is used by the majority of mobile applications (iOS or Android), native apps, and hybrid apps.
Appium recently released a GUI-based desktop application that can be installed across a spectrum of Linux distributions, Microsoft Windows and MAC OSx.

Architecture/Elements

Appium is an HTTP server written in Node.js programming language. The Appium server receives HTTP requests from the client libraries in JSON format. These requests are handled in different ways, depending on the platform it is running on.
There are 3 components in Appium architecture :

  • Appium Client

This refers to the automated scripted codes. The code can be scripted in any programming language (Java, Phyton, PHP, etc.)
This script holds the configuration details of the mobile device and the application. Also, the code to run the test cases of the application are scripted.

  • Appium Server

Appium server is written using Node.js programming language. It receives signal and command requests from the Appium client in JSON format and carries out mobile devices’ command.
The server interacts with different platforms such as iOS and Android.

  • End Device

This imitates a real-time mobile device or an emulator. It allows for the execution of automation scripts by the server through the command of the user.

Programming languages

Appium also supports the use of multiple programming languages, e.g., Java, Python, PHP, Perl, etc. Therefore, testers can use any programming language they are comfortable with when writing test scripts.

Testing capabilities

Most of Appium’s testing use is in its cross-platform capability.
Appium can be used to test mobile applications (whether they run on iOS or Android), native, hybrid, and web applications. It also runs on different OSs like Windows, Linux, and MAC.

Learn more about mobile testing: Top 30 Mobile Testing Interview Questions and Answers 

Appium and Selenium Frameworks for Automation Mobile Testing

Appium-and-Selenium-frameworks-for-automation-mobile-testing

Appium is a powerful mobile automation testing framework that can be used for all native, hybrid, and mobile web apps for iOS and Android. Appium derives its roots from Selenium to carry out tests. It uses the JSON wire protocol internally to communicate with iOS and Android applications using Selenium’s WebDriver.
Appium starts tests on the device and receives commands from the Appium server, which is the same as the Selenium server that gets HTTP requests from Selenium client libraries.

The Differences between Appium, Selenium, and Katalon Studio – Top-Choices Automation Tools 

CATEGORIES Selenium Appium Katalon Studio
Usability  It is used for web application testing but cannot automate desktop applications It is used for mobile application testing (iOS and android) and desktop applications It is used for all testing needs ranging from mobile testing to web testing, desktop application testing, and API testing.
Testing objectives It makes web applications testing easier Mobile web applications, native, and hybrid applications Mobile apps, Windows, and Linux testing platforms.
Programming skills  The advance programming skill is necessary Not required unless for advanced test scripts Not required unless for advanced test scripts
Integration ability It supports various CI tools such as Jenkins, and Cruise Control Also supports Various CI tools such as Jenkins and Travis  It supports popular CI tools like Jenkins and Jira
Built-in keywords Users build keywords on their own Users build keywords on their own A pre-defined set of common keywords or actions

Conclusion

Appium and Selenium are cross-platform automation frameworks. However, while Appium focuses on mobile application testing, Selenium focuses on web applications. This article explains the architecture, programming language, and testing capabilities of the automation testing tools. We hope this article enlightens you on the similarities and differences between Appium and Selenium. With this knowledge, you will be able to choose which suits your test automation project better. 

Guide for beginner: “A Step-by-Step Guide to Build and Execute An Automation Strategy