robotframework-requests is a Robot Framework keyword library that wraps the popular Python Requests library, providing HTTP API testing functionalities. It is actively developed, with a stable `0.9.x` series and an ongoing `1.0aX` pre-release series introducing significant changes and new features.
pip install robotframework-requestsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates a basic GET request to a public API using sessionless keywords (available since v0.9). It retrieves a post, asserts the HTTP status code, and verifies a specific field in the JSON response.
Migrate your test environment to Python 3.6+.
Update your test cases to use the new keyword structure. For example, replace `Get Request` with `GET` or `GET On Session`.
Add `expected_status=any` or the specific expected error code to your HTTP request keywords when testing for non-2xx responses.
Be aware of logging output. For sensitive data, consider configuring Robot Framework's logging levels, sanitizing outputs, or using external secret management where possible. `1.0a12` includes a fix for basic authentication leakage with specific keyword usage, but general logging awareness is still crucial.
Upgrade to `0.9.7` or later for file descriptor fixes. If using `1.0aX` pre-releases and uploading file lists, upgrade to `1.0a13` or later.
When using the `auth` parameter directly in `GET` (or other sessionless requests), ensure it is provided as a 2-length tuple, e.g., `auth=('username', 'password')`.