VST

Test Automation

Selenium Python with ROBOT Framework Test Automation

Summary:

  1. Robot Framework is an open-source, keyword-driven test automation framework used for acceptance testing, acceptance test-driven development (ATDD), and robotic process automation (RPA.)
  2. Robot Framework (Robot Framework supports) can be used for several applications like Web Applications, Desktop Applications, Mobile Applications, API test automation, etc.

Usage:

1. Web Application UI Test Automation with Robot framework:

  1. Robot framework follows the keyword-driven test approach and it is easy to understand, various custom keywords can be added as per the requirements(e.g., auto wait synchronization, integration with multiple libraries like Selenium Library, Appium Library, Playwright Library, SSH Library)
  2. Python is used as a programming language for Robot Framework and it is easy to create custom keywords using Python programming.
  3. Robot framework provides inbuilt synchronization handled keywords.
  4. The robot framework supports handling Windows alerts, popups, etc.
  5. Robot framework follows a keyword-driven approach & it has an easy syntax. Its capabilities can be extended by Python, Java, or .NET libraries.
  6. Robot framework provides inbuilt reporting functionality.

2. Desktop Test Automation with Robot Framework:

  1. Robot Framework supports Desktop application test automation using Auto It Library and pywinauto Library.
  2. Robot Framework can be easily integrated with desktop test automation libraries like RPA, UiPath ,Autoit library, robotframework-whitelibrary, robotframework-application library etc.

3. Mobile Test Automation with Robot Framework:

  1. Robot Framework supports mobile test automation for both Android and iOS platforms using Appium Library.
  2. Robot framework supports both REST and SOAP API test automation.

4. API Test Automation with Robot Framework:

  1. Robot framework supports API test automation using request library and Rest Instance library.
  2. Easily Integrate with REST instance and request libraries for API Test Automation.
  3. Easy field-level response validation.
  4. Inbuilt keywords library is available for schema validations.

5. Database validation Test Automation with Robot Framework:

  1. Robot framework supports database validations using the Database Library
  2. Robot framework supports PyMySQL, psycopg2, sqlite3.
  3. PyMySQL is a pure Python MySQL client library.
  4. psycopg2 is PostgreSQL adapter for Python.

6. SSH and Telnet Batch Job Execution Test Automation with Robot Framework:

  1. Robot framework supports the SSH and Telnet Batch job execution for SSH and SFTP
  2. The robot framework interacts with remote servers over the SSH commands.

Structure:

The structure of Robot Framework for UI and Desktop,

Robot Framework Structure

Peculiarity:

  1. Multi-Language Support: Robot Framework is an open-source test automation framework based on Python and uses a keyword-driven approach to test automation. Robot Framework also supports Jython (Java) and Iron Python(. NET).
  2. Multi-Browser Testing: Robot Framework interacts with web applications and its web elements in a browser, it supports multiple browsers like Safari, Chrome, Firefox, Opera, and Edge.
  3. Easy Identification of Web Elements and Dynamic Handling of Web Elements: With the help of locator’s methods like xpath, CSS Selector, id, and class name identification of elements is easy. Selenium provides dynamic method handling with the Axes method like contains (), Text (), Following-sibling, Preceding, Ancestor, and Descendant.
  4. Easy identification of Desktop Elements: With the help of inspectors like WinAppDriverUiRecorder, AutomationSpy, and AccessibilityInsights identification of locators like id(AutomationID), and name is easy. Robot framework provides ApplicationLibrary to use xpath.
  5. Multiple OS Support: Selenium supports different Operating Systems like Mac, Linux, UNIX, as well as Windows.
  6. Execution Control using Test Setup and Test Teardown: Robot Framework provides different Keywords that are used to control the execution of the test scripts. In this case, Test Setup will be run before each case in the suite and Test Teardown will run after the test case execution.
  7. Assertions: The robot framework provides the keyword to implement assertions. Also, it provides robotframework-assertion-engine which is a generic way to create meaningful and easy-to-use assertions for the Robot Framework libraries.
  8. Retry Mechanism: Rerunning only failed test cases after the execution and giving one single report can resolve this big pain in Robot Framework. Robot Framework provides two attributes–rerunfailed and –merge. Merge will rerun the failure and merge the different results into a single report.
  9. Well-Handled Synchronization: If the application slows down for any reasons like network, heavy load, test script, and application are not in sync then script may fail. Selenium provides waits like:
  • Implicit Wait
  • Explicit Wait

Reporting:

It can be easily integrated with multiple reporting options such as:

  1. Allure Reports.
  2. HTML Reports.
  3. Log Reports.

CI/CD Integration:

To schedule nightly job execution Robot Framework supports multiple CI/CD tools like Jenkins, Bamboo, TeamCity, etc.

Supplement:

  1. Easy parallel execution and data provider with Excel are possible.
  2. Wide community support for selenium with Robot Framework.
  3. Good documentation.
  4. Easy integration with test management tools like JIRA, Dev Azure etc.
  5. Robot Framework provides automatic log file generation and HTML report generation.
  6. Parallel execution using selenium Pabot.
  7. Automatic screenshot capturing the failure of the Test Case.
  8. Supports files and directories test automation.
  9. Available custom libraries and easily integrated with robot framework.

Ref Link: https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html

Tags:
Test Automation

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Test Automation Streamlining REST API Processes with Postman Automation Summary:In today's world, industries are increasingly focusing on the development of...

Uncategorized Enhancing Test Efficiency with Playwright, TestNG and Allure Summary:Playwright is an open-source library developed by Microsoft for automated browser...

Test Automation Continuous Integration and Delivery with Jenkins and GitHub Summary: Testing and deployment-related operations can be automated with Jenkins,...

Mobile App Test Automation with TDD Telecommunications (Cable) Location Performance Testing CONTEXT Elyments is an India-based mobile application similar to...

Leave a Reply

Your email address will not be published. Required fields are marked *