asyrjasalo / RESTinstance

Robot Framework library for RESTful JSON APIs
https://pypi.org/project/RESTinstance
GNU Lesser General Public License v3.0
207 stars 84 forks source link

[Question] How to enable request and response log in http method? #118

Closed 4nif closed 2 years ago

4nif commented 3 years ago

Hi

Is it possible to enable request and response log for each http method (POST, GET, PUT, etc) in Robotframework report?

I know I can use Output keyword, but I'll have to add this keyword on every HTTP method that I use in the test cases. Is it possible to enable request and response by default in robotframework report?

Thanks

Atihinen commented 3 years ago

You could either create own testlibrary (http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#extending-robot-framework) that will extend to RESTinstance, or create keyword that will take the request keyword as an argument and then run the output after that one.

asimell commented 3 years ago

As a follow up, having keyword specific logging is somewhat implemented with https://github.com/asyrjasalo/RESTinstance/issues/85 and is on the scope for release 1.2, which we are hopefully releasing in the upcoming weeks.

4nif commented 3 years ago

Thanks @asimell, looking forward for the new release.

asimell commented 2 years ago

1.2.0 has been released with #85 implementation. We're aware it's not exactly what you asked, but please check if that fulfills your needs. I'm closing the issue for now, but please reopen if needed.