cURL to Robot Framework
Turn a cURL command into a Robot Framework RequestsLibrary test.
This tool needs JavaScript enabled to run in your browser.
What this tool does
This tool converts a cURL command into a Robot Framework test that uses RequestsLibrary. It reads the request and writes a complete suite: a session, the headers, parameters and body, the request keyword, and a status check.
How it maps to RequestsLibrary
- The host becomes a
Create Sessionwith the aliasapi; the path goes on the request keyword. - The method becomes the matching keyword, such as
POST On Session. - Headers and query parameters are built with
Create Dictionaryand passed asheaders=andparams=. - A JSON body is built with
Evaluateandjson.loads, then passed asjson=. - Basic auth from
-ubecomes aCreate Listpassed to the session.
Good to know
Robot Framework separates arguments with at least two spaces, so the output uses four-space gaps and will paste straight into a .robot file. You will need RequestsLibrary installed. The generated test asserts a 200 status and logs the response body; adjust the expected status and add the checks your case needs.
Common use cases
- Starting a keyword-driven API test from a captured request.
- Giving a manual tester a runnable version of an API call.
- Building a regression suite from requests you already have as cURL.
Frequently asked questions
- Do I need RequestsLibrary?
- Yes. The generated test uses RequestsLibrary keywords such as Create Session and POST On Session, so install it in your Robot Framework environment.
- Why the wide spacing in the output?
- Robot Framework separates arguments with at least two spaces. The output uses four-space gaps so it pastes straight into a .robot file.
Learning resources
Testsmith also runs hands-on courses and a free practice app for the skills behind this tool.