Demo how to use robotframework and httplibrary to test API
- python3
- pip for python3
Check requirements
Or you can just run on repository root:
pip install -r requirements.txt
API is written in python using bottlepy library.
To run application just cd to root folder of the git repository:
python app.py
When API is running open browser http://localhost:8080
To run acceptance tests, run the following command:
robot tests/acceptance/
HTTP method | url | params | returns |
---|---|---|---|
GET | / | None | [{id:0, name:"...", description:"..."}, ...] |
GET | /blog/<id> |
None | {id:0, name:"...", description: "...", content:"..."} / 404 |
PUT | /blog/<id> /update |
name (string), description (string), content (string) | 200 / 404 |
POST | /blog/new | name (string), description (string), content (string) | 200 |
DELETE | /blog/<id> /delete |
None | 200 / 404 |