Webservice for running Robot Framework tasks
Project description
Robot Task Webservice
A web service managing Robot Framework tasks.
Status: Prototype
Goal
This web service shall start Robot Framework tasks and return and cache the according reports.
Install
pip install robotframework-webservice
Usage
There are 2 types of endpoints:
- Execution
- Reporting
Execution
Endpoints that trigger execution of a robot task, for instance:
Call robot task:
http://localhost:5003/robotframework/run/mytask
Call robot task with variables:
http://localhost:5003/robotframework/run/mytask?myVariable1=42&anotherVariable=Mustermann
Response contains a header field x-request-id
that can be used to retrieve logs and reports of this execution asynchronously.
Reporting
Endpoints that provide log.html
and report.html
for a specific task execution. You require the x-request-id
from a previous response that triggered the execution.
Start web service
The web service starts automatically with uvicorn inside. Simply call:
python -m RobotFrameworkService.main
You can check available options with
python -m RobotFrameworkService.main --help
Example:
python -m RobotFrameworkService.main -p 5003 -t path_to_my_taskfolder
Example - Variablefiles:
You can provide variable files that are passed to all robot suites on execution:
python -m RobotFrameworkService.main -p 5003 -t path_to_my_taskfolder --variablefiles config/env/test.py
Custom WSGI server
You can start RobotFrameworkService with bare WSGI servers:
uvicorn RobotFrameworkService.main:app --port 5003
Or start web service with other WSGI server, i.e waitress:
waitress-serve --port 5003 RotbotFrameworkService.main:app
SwaggerUi
Swagger-UI is available under http://localhost:5003/docs
Demo-Tasks
This project contains some tasks for demonstration. They are located in tasks
folder. You may add
your own task suites in that directory, if you like.
Task name with spaces in URL
Tasks may contain spaces, URL must not. Luckily, Robot Framework supports CamelCase as well as snake_case syntax.
Meaning: "Another Task" can be trigger in url with parameter AnotherTask
or another_task
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file robotframework-webservice-0.5.1.tar.gz
.
File metadata
- Download URL: robotframework-webservice-0.5.1.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7854e7220ee09dfbe03f81626be2295d11e1034e55585591e6e28d1b3def57a |
|
MD5 | 4171a2762cc66485102bd2c35d968c94 |
|
BLAKE2b-256 | 263729d8b08a4497e33e6c58bec7b744c181ca428c6680eea4b7523b75b5d55a |
File details
Details for the file robotframework_webservice-0.5.1-py3-none-any.whl
.
File metadata
- Download URL: robotframework_webservice-0.5.1-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 814bf00c12a124a3c733c3e40496cef18abceeef3de53cd559fe5754afffd5ca |
|
MD5 | 3bd7cb5975fe6ef7b7b7685c4a9c0e45 |
|
BLAKE2b-256 | f17db76dfc57009ac5183efc0fce528d6812811eb415a9efdc16ade530ad281b |