asyrjasalo / RESTinstance

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

How to deal with XML format? #83

Closed DoanhPoPu closed 4 years ago

DoanhPoPu commented 4 years ago

Currently, I researched the way for API testing with Python. I saw that RESTinstance is okay with JSON and Python but XML. Any librabry can handle XML or we need to write own codes to handle XML output?

Hope to see your response soon! Have a nice day!

asyrjasalo commented 4 years ago

I think there is a XML library for Robot Framework.

DoanhPoPu commented 4 years ago

https://robotframework.org/robotframework/latest/libraries/XML.html

Thanks. Let me try to integrate it with your lib :)

asyrjasalo commented 4 years ago

Totally cool!

I think everything the library provides ought to be doable for XML as well, as XML Schema can cover the respective (JSON) Schema parts.

Feel free to drop us a link to POC/fork/PR so it's easier to help with questions.

DoanhPoPu commented 4 years ago

I'm using XML - builtin lib of Robotframework. And it's working fine with my expect. One more request for you, any suggestion for me if I would like to get XML response by your libs. Currently, I can update the content_type="application/json" by "application/xml" while instantiating new object REST. I think I can override this property by set_headers method, can't I?

Thanks for your libs :)

asyrjasalo commented 4 years ago

Yes. What was the question?

Thanks.