Skip to content
Tools

cURL to Robot Framework

Turn a cURL command into a Robot Framework RequestsLibrary test.

Local
Robot Framework

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 Session with the alias api; 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 Dictionary and passed as headers= and params=.
  • A JSON body is built with Evaluate and json.loads, then passed as json=.
  • Basic auth from -u becomes a Create List passed 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.

Feedback welcome

Found a bug in this tool, or want it to do something it does not? Tell us and we will take a look.