– , WS1
In this workshop, you’ll explore proven best practices for developing high-quality Robot Framework libraries. Learn how to structure dynamic libraries with Python, leverage PythonLibCore, apply the Assertion Engine, and enforce clean code with type hints, linters, and pre-commit hooks. Ideal for developers with basic knowledge of Python and Robot Framework library development.
Join René for a hands-on deep dive into best practices for building and maintaining Robot Framework libraries. Drawing from real-world experience in customer projects and core development of the Browser library, this workshop distills years of lessons into a practical and applicable format.
Topics Covered:
-
Dynamic Library API
Learn how Robot Framework dynamically interacts with Python libraries using the Dynamic Library API. You'll understand how keywords are discovered and executed at runtime—key knowledge for building flexible, or more complex libraries. -
Library Structuring with PythonLibCore (DynamicCore)
Discover how to use theDynamicCore
base class from PythonLibCore to build modular and maintainable libraries. -
Structure keywords into sub-classes for better organization and separation of concerns
- Add metadata like tags and documentation dynamically
-
Improve code reuse and testability in larger libraries
-
Assertion Engine Integration
Learn how to integrate Robot Framework Assertion Engine for writing expressive and consistent verifications. This avoids scatteredBuiltIn
calls and helps you centralize validation logic with readable failure messages. -
Type Hints and Argument Typing
Use Python’s type hints to improve readability, maintainability, and IDE support. -
Define argument and return types in your keyword methods
- Understand Robot Frameworks automatic type conversion logic
-
Help users (and yourself) avoid runtime errors by making intent clear
-
Custom Type Converters
Extend Robot Framework's argument parsing by registering custom converters. -
Convert strings or other types from test cases into domain-specific Python types
- Improve keyword usability and reduce repetitive parsing logic
-
Introduce type documentation
-
Linters, Formatters, and Pre-Commit Hooks
Enforce code quality and style automatically: -
Use tools like
ruff
andmypy
to catch errors early - Set up
pre-commit
hooks to keep your code clean and consistent - Learn how to configure and integrate them into your library workflow
Who is this for?
This workshop is aimed at developers who:
- Have basic Python knowledge
- Understand how to create Robot Framework libraries
- Want to raise the quality, maintainability, and clarity of their libraries
Whether you're starting a new library or maintaining an existing one, you'll come away with the tools and patterns to build libraries that are robust, well-structured, and easy to use.
16:00
Intended Audience Description:This workshop is aimed at developers who:
- Have basic Python knowledge
- Understand how to create Robot Framework libraries
- Want to raise the quality, maintainability, and clarity of their libraries