{"id":26176420,"url":"https://github.com/MarketSquare/robotframework-webservice","last_synced_at":"2025-03-11T21:02:05.098Z","repository":{"id":39647108,"uuid":"366039550","full_name":"MarketSquare/robotframework-webservice","owner":"MarketSquare","description":"Webservice for running Robot Framework test cases.","archived":false,"fork":false,"pushed_at":"2024-07-26T14:24:18.000Z","size":177,"stargazers_count":23,"open_issues_count":7,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-06T02:49:27.240Z","etag":null,"topics":["fastapi","python","robotframework"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarketSquare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-05-10T12:44:44.000Z","updated_at":"2024-10-02T18:41:10.000Z","dependencies_parsed_at":"2023-02-01T03:31:20.409Z","dependency_job_id":"66db0cc3-cdda-447d-99f7-45d96a4f0405","html_url":"https://github.com/MarketSquare/robotframework-webservice","commit_stats":{"total_commits":79,"total_committers":7,"mean_commits":"11.285714285714286","dds":0.6708860759493671,"last_synced_commit":"170b106bcee0613fc9cc6aaefbdd71f55bf6bf1f"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarketSquare%2Frobotframework-webservice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarketSquare%2Frobotframework-webservice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarketSquare%2Frobotframework-webservice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarketSquare%2Frobotframework-webservice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarketSquare","download_url":"https://codeload.github.com/MarketSquare/robotframework-webservice/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243112144,"owners_count":20238185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","python","robotframework"],"created_at":"2025-03-11T21:00:59.149Z","updated_at":"2025-03-11T21:02:05.085Z","avatar_url":"https://github.com/MarketSquare.png","language":"Python","funding_links":[],"categories":["Tools"],"sub_categories":["Execution Tools"],"readme":"[![PyPi license](https://badgen.net/github/license/Marketsquare/robotframework-webservice/)](https://pypi.com/project/robotframework-webservice/) [![PyPI pyversions](https://img.shields.io/pypi/pyversions/robotframework-webservice.svg)](https://pypi.python.org/pypi/robotframework-webservice/) [![PyPI download month](https://img.shields.io/pypi/dm/robotframework-webservice.svg)](https://pypi.python.org/pypi/robotframework-webservice/) \n\n# Robot Task Webservice\n\nA web service managing Robot Framework tasks/tests.\n\n# Goal\n\nThis web service shall start Robot Framework tasks/tests and return and cache the according reports.\n\n# Installation and Execution\n\n## Docker\nYou can run the image and map your test cases into the webservice with a volume :\n```\ndocker run --rm --publish 5003:5003 \\\n           --volume \u003chost directory of test cases\u003e:/robot/tests \\\n           --env SUITE_FOLDER=tests \\\n           ghcr.io/marketsquare/robotframework-webservice:master\n```\nYou can also run the image and map your test cases and your variable files (separated by spaces) into the webservice with volumes :\n```\ndocker run --rm --publish 5003:5003 \\\n           --volume \u003chost directory of test cases\u003e:/robot/tests \\\n           --volume \u003chost directory of variable files\u003e:/robot/variables \\\n           --env SUITE_FOLDER=tests \\\n           --env \"VARIABLE_FILES=variables/variables.py variables/variables2.py\" \\\n           ghcr.io/marketsquare/robotframework-webservice:master\n```\n\n## Podman\nAlmost as Docker, but you might need to attach the webservice to the host network:\n```\npodman run --network host -v ./examples:/robot/tasks --env SUITE_FOLDER=tasks rf-webservice:latest\n```\n\n## Local\n```\npip install robotframework-webservice\n```\n\nand execute from command line:\n\n```\npython -m RobotFrameworkService.main -p 5003 -t path_to_my_taskfolder\n```\n\n# Usage\nThere are 2 types of endpoints: \n1. Execution\n2. Reporting\n\n## Execution\nEndpoints that trigger execution of a robot task/test, for instance:\n\nCall robot task/test:\n\n    http://localhost:5003/robotframework/run/mytask\n\nCall robot task/test with variables:\n\n    http://localhost:5003/robotframework/run/mytask?myVariable1=42\u0026anotherVariable=Mustermann\n\nResponse contains a header field `x-request-id` that can be used to retrieve logs and reports of this execution asynchronously (see reporting endpoints)\n\nThere are endpoints for synchronous and asynchronous request:\n\n```\n# connection remains open for duration of my task/test\nhttp://localhost:5003/robotframework/run/mytask\n\n# connection closes immediately - result must be requested with the x-request-id\nhttp://localhost:5003/robotframework/run/mytask/async\n```\n\nThere is also the all-in-one endpoint `POST http://localhost:5003/robotframework/run` which trigger execution of a robot files, test, task or suite.\n\nIt can be customized with options in JSON payload.\nAll available options are documented in Swagger schema and examples.\n\nResponse contains a header field `x-request-id` that can be used to retrieve logs and reports.\n\nBy default, execution is asynchronous, but it can be changed with **sync** option.\n\n**There is no limitation on executed Robot processes! It is easy to push the webservice in DOS with too many requests at once**\n\n### Call robot test\n\n```\ncurl -X 'POST' \\\n  'http://localhost:5003/robotframework/run' \\\n  -H 'accept: application/json' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"paths\": [\n    \"examples\"\n  ],\n  \"test\": \"Demonstration Test\"\n}'\n```\n\n### Call robot task\n\n```\ncurl -X 'POST' \\\n  'http://localhost:5003/robotframework/run' \\\n  -H 'accept: application/json' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"paths\": [\n    \"examples\"\n  ],\n  \"task\": \"Demonstration Task\"\n}'\n```\n\n### Call robot task with variables\n\n```\ncurl -X 'POST' \\\n  'http://localhost:5003/robotframework/run' \\\n  -H 'accept: application/json' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"paths\": [\n    \"examples\"\n  ],\n  \"task\": \"Task with more variables\",\n  \"variables\": {\n    \"firstname\": \"Max\",\n    \"lastname\": \"Mustermann\"\n  }\n}'\n```\n\n## Reporting\nEndpoints 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.\n\n\n# Start web service\n\nThe web service starts automatically with uvicorn inside. Simply call:\n\n    python -m RobotFrameworkService.main\n\nYou can check available options with\n\n    python -m RobotFrameworkService.main --help\n\n## Example:\n\n    python -m RobotFrameworkService.main -p 5003 -t path_to_my_taskfolder\n\n## Example - Variablefiles:\n\nYou can provide variable files that are passed to all robot suites on execution:\n\n    python -m RobotFrameworkService.main -p 5003 -t path_to_my_taskfolder --variablefiles config/env/test.py\n\n# Custom WSGI server\n\nYou can start RobotFrameworkService with bare WSGI servers:\n    \n    uvicorn RobotFrameworkService.main:app --port 5003\n\nOr start web service with other WSGI server, i.e waitress:\n\n    waitress-serve --port 5003 RotbotFrameworkService.main:app\n\n# SwaggerUi\nSwagger-UI is available under `http://localhost:5003/docs`\n\n\n# Demo-Tasks\n\nThis project contains some tasks, tests and variables for demonstration. They are located in ``examples`` folder. You may add\nyour own task/test suites in that directory, if you like.\n\n# Task name with spaces in URL\n\nTasks may contain spaces, URL must not. Luckily, Robot Framework supports CamelCase as well as snake_case syntax.\nMeaning: \"Another Task\" can be trigger in url with parameter `AnotherTask` or ``another_task``\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMarketSquare%2Frobotframework-webservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMarketSquare%2Frobotframework-webservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMarketSquare%2Frobotframework-webservice/lists"}