Skip to main content

Robot Framework keywords for HTTP requests

Project description

https://secure.travis-ci.org/peritus/robotframework-httplibrary.png?branch=master

robotframework-httplibrary

robotframework-httplibrary is a Robot Framework test library for all your HTTP needs. It uses livetest (which, in turn uses the famous webtest library underneath).

Installation

You can install robotframework-httplibrary via pip:

pip install --upgrade robotframework-httplibrary

Usage

API documentation can be found at http://peritus.github.com/robotframework-httplibrary/, here is an example on how to use it:

Setting

Value

Library

HttpLibrary.HTTP

Test Case

Action

Argument

Example

[Documentation]

Follows a Redirect

Create HTTP Context

httpstat.us

GET

/302

Response Status Code Should Equal

302

Follow Response

Response Body Should Contain

generating different HTTP codes

You can view a report and a log of this test executed that looks like this:

http://peritus.github.com/robotframework-httplibrary/rfhttplib_example_test_execution.png

Compatibility

This library is only tested on CPython. It might work on Jython, not sure.

Development

If you want to hack on this library itself, this should get you started:

# bootstrap development environment
git clone https://github.com/peritus/robotframework-httplibrary.git
cd robotframework-httplibrary/
python bootstrap.py
./bin/buildout

# run tests
./bin/robotframework tests/

I’m very happy about patches, pull-requests and API-discussions (as this is mostly a wrapper supposed to have a nice API)!

Changelog

v1.0.0

  • Upgraded dependent robotframework library version to 3.1.2(latest).

  • Migrated source code to support both python 2 and python 3.

  • Unit tests updated accordingly.

  • Integrated tox test automation tool to test on multiple python environments.

v0.4.2

  • Don’t enforce ASCII when converting to JSON (so chinese characters are printed as such and not escaped like uXXXX). Thanks Terry Yin!

v0.4.1

  • Tested with Robot Framework 2.8rc1

  • Uses jsonpointer 1.0, jsonpatch 1.0

v0.4.0

  • Compatible with Webtest > 2.0

  • hard-deprecate ‘Set HTTP Host’, will be removed soon.

v0.3.4

  • Add support for python-json-pointer >= 0.6 (if you experienced “AttributeError: 'module' object has no attribute 'set_pointer'”, you should upgrade to this version).

v0.3.3

  • add HTTPS support

  • add ‘Stringify JSON’ keyword

  • implicitly set correct ‘Host’ header

License

Beerware: If we meet some day, and you think this stuff is worth it (or need a more serious license), you can buy me a beer in return.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robotframework-newhttplibrary-1.1.6.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

robotframework_newhttplibrary-1.1.6-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file robotframework-newhttplibrary-1.1.6.tar.gz.

File metadata

  • Download URL: robotframework-newhttplibrary-1.1.6.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for robotframework-newhttplibrary-1.1.6.tar.gz
Algorithm Hash digest
SHA256 f0076f92f1d569d1ed1baceac50956a74208fffddb51161e4be840b89a9ae5a9
MD5 ce2c8c59892f3ca244f4079b51d5b08f
BLAKE2b-256 b5f9a1d91cebdc31dfea6dafc2fe50179b5c31c7074a6e0a72b8b44e2d0141ce

See more details on using hashes here.

File details

Details for the file robotframework_newhttplibrary-1.1.6-py3-none-any.whl.

File metadata

  • Download URL: robotframework_newhttplibrary-1.1.6-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for robotframework_newhttplibrary-1.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 67c676f5c648359309a73cd2968fecc992f78275d3544d99d6d7a4e78e601966
MD5 0c93db61f74c3c3db38f53f42df4566f
BLAKE2b-256 df2bad425897604fb5409cf55cfd44bebf84430a908e0938905cb1f0d390154c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page