Robot Framework Faker Library

6.0.0 · active · verified Thu Apr 16

robotframework-faker is a Robot Framework keyword library that acts as a wrapper for the popular Faker Python library, enabling easy generation of fake test data within Robot Framework test suites. The current version is 6.0.0, supporting Python 3.9 through 3.13. Releases are made as needed, often coinciding with significant changes in the underlying Faker library or Robot Framework compatibility updates.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to import `FakerLibrary` with a specified locale and use some basic keywords like `Name`, `Address`, and `Words` to generate fake data within a Robot Framework test case.

--- example.robot ---
*** Settings ***
Library    FakerLibrary    locale=en_US
Documentation    Example of using Robot Framework Faker Library

*** Test Cases ***
Generate a Fake Name and Address
    ${name}=    FakerLibrary.Name
    Log To Console    Generated Name: ${name}

    ${address}=    FakerLibrary.Address
    Log To Console    Generated Address: ${address}

Generate Multiple Words
    ${words_5}=    FakerLibrary.Words    nb=5
    Log To Console    5 Words: ${words_5}

--- To run ---
pip install robotframework robotframework-faker
robot example.robot

view raw JSON →