skillfed

robotframework-databaselibrary

Database Library for Robot Framework

robotframework-databaselibrary v2.4.1 392.7K downloads/30d#7,006 on PyPI178
Permissive license Apache License 2.0 AGING released

What it is and what it does

This is a Robot Framework library that extends the framework with keywords for database operations, allowing test suites to connect to, query, and verify data in databases. It wraps Python database modules (like oracledb, pymysql, or psycopg2) and exposes keywords for executing SQL queries, checking row counts, validating query results, and managing multiple simultaneous database connections via aliases.

The library is designed for test automation scenarios where you need to verify database state or content as part of your test execution. It handles connection setup, query execution, and result validation through Robot Framework's keyword syntax, making it natural to use within Robot Framework test cases and keywords. You supply the database driver module separately, and the library provides the glue to use it within your tests.

Use it for:

  • Verify database records after an application operation in an automated test suite.
  • Check row counts or specific values in database tables as part of test assertions.
  • Test data setup and teardown by executing SQL commands from Robot Framework tests.
  • Validate data consistency across multiple databases in a single test run using connection aliases.
  • Query and assert on database state without writing custom Python code in your test suite.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A Robot Framework library that adds keywords for querying databases, verifying query results, and managing multiple database connections within automated test suites.

Yes, if you are using Robot Framework for test automation and need to query or verify databases. Install friction is low and the library is permissively licensed. Maintenance is aging (last release 213 days ago), so verify that your target database driver is supported before committing; no known vulnerabilities are present. Suitable for teams already invested in Robot Framework who want database testing without custom code.

Install

robotframework-databaselibrary on PyPI

pip

pip install robotframework-databaselibrary

uv

uv add robotframework-databaselibrary

poetry

poetry add robotframework-databaselibrary

Installing robotframework-databaselibrary

Before you install

Low install friction with a pure-wheel distribution. Maintenance status is aging—last release was 213 days ago—but the repository remains active and has not been archived.

License in practice

Licensed under Apache License 2.0 (permissive), allowing free use, modification, and distribution with minimal restrictions.

Quickstart

pip install robotframework-databaselibrary

*** Settings ***
Library    DatabaseLibrary

*** Test Cases ***
Query Database
    Connect To Database    oracledb    db_name=db    db_user=user    db_password=pass    db_host=127.0.0.1    db_port=1521
    ${rows}=    Query    select FIRST_NAME from person
    Should Be Equal    ${rows}[0][0]    Franz Allan

Requires a separate Python database module (e.g., oracledb, pymysql, psycopg2) to be installed separately depending on your target database.

Verify before relying

  • Whether the library actively maintains compatibility with all listed database drivers (oracledb, pymysql, psycopg2, pymssql, ibm_db_dbi, pyodbc, jaydebeapi, sqlite3, teradata).
  • Performance characteristics when handling large result sets or frequent queries in test suites.

Package facts

License Apache License 2.0 (permissive)
Python support supports the current Python release (>=3.8.1)
Install friction low — pure-Python wheel
Runtime dependencies 3 — robotframework, robotframework-assertion-engine, sqlparse
Maintenance aging — 213 days since the last release
Last repo commit
First released
Downloads 392,715/month — #7,006 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: robotframework_databaselibrary-2.4.1-py3-none-any.whl

License :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

robot framework database testingdatabase query verification automationSQL testing in robot frameworkdatabase assertion keywordsmulti-database connection testing
robot-frameworkdatabase-testingtest-automation

More Testing packages

pluggy

Pluggy provides a plugin system that lets you…

permissive · top 100 on PyPI

pytest

pytest is a testing framework that lets you…

permissive · top 100 on PyPI

virtualenv

virtualenv creates isolated Python environments…

permissive · top 100 on PyPI

coverage

Coverage.py measures which lines of Python code…

permissive · top 1,000 on PyPI

pytest-asyncio

pytest-asyncio is a pytest plugin that enables…

permissive · top 1,000 on PyPI

pytest-json-ctrf

A pytest plugin that generates test reports in…

permissive · top 1,000 on PyPI

robotframework-assertion-engine

Provides a standardized assertion engine for…

permissive · top 15,000 on PyPI

robotframework-seleniumlibrary

SeleniumLibrary is a Robot Framework library…

permissive · top 5,000 on PyPI

robotframework-csvlibrary

CSVLibrary is a Robot Framework library that…

permissive · top 15,000 on PyPI

robotframework-faker

Wraps Faker's random test data generation as…

permissive · top 15,000 on PyPI

robotframework-appiumlibrary

AppiumLibrary is a Robot Framework library that…

permissive · top 15,000 on PyPI

robotframework-excellib

Provides Robot Framework keywords for reading,…

permissive · top 15,000 on PyPI

robotframework-dependencylibrary

Declares and enforces dependencies between…

permissive · top 15,000 on PyPI

robotframework-imaplibrary2

A Robot Framework library that connects to IMAP…

permissive · top 15,000 on PyPI

robotremoteserver

Hosts Robot Framework test libraries on…

permissive · top 15,000 on PyPI

robotframework-requests

RequestsLibrary wraps the Python Requests…

permissive · top 5,000 on PyPI