|
| 1 | +# 1.2 Architecture of Robot Framework |
| 2 | + |
| 3 | +Robot Framework is an open-source automation framework that allows you to build automation scripts for testing and RPA (Robotic Process Automation). |
| 4 | +It focuses on providing a keyword-driven or behavior-driven approach, making the automation easy to understand and maintain. |
| 5 | +However, it is not a full-stack solution that encompasses all layers of automation. |
| 6 | +Instead, it provides a flexible platform where different tools, libraries, and integrations handle specific tasks to implement a flexible automation solution. |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | +## 1.2.1 Robot Framework and the gTAA (Generic Test Automation Architecture) |
| 11 | + |
| 12 | +::::lo[Learning Objectives] |
| 13 | + |
| 14 | +:::K1[LO-1.2.1] |
| 15 | + |
| 16 | +Recall the layers of the Generic Test Automation Architecture (gTAA) and their corresponding components in Robot Framework |
| 17 | + |
| 18 | +::: |
| 19 | + |
| 20 | +:::: |
| 21 | + |
| 22 | +The **Generic Test Automation Architecture (gTAA)** described in the ISTQB "Certified Tester Advanced Level Test Automation Engineering" offers a structured approach to test automation, dividing it into different layers for a clear separation of concerns: |
| 23 | + |
| 24 | +- **Definition Layer**: This layer contains the "Test Data" (test cases, tasks, resource files which include user keywords and variables). |
| 25 | +In Robot Framework, the test data is written using the defined syntax and contains keyword calls and argument values that make the test case or task definitions structured in suites. |
| 26 | + |
| 27 | +- **Execution Layer**: In Robot Framework, the execution layer consists of the framework itself, including its core components and APIs. |
| 28 | +It parses and interprets the test data syntax to build an execution model. |
| 29 | +The execution layer is responsible for processing this execution model to execute the library keywords with their argument values, logging results, and generating reports. |
| 30 | + |
| 31 | +- **Adaptation Layer**: This layer provides the connection between Robot Framework and the system under test (SUT). |
| 32 | +In Robot Framework, this is where the keyword libraries, which contain code responsible for interacting with different technologies and interfaces, |
| 33 | +such as those for UI, API, database interactions, or others, are located. |
| 34 | +These keyword libraries enable interaction with different technologies and interfaces, ensuring the automation is flexible and adaptable to various environments. |
| 35 | + |
| 36 | +Editors/IDEs that offer support for Robot Framework's syntax are tools that support or integrate in these layers. |
| 37 | +When writing tests|tasks or keywords, the editor supports the definition layer. |
| 38 | +When executing or debugging tests|tasks, the editor supports the execution layer. |
| 39 | +When writing keywords in e.g. Python for keyword libraries, the editor supports the adaptation layer. |
| 40 | +Therefore also other additional extensions of Robot Framework can be categorized into these layers. |
| 41 | + |
| 42 | +{/* TODO: add a graphic here */} |
| 43 | + |
| 44 | +## 1.2.2 What is Robot Framework & What It Is Not |
| 45 | + |
| 46 | +::::lo[Learning Objectives] |
| 47 | + |
| 48 | +:::K1[LO-1.2.2] |
| 49 | + |
| 50 | +Recall what is part of Robot Framework and what is not |
| 51 | + |
| 52 | +::: |
| 53 | + |
| 54 | +:::: |
| 55 | + |
| 56 | + |
| 57 | +Robot Framework itself focuses primarily on **test|task execution**. |
| 58 | +It includes: |
| 59 | + |
| 60 | +- A parser to read test|task data and build an execution model. |
| 61 | +- An execution engine to process model and execute the keywords. |
| 62 | +- A result generation mechanism to provide logs and reports. |
| 63 | +- A collection of generic standard libraries to process and handle data or interact with files and processes. |
| 64 | +- Defined APIs for extensions and customizations. |
| 65 | + |
| 66 | +However, Robot Framework **does not** include: |
| 67 | + |
| 68 | +- Keyword libraries to control systems under test/RPA. |
| 69 | + |
| 70 | + Such as: |
| 71 | + - Web front-end automation libraries. |
| 72 | + - API interaction libraries. |
| 73 | + - Mobile automation libraries. |
| 74 | + - Database interaction libraries. |
| 75 | + - RPA libraries. |
| 76 | + - etc. |
| 77 | + |
| 78 | +- Code editors or IDEs. |
| 79 | +- CI/CD Integration. |
| 80 | + |
| 81 | +Robot Framework defines the syntax for test|task data, but it is the role of external libraries and tools to extend its functionality for specific automation needs. |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | +## 1.2.3 Technology & Prerequisites |
| 86 | + |
| 87 | +::::lo[Learning Objectives] |
| 88 | + |
| 89 | +:::K1[LO-1.2.3] |
| 90 | + |
| 91 | +Recall the technology Robot Framework is built on and the prerequisites for running it |
| 92 | + |
| 93 | +::: |
| 94 | + |
| 95 | +:::: |
| 96 | + |
| 97 | + |
| 98 | +Robot Framework is built on **Python** but is adaptable to other languages and technologies through external libraries. |
| 99 | +To run Robot Framework, an [officially supported version](https://devguide.python.org/versions/) of the **Python interpreter** is required on the machine executing the tests|tasks. |
| 100 | +Typically, Robot Framework and its libraries are installed via the "package installer for Python" (`pip`) from [PyPi.org](https://pypi.org/project/robotframework/), allowing for straightforward installation and setup. |
| 101 | +Robot Framework itself does not have any external dependencies, but additional third party tools or keyword libraries may require additional installations. |
| 102 | + |
| 103 | + |
| 104 | + |
0 commit comments