Web based application integration with Robotframework based on REST API

Hi Team, I have a web based platform and I need to integrate that platform with the Robotframework. REST API is the preferred option for the integration.

To begin my integration I need to the answers for following questions -

  1. What all types of entities/issue types are supported in Robotframework - Testcase is supported, are there any other entities like Test Result, Test Steps supported as well?
  2. Does CRUD operations supported on the available entities using the REST API?
  3. Is there any documentation available for REST API calls for the entities e.g. Test Cases?
  4. Are there sample input and output that can I use to check the REST API calls through Postman before I actually begin my integration with my web based platform?

I may be wrong, but as far as I know, Robotframework is not a server based app. There is no endpoint to do HTTP requests. The integration is done, usually at xUnit XML report from Robotframework, or even from the normal (fully info) output.xml.
There is also the Remote server, but the purpose is to provide Library keywords, not execution state.

Thank you @HelioGuilherme66 for the response. I am very new to Robotframework, still going through the available documentation to understand the basics. But based on your response I can sense that REST API most probably would not be the option here from the integration point of view due to endpoint unavailability.

You may want to read about Listeners. If you want to see a listener in practice, you can use RIDE, which has a listener showing the execution steps.

1 Like

Sure, Thank you.

Hi Harshad,

Maybe I read your question differently to @HelioGuilherme66? Are you asking:

  1. How to test an application’s rest API with robot framework?
  2. How to use robot framework’s rest api to start tests/get results?
  3. How to connect robot framework to the rest API of another tool?

I’ll give some high level answers and you can ask more detail on the one you are wanting to know more about:

  1. There are several libraries for testing rest api’s, e.g. Requests Library, RESTinstance, SoapLibrary, and others
  2. robot framework doesn’t have a rest api, there is a python api you can use if you load robot framework as a python module. usually integration with things like build servers is done by running the robot command with the robot file(s) and then collecting/parsing the the xml result
  3. There a few way’s this can be done, a simple python script to parse the xml result and post back the results to the rest api on test completion, or using a listener to trigger the rest api with the test/step result as each test/step completes are the common options but not the only ones.

Hope that gives some clarity,