--- id: robotframework-databaselibrary version: "2.4.1" license: Apache License 2.0 license_treatment: permissive maintenance: aging --- # robotframework-databaselibrary — Database Library for Robot Framework License: permissive · Maintenance: aging · Downloads: 392.7K/mo ## 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 above — 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 pip install robotframework-databaselibrary uv add robotframework-databaselibrary 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_current - Install friction: low - Maintenance: aging - Downloads: 392.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags robot framework database testing, database query verification automation, SQL testing in robot framework, database assertion keywords, multi-database connection testing, robot-framework, database-testing, test-automation [View on SkillFed](https://skillfed.io/packages/robotframework-databaselibrary) · [View on PyPI](https://pypi.org/project/robotframework-databaselibrary/)