Registry /
testing / robotframework-datadriver
Install & Compatibility
Where this runs
tested against v1.11.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 37MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 2.9s · import 0.000s · 38MB
36MB installed
● package 36MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
AbstractDataDriverReader
✓ from DataDriver import AbstractDataDriverReader
This is primarily for users implementing custom data readers in Python. The core library is typically loaded directly in Robot Framework test suites (e.g., `Library DataDriver my_data.xlsx`).
This quickstart demonstrates how to use `robotframework-datadriver` with a simple CSV data file. It creates a CSV file and a Robot Framework test suite (`.robot` file) on the fly, then executes the tests using the `robot` command-line tool. Each row in the CSV will generate a separate test case, logging the provided parameters.
import os
import subprocess
# Create a dummy data file (e.g., my_data.csv)
csv_content = "TEST_NAME,param1,param2\nTest 1,ValueA,ValueB\nTest 2,ValueC,ValueD"
with open('my_data.csv', 'w') as f:
f.write(csv_content)
# Create a Robot Framework test suite (e.g., my_tests.robot)
robot_content = """
*** Settings ***
Library DataDriver my_data.csv
*** Test Cases ***
My Data-Driven Test
Log To Console Data Row: ${data_row}
Log To Console Test Name: ${TEST_NAME}
Log To Console Param1: ${param1}
Log To Console Param2: ${param2}
"""
with open('my_tests.robot', 'w') as f:
f.write(robot_content)
# Run the Robot Framework tests using subprocess
print("Running Robot Framework tests...")
result = subprocess.run(['robot', 'my_tests.robot'], capture_output=True, text=True)
print(result.stdout)
if result.stderr:
print(result.stderr)
# Clean up generated files
os.remove('my_data.csv')
os.remove('my_tests.robot')
os.remove('output.xml')
os.remove('log.html')
os.remove('report.html')
Debug
Known issues
breakingBreaking changes in Robot Framework 7.x APIs require `robotframework-datadriver` version 1.10.0 or higher for basic compatibility, and 1.11.1+ for features like `RerunFailed`.fixUpgrade `robotframework-datadriver` to at least version 1.11.2 to ensure full compatibility and fixes for Robot Framework 7.x.
affects: <1.10.0 (for basic RF7), <1.11.1 (for RerunFailed with RF7)
gotchaWhen using `robot.run` (programmatically, not via CLI), `DataDriver` previously could not correctly pick up `include` or `exclude` tags.fixUpgrade `robotframework-datadriver` to version 1.9.0 or higher. This fix applies to Robot Framework 5.0 and newer.
affects: <1.9.0
gotchaPandas 2.0 changed its default behavior, interpreting the string 'None' in Excel cells as a `None` value (NaN in pandas) instead of the literal string 'None'.fixUpgrade `robotframework-datadriver` to version 1.8.0 or higher, which includes a fix to preserve the string 'None' from Excel files.
affects: <1.8.0 when used with Pandas >=2.0
gotchaEarlier versions had issues correctly importing custom data readers by their module name, leading to `ModuleNotFoundError` or similar import failures.fixUpgrade `robotframework-datadriver` to version 1.8.1 or higher for improved custom reader import reliability.
affects: <1.8.1
gotchaTest case names containing the `|` character (pipe symbol) could cause issues in earlier versions, especially when used with Pabot.fixUpgrade `robotframework-datadriver` to version 1.6.0 or higher to correctly handle `|` in test case names.
affects: <1.6.0
Upgrade
Version history
1.11.2latest on PyPI · released Jun 8, 2024
Audit
Dependencies
robotframeworkrequiredCore dependency for running DataDriver tests, requires >=3.2.2.
pandasoptionalRequired for reading Excel (.xlsx, .xls) and CSV files. Not strictly required if only using JSON, YAML, or custom readers.