HttpCtrl library for Robot Framework
====================================
**RobotFramework-HttpCtrl** is a library for Robot Framework that provides HTTP/HTTPS client and HTTP (IPv4 and IPv6) server services
to make REST API testing easy.
**License**: The 3-Clause BSD License
**Documentation**: https://annoviko.github.io/robotframework-httpctrl/
Dependencies
============
**Python version**: >=3.8
Installation
============
Installation using pip3 tool:
.. code:: bash
$ pip3 install robotframework-httpctrl
Brief Overview of the Library Content
=====================================
**HttpCtrl** contains following general libraries:
- **HttpCtrl.Client** - provides API to work with HTTP/HTTPS client [`link client documentation`_].
- **HttpCtrl.Server** - provides API to work with HTTP server [`link server documentation`_].
- **HttpCtrl.Json** - provides API to work Json messages [`link json documentation`_].
- **HttpCtrl.Logging** - provides API to configure the logging system that is used by `HttpCtrl` library [`link logging documentation`_].
.. _link client documentation: https://annoviko.github.io/robotframework-httpctrl/client.html
.. _link server documentation: https://annoviko.github.io/robotframework-httpctrl/server.html
.. _link json documentation: https://annoviko.github.io/robotframework-httpctrl/json.html
.. _link logging documentation: https://annoviko.github.io/robotframework-httpctrl/logging.html
Examples
========
Send GET request to obtain origin IP address and check that is not empty:
.. code:: robotframework
*** Settings ***
Library HttpCtrl.Client
Library HttpCtrl.Json
*** Test Cases ***
Get Origin Address
Initialize Client www.httpbin.org
Send HTTP Request GET /ip
${response status}= Get Response Status
${response body}= Get Response Body
${response body}= Decode Bytes To String ${response body} UTF-8
${expected status}= Convert To Integer 200
Should Be Equal ${response status} ${expected status}
${origin}= Get Json Value From String ${response body} origin
Should Not Be Empty ${origin}
In this example HTTP client sends POST request to HTTP server. HTTP server receives it and checks incoming
request for correctness.
.. code:: robotframework
*** Settings ***
Library String
Library HttpCtrl.Client
Library HttpCtrl.Server
Test Setup Initialize HTTP Client And Server
Test Teardown Terminate HTTP Server
*** Test Cases ***
Receive And Reply To POST
${request body}= Set Variable { "message": "Hello!" }
Send HTTP Request Async POST /post ${request body}
Wait For Request
Reply By 200
${method}= Get Request Method
${url}= Get Request Url
${body}= Get Request Body
${body}= Decode Bytes To String ${body} UTF-8
Should Be Equal ${method} POST
Should Be Equal ${url} /post
Should Be Equal ${body} ${request body}
*** Keywords ***
Initialize HTTP Client And Server
Initialize Client 127.0.0.1 8000
Start Server 127.0.0.1 8000
Terminate HTTP Server
Stop Server
Raw data
{
"_id": null,
"home_page": null,
"name": "robotframework-httpctrl",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "Andrei Novikov <spb.andr@yandex.ru>",
"keywords": "httpctrl, http, https, robotframework, client, server, json, test, testing",
"author": null,
"author_email": "Andrei Novikov <spb.andr@yandex.ru>",
"download_url": "https://files.pythonhosted.org/packages/20/7e/36918484783f1ee996ddec6ffec9b7e1679280c041524ef14525c14a5ef9/robotframework_httpctrl-0.3.3.tar.gz",
"platform": null,
"description": "HttpCtrl library for Robot Framework\n====================================\n\n**RobotFramework-HttpCtrl** is a library for Robot Framework that provides HTTP/HTTPS client and HTTP (IPv4 and IPv6) server services\nto make REST API testing easy.\n\n**License**: The 3-Clause BSD License\n\n**Documentation**: https://annoviko.github.io/robotframework-httpctrl/\n\n\nDependencies\n============\n\n**Python version**: >=3.8\n\n\nInstallation\n============\n\nInstallation using pip3 tool:\n\n.. code:: bash\n\n $ pip3 install robotframework-httpctrl\n\n\nBrief Overview of the Library Content\n=====================================\n\n**HttpCtrl** contains following general libraries:\n\n- **HttpCtrl.Client** - provides API to work with HTTP/HTTPS client [`link client documentation`_].\n\n- **HttpCtrl.Server** - provides API to work with HTTP server [`link server documentation`_].\n\n- **HttpCtrl.Json** - provides API to work Json messages [`link json documentation`_].\n\n- **HttpCtrl.Logging** - provides API to configure the logging system that is used by `HttpCtrl` library [`link logging documentation`_].\n\n.. _link client documentation: https://annoviko.github.io/robotframework-httpctrl/client.html\n.. _link server documentation: https://annoviko.github.io/robotframework-httpctrl/server.html\n.. _link json documentation: https://annoviko.github.io/robotframework-httpctrl/json.html\n.. _link logging documentation: https://annoviko.github.io/robotframework-httpctrl/logging.html\n\n\nExamples\n========\n\nSend GET request to obtain origin IP address and check that is not empty:\n\n.. code:: robotframework\n\n *** Settings ***\n\n Library HttpCtrl.Client\n Library HttpCtrl.Json\n\n *** Test Cases ***\n\n Get Origin Address\n Initialize Client www.httpbin.org\n Send HTTP Request GET /ip\n\n ${response status}= Get Response Status\n ${response body}= Get Response Body\n ${response body}= Decode Bytes To String ${response body} UTF-8\n\n ${expected status}= Convert To Integer 200\n Should Be Equal ${response status} ${expected status}\n\n ${origin}= Get Json Value From String ${response body} origin\n Should Not Be Empty ${origin}\n\n\nIn this example HTTP client sends POST request to HTTP server. HTTP server receives it and checks incoming\nrequest for correctness.\n\n.. code:: robotframework\n\n *** Settings ***\n\n Library String\n Library HttpCtrl.Client\n Library HttpCtrl.Server\n\n Test Setup Initialize HTTP Client And Server\n Test Teardown Terminate HTTP Server\n\n *** Test Cases ***\n\n Receive And Reply To POST\n ${request body}= Set Variable { \"message\": \"Hello!\" }\n Send HTTP Request Async POST /post ${request body}\n\n Wait For Request\n Reply By 200\n\n ${method}= Get Request Method\n ${url}= Get Request Url\n ${body}= Get Request Body\n ${body}= Decode Bytes To String ${body} UTF-8\n\n Should Be Equal ${method} POST\n Should Be Equal ${url} /post\n Should Be Equal ${body} ${request body}\n\n *** Keywords ***\n\n Initialize HTTP Client And Server\n Initialize Client 127.0.0.1 8000\n Start Server 127.0.0.1 8000\n\n Terminate HTTP Server\n Stop Server\n",
"bugtrack_url": null,
"license": null,
"summary": "robotframework-httpctrl is a library for Robot Framework that provides HTTP/HTTPS client and HTTP server services.",
"version": "0.3.3",
"project_urls": {
"changelog": "https://github.com/annoviko/robotframework-httpctrl/blob/master/CHANGES",
"documentation": "https://annoviko.github.io/robotframework-httpctrl/",
"homepage": "https://annoviko.github.io/robotframework-httpctrl/",
"source": "https://github.com/annoviko/robotframework-httpctrl",
"tracker": "https://github.com/annoviko/robotframework-httpctrl/issues"
},
"split_keywords": [
"httpctrl",
" http",
" https",
" robotframework",
" client",
" server",
" json",
" test",
" testing"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "33920724088275562e29ccee908a51e08416451e369b2034626516baee662cba",
"md5": "15c967ea5ccb4fe7b458934d897bd998",
"sha256": "e4594e9274895c950289b3ce5bb967d8344f3cfed07a0b8d5c656e5c070a2e4b"
},
"downloads": -1,
"filename": "robotframework_httpctrl-0.3.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "15c967ea5ccb4fe7b458934d897bd998",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 22538,
"upload_time": "2025-10-10T07:53:32",
"upload_time_iso_8601": "2025-10-10T07:53:32.619938Z",
"url": "https://files.pythonhosted.org/packages/33/92/0724088275562e29ccee908a51e08416451e369b2034626516baee662cba/robotframework_httpctrl-0.3.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "207e36918484783f1ee996ddec6ffec9b7e1679280c041524ef14525c14a5ef9",
"md5": "4f3a7602b6496649e6d562590b6a9340",
"sha256": "47a49c8df27897e637061b9dc849ea6bf9c6aba075afd1d1ce4ff58c18380fbd"
},
"downloads": -1,
"filename": "robotframework_httpctrl-0.3.3.tar.gz",
"has_sig": false,
"md5_digest": "4f3a7602b6496649e6d562590b6a9340",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 19508,
"upload_time": "2025-10-10T07:53:33",
"upload_time_iso_8601": "2025-10-10T07:53:33.883886Z",
"url": "https://files.pythonhosted.org/packages/20/7e/36918484783f1ee996ddec6ffec9b7e1679280c041524ef14525c14a5ef9/robotframework_httpctrl-0.3.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-10 07:53:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "annoviko",
"github_project": "robotframework-httpctrl",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "robotframework-httpctrl"
}