robotframework-requests


Namerobotframework-requests JSON
Version 0.9.7 PyPI version JSON
download
home_pagehttps://github.com/MarketSquare/robotframework-requests
SummaryRobot Framework keyword library wrapper around requests
upload_time2024-04-07 22:48:08
maintainerLuca Giovenzana
docs_urlNone
authorBulkan Savun Evcimen
requires_pythonNone
licenseMIT
keywords robotframework testing test automation http client requests rest api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![Python application](https://github.com/MarketSquare/robotframework-requests/workflows/Python%20application/badge.svg?branch=master)
[![codecov](https://codecov.io/gh/MarketSquare/robotframework-requests/branch/master/graph/badge.svg)](https://codecov.io/gh/MarketSquare/robotframework-requests)
[![PyPi downloads](https://img.shields.io/pypi/dm/robotframework-requests)](https://pypi.python.org/pypi/robotframework-requests)
[![Latest Version](https://img.shields.io/pypi/v/robotframework-requests)](https://pypi.python.org/pypi/robotframework-requests)

🏠 ``RequestsLibrary`` is a [Robot Framework](https://robotframework.org/) library
aimed to provide HTTP api testing functionalities by wrapping the well known [Python Requests Library](https://github.com/kennethreitz/requests).

## Install stable version
```sh
pip install robotframework-requests
```

## 🤖 Quick start
```robotframework
*** Settings ***
Library               RequestsLibrary

*** Test Cases ***

Quick Get Request Test
    ${response}=    GET  https://www.google.com

Quick Get Request With Parameters Test
    ${response}=    GET  https://www.google.com/search  params=query=ciao  expected_status=200

Quick Get A JSON Body Test
    ${response}=    GET  https://jsonplaceholder.typicode.com/posts/1
    Should Be Equal As Strings    1  ${response.json()}[id]
```

### What's new in 0.9
Sessionless keywords are now available, you can just `GET`, `POST`, etc.. no need to create a session anymore!
```robotframework
${resp}=  GET  https://www.google.com
```

`Status Should Be` and `Request Should Be Successfull` can use the last response, no need to pass the response anymore!
```robotframework
GET  https://www.google.com
Status Should Be  200
```

### What's new in 0.8

**New keywords structure:**
All requests keywords have been rewritten because of many not backward compatible changes
and to allow in the near future requests keywords without a session.
Example `Get Request` become `GET On Session` and soon there will be also just `GET`
when a session is not needed.
Old keywords `* Request` are now deprecated and will be removed in 1.0.0 version.

**Implicit assert on status code:**
`* On Session` keywords automatically fail if an error status code is returned.
`expect_status=` could be used to specify a status code (`201`, `OK`, `Bad request`)
or `any` if you want to evaluate the response in any case.

**Closer to the original Requests library:**
New keywords have the same parameter orders and structure as the original.
Lot of pre-parsing / encoding has been removed to have a more accurate and unchanged behaviour.

**Cleaner project architecture:**
Main keywords file has been split with a more logic division to allow better and faster maintenance.

## 🤖 More examples
```robotframework
*** Settings ***                                                                                       
Library    Collections                                                                                 
Library    RequestsLibrary                                                                             
                                                                                                       
Suite Setup    Create Session  jsonplaceholder  https://jsonplaceholder.typicode.com                   
                                                                                                       
*** Test Cases ***                                                                                     
                                                                                                       
Get Request Test                                                                                       
    Create Session    google  http://www.google.com                                                    
                                                                                                       
    ${resp_google}=   GET On Session  google  /  expected_status=200                                   
    ${resp_json}=     GET On Session  jsonplaceholder  /posts/1                                        
                                                                                                       
    Should Be Equal As Strings          ${resp_google.reason}  OK                                      
    Dictionary Should Contain Value     ${resp_json.json()}  sunt aut facere repellat provident        
                                                                                                       
Post Request Test                                                                                      
    &{data}=    Create dictionary  title=Robotframework requests  body=This is a test!  userId=1       
    ${resp}=    POST On Session    jsonplaceholder  /posts  json=${data}  expected_status=anything     
                                                                                                       
    Status Should Be                 201  ${resp}                                                      
```

### 📖 Keywords documentation
Robotframework-requests offers a wide set of keywords which can be found in the [Keywords documentation](http://marketsquare.github.io/robotframework-requests/doc/RequestsLibrary.html)

### 🔬 Test examples
You can find many test examples inside the `atests` folder.

## 🤝 Contributing ✍️
Feel free to contribute and open an issue in order to discuss it. Before doing it take a look at the [contribution guidelines](CONTRIBUTING.md).

📢 Get in touch with the community via slack and Users group
- [Robot Framework Slack #requests channel](https://robotframework-slack-invite.herokuapp.com/)
- [Robot Framework Users Group](https://groups.google.com/forum/#!forum/robotframework-users)


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/MarketSquare/robotframework-requests",
    "name": "robotframework-requests",
    "maintainer": "Luca Giovenzana",
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": "luca@giovenzana.org",
    "keywords": "robotframework testing test automation http client requests rest api",
    "author": "Bulkan Savun Evcimen",
    "author_email": "bulkan@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/61/e2/b17b940985e7b35f53767d908897870fcf4e143a2a7c2da76d152e4abc4c/robotframework-requests-0.9.7.tar.gz",
    "platform": "any",
    "description": "![Python application](https://github.com/MarketSquare/robotframework-requests/workflows/Python%20application/badge.svg?branch=master)\n[![codecov](https://codecov.io/gh/MarketSquare/robotframework-requests/branch/master/graph/badge.svg)](https://codecov.io/gh/MarketSquare/robotframework-requests)\n[![PyPi downloads](https://img.shields.io/pypi/dm/robotframework-requests)](https://pypi.python.org/pypi/robotframework-requests)\n[![Latest Version](https://img.shields.io/pypi/v/robotframework-requests)](https://pypi.python.org/pypi/robotframework-requests)\n\n\ud83c\udfe0 ``RequestsLibrary`` is a [Robot Framework](https://robotframework.org/) library\naimed to provide HTTP api testing functionalities by wrapping the well known [Python Requests Library](https://github.com/kennethreitz/requests).\n\n## Install stable version\n```sh\npip install robotframework-requests\n```\n\n## \ud83e\udd16 Quick start\n```robotframework\n*** Settings ***\nLibrary               RequestsLibrary\n\n*** Test Cases ***\n\nQuick Get Request Test\n    ${response}=    GET  https://www.google.com\n\nQuick Get Request With Parameters Test\n    ${response}=    GET  https://www.google.com/search  params=query=ciao  expected_status=200\n\nQuick Get A JSON Body Test\n    ${response}=    GET  https://jsonplaceholder.typicode.com/posts/1\n    Should Be Equal As Strings    1  ${response.json()}[id]\n```\n\n### What's new in 0.9\nSessionless keywords are now available, you can just `GET`, `POST`, etc.. no need to create a session anymore!\n```robotframework\n${resp}=  GET  https://www.google.com\n```\n\n`Status Should Be` and `Request Should Be Successfull` can use the last response, no need to pass the response anymore!\n```robotframework\nGET  https://www.google.com\nStatus Should Be  200\n```\n\n### What's new in 0.8\n\n**New keywords structure:**\nAll requests keywords have been rewritten because of many not backward compatible changes\nand to allow in the near future requests keywords without a session.\nExample `Get Request` become `GET On Session` and soon there will be also just `GET`\nwhen a session is not needed.\nOld keywords `* Request` are now deprecated and will be removed in 1.0.0 version.\n\n**Implicit assert on status code:**\n`* On Session` keywords automatically fail if an error status code is returned.\n`expect_status=` could be used to specify a status code (`201`, `OK`, `Bad request`)\nor `any` if you want to evaluate the response in any case.\n\n**Closer to the original Requests library:**\nNew keywords have the same parameter orders and structure as the original.\nLot of pre-parsing / encoding has been removed to have a more accurate and unchanged behaviour.\n\n**Cleaner project architecture:**\nMain keywords file has been split with a more logic division to allow better and faster maintenance.\n\n## \ud83e\udd16 More examples\n```robotframework\n*** Settings ***                                                                                       \nLibrary    Collections                                                                                 \nLibrary    RequestsLibrary                                                                             \n                                                                                                       \nSuite Setup    Create Session  jsonplaceholder  https://jsonplaceholder.typicode.com                   \n                                                                                                       \n*** Test Cases ***                                                                                     \n                                                                                                       \nGet Request Test                                                                                       \n    Create Session    google  http://www.google.com                                                    \n                                                                                                       \n    ${resp_google}=   GET On Session  google  /  expected_status=200                                   \n    ${resp_json}=     GET On Session  jsonplaceholder  /posts/1                                        \n                                                                                                       \n    Should Be Equal As Strings          ${resp_google.reason}  OK                                      \n    Dictionary Should Contain Value     ${resp_json.json()}  sunt aut facere repellat provident        \n                                                                                                       \nPost Request Test                                                                                      \n    &{data}=    Create dictionary  title=Robotframework requests  body=This is a test!  userId=1       \n    ${resp}=    POST On Session    jsonplaceholder  /posts  json=${data}  expected_status=anything     \n                                                                                                       \n    Status Should Be                 201  ${resp}                                                      \n```\n\n### \ud83d\udcd6 Keywords documentation\nRobotframework-requests offers a wide set of keywords which can be found in the [Keywords documentation](http://marketsquare.github.io/robotframework-requests/doc/RequestsLibrary.html)\n\n### \ud83d\udd2c Test examples\nYou can find many test examples inside the `atests` folder.\n\n## \ud83e\udd1d Contributing \u270d\ufe0f\nFeel free to contribute and open an issue in order to discuss it. Before doing it take a look at the [contribution guidelines](CONTRIBUTING.md).\n\n\ud83d\udce2 Get in touch with the community via slack and Users group\n- [Robot Framework Slack #requests channel](https://robotframework-slack-invite.herokuapp.com/)\n- [Robot Framework Users Group](https://groups.google.com/forum/#!forum/robotframework-users)\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Robot Framework keyword library wrapper around requests",
    "version": "0.9.7",
    "project_urls": {
        "Homepage": "https://github.com/MarketSquare/robotframework-requests"
    },
    "split_keywords": [
        "robotframework",
        "testing",
        "test",
        "automation",
        "http",
        "client",
        "requests",
        "rest",
        "api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cd1803ef4d1132f50b55220af5308db91e1cc5481b8b063cac5fafa625b00f64",
                "md5": "e645ab846f34d03c7bd600b3ef59278d",
                "sha256": "96315066318778cbcf5523cdb6175f5a0b8fec33275030a20dade3a3d98aeca2"
            },
            "downloads": -1,
            "filename": "robotframework_requests-0.9.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e645ab846f34d03c7bd600b3ef59278d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 21055,
            "upload_time": "2024-04-07T22:48:06",
            "upload_time_iso_8601": "2024-04-07T22:48:06.617165Z",
            "url": "https://files.pythonhosted.org/packages/cd/18/03ef4d1132f50b55220af5308db91e1cc5481b8b063cac5fafa625b00f64/robotframework_requests-0.9.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "61e2b17b940985e7b35f53767d908897870fcf4e143a2a7c2da76d152e4abc4c",
                "md5": "f706bede8b7296ec7b22670001af7d91",
                "sha256": "c2a2839813e1dc6b299e7d336314c9982c225c5b7e001ec893dc3555c6a95740"
            },
            "downloads": -1,
            "filename": "robotframework-requests-0.9.7.tar.gz",
            "has_sig": false,
            "md5_digest": "f706bede8b7296ec7b22670001af7d91",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 19404,
            "upload_time": "2024-04-07T22:48:08",
            "upload_time_iso_8601": "2024-04-07T22:48:08.471003Z",
            "url": "https://files.pythonhosted.org/packages/61/e2/b17b940985e7b35f53767d908897870fcf4e143a2a7c2da76d152e4abc4c/robotframework-requests-0.9.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-07 22:48:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MarketSquare",
    "github_project": "robotframework-requests",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "robotframework-requests"
}
        
Elapsed time: 0.22630s