Skip to content

Robot Framework — Complete Guide

Robot Framework is an open-source, keyword-driven automation framework. Tests and tasks are expressed as human-readable tables; libraries (especially Python-based) implement real work behind keywords. Modern Robot Framework 7.x improves the core language (native VAR, richer control flow, secret variables in 7.4+) and integrates cleanly with CI and custom tooling.

This guide is organised into seven sections: language fundamentals, how suites scale, API and UI automation, running tests reliably, supporting infrastructure, and production decisions.

Sections

1. Fundamentals

File Topics
Fundamentals — Overview Section map: syntax, keywords & variables, libraries
Core Syntax & Test Structure Suite sections, .robot / .resource, setup/teardown, [Template], tags, FOR / IF / TRY / WHILE, VAR (RF 7+)
Keywords & Variables Built-in keywords, arguments, scopes, env & files, ${CURDIR}, secrets (${name: Secret}, RF 7.4+)
Libraries & Extensibility Standard & external libs, custom Python, Library / Resource, remote lib, library scope

2. Architecture

File Topics
Architecture — Overview Layering, keyword design, test data at scale
Layered Architecture Five layers, layout, resources vs libraries, dependency flow
Keyword Design Principles Naming, composition, embedded args, docs & tags
Test Data Management Builders, factories, [Template], variable files, cleanup

3. API Testing

File Topics
API Testing — Overview HTTP testing in RF, structure of API suites
API Architecture & Patterns Client layering, shared keywords, environments
Request Design & Validation Payloads, assertions, contracts, negative paths
API — Step by Step Simple → keywords → data-driven → full architecture
Practical — Full API Framework Python libs, resources, CRUD tests, run commands

4. UI Testing

File Topics
UI Testing — Overview Browser automation with Robot
Page Objects & Locators POM-style keywords, stable selectors
Wait Strategies & Flakiness Waits, retries, stability
UI — Step by Step SeleniumLibrary → keywords → Browser (Playwright)
Practical — Full UI Framework Page objects, DataFactory, E2E flow

5. Execution & Reliability

File Topics
Execution — Overview CLI, outputs, organising runs
Parallel Execution with Pabot Sharding, concurrency, shared state
Error Handling & Retry Patterns Failures, recovery, robust keywords
Setup, Teardown & Test Organization Lifecycle, suite structure

6. Infrastructure

File Topics
Infrastructure — Overview Configuration, secrets, logging, reporting, CI/CD patterns

7. Decisions & Production

File Topics
Decisions — Overview Adoption, risks, maturity
Scalability & Maintainability Growing suites, ownership
Anti-Patterns, Risks & Limitations What to avoid, failure modes
Maturity Model & Engineering Heuristics Staged rollout, team practices

Quick Navigation by Topic

I want to… Go to
Learn .robot structure and control flow Core Syntax & Test Structure
Design keywords and variables Keywords & Variables
Pick or build libraries Libraries & Extensibility
Structure a large project Architecture — Overview
Automate HTTP APIs API Testing — Overview
Start API testing from scratch API — Step by Step
See a complete API project Practical — Full API Framework
Automate browsers UI Testing — Overview
Start UI testing from scratch UI — Step by Step
See a complete UI project Practical — Full UI Framework
Run or parallelise suites Execution — Overview
Configure CI and secrets Infrastructure — Overview
Decide production fit Decisions — Overview

See also