Skip to main content

Extended Requests HTTP client testing library for Robot Framework

Build Status Code Coverage Code Grade Keyword Documentation Package Version Development Status Python Version Monthly Download License

Introduction

ExtendedRequestsLibrary is an extended HTTP client library for Robot Framework with OAuth2 support that leverages the requests project, requests-oauthlib project, and RequestsLibrary project.

More information about this library can be found in the Keyword Documentation.

Example

*** Settings ***
Library    ExtendedRequestsLibrary

*** Test Cases ***
Post Request With Client Credentials
    Create Client OAuth2 Session    client    https://token    key    secret    base_url=https://service
    ${var} =    Post Request    client    /endpoint    json=${“key": "value"}
    Log    ${var}
    Delete All Sessions

Post Request With Password
    Create Password OAuth2 Session    member    https://token    key    secret    usn    pwd    base_url=https://service
    ${var} =    Post Request    member    /endpoint    json=${“key": "value"}
    Log    ${var}
    &{files} =    Create Dictionary    file1=/path/to/a_file.ext    file2=/path/to/another_file.ext
    ${var} =    Post Request    member    /endpoint    files=&{files}
    Log    ${var}
    Delete All Sessions

Installation

Using pip

The recommended installation method is using pip:

pip install robotframework-extendedrequestslibrary

The main benefit of using pip is that it automatically installs all dependencies needed by the library. Other nice features are easy upgrading and support for un-installation:

pip install --upgrade robotframework-extendedrequestslibrary
pip uninstall robotframework-extendedrequestslibrary

Notice that using --upgrade above updates both the library and all its dependencies to the latest version. If you want, you can also install a specific version or upgrade only the requests project used by the library:

pip install robotframework-extendedrequestslibrary==x.x.x
pip install --upgrade requests
pip install requests==x.x.x

Proxy configuration

If you are behind a proxy, you can use --proxy command line option or set http_proxy and/or https_proxy environment variables to configure pip to use it. If you are behind an authenticating NTLM proxy, you may want to consider installing CNTML to handle communicating with it.

For more information about --proxy option and using pip with proxies in general see:

Manual installation

If you do not have network connection or cannot make proxy to work, you need to resort to manual installation. This requires installing both the library and its dependencies yourself.

gpg --keyserver pgp.mit.edu --search-keys D1406DE7
  • Select the number from the list to import the public key

  • Verify the package against its PGP signature:

gpg --verify robotframework-extendedrequestslibrary-x.x.x.tar.gz.asc robotframework-extendedrequestslibrary-x.x.x.tar.gz
  • Extract each source distribution to a temporary location.

  • Go to each created directory from the command line and install each project using:

python setup.py install

If you are on Windows, and there are Windows installers available for certain projects, you can use them instead of source distributions. Just download 32bit or 64bit installer depending on your system, double-click it, and follow the instructions.

Directory Layout

doc/

Keyword documentation

src/

Python source code

test/

Test files

utest/

Python unit test

Usage

To write tests with Robot Framework and ExtendedRequestsLibrary, ExtendedRequestsLibrary must be imported into your Robot test suite.

*** Settings ***
Library    ExtendedRequestsLibrary

See Robot Framework User Guide for more information.

More information about Robot Framework standard libraries and built-in tools can be found in the Robot Framework Documentation.

Building Keyword Documentation

The Keyword Documentation can be found online, if you need to generate the keyword documentation, run:

make doc

Run Unit Tests, and Test Coverage Report

Test the testing library, talking about dogfooding, let’s run:

make test

Contributing

If you would like to contribute code to Extended Requests Library project you can do so through GitHub by forking the repository and sending a pull request.

When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible. Please also include appropriate test cases.

Before your code can be accepted into the project you must also sign the Extended Requests Library CLA (Individual Contributor License Agreement).

That’s it! Thank you for your contribution!

License

Copyright (c) 2015, 2016 Richard Huang.

This library is free software, licensed under: GNU Affero General Public License (AGPL-3.0).

Documentation and other similar content are provided under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Metadata

Release files for robotframework-extendedrequestslibrary 0.5.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distributions (sdists)

Source distribution for robotframework-extendedrequestslibrary 0.5.5
File Size Uploaded Provenance Actions
robotframework-extendedrequestslibrary-0.5.5.zip 85.2 kB Without provenance Details for robotframework-extendedrequestslibrary-0.5.5.zip
robotframework-extendedrequestslibrary-0.5.5.tar.gz 73.3 kB Without provenance Details for robotframework-extendedrequestslibrary-0.5.5.tar.gz

Release files / robotframework-extendedrequestslibrary-0.5.5.zip

Download URL robotframework-extendedrequestslibrary-0.5.5.zip
Size 85.2 kB
Tags Source
SHA-256 checksum
How to use checksums
704564ce7982b39f416c8bf3de36242e365de5b961b3024fb994ab6745e656f8
BLAKE2b-256 checksum
How to use checksums
4045acb04f87623a6530881ed442f14f160a384707cf31d985cf96035f247a1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / robotframework-extendedrequestslibrary-0.5.5.tar.gz

Download URL robotframework-extendedrequestslibrary-0.5.5.tar.gz
Size 73.3 kB
Tags Source
SHA-256 checksum
How to use checksums
54d0bb5aa5aac86a226ab2026ea5acf767b6ae2cba487c9de1df83689287fdb6
BLAKE2b-256 checksum
How to use checksums
8f57853fc183c1d3ec7bc1989e10f6f7bf6d00084c9ecf0b365703627d5c4255
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for robotframework-extendedrequestslibrary 0.5.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page