Does anybody know how to use the REST Library for Robot Framework? The library is available here http://code.google.com/p/robotframework-restlibrary/source/browse/trunk/RestLibrary.py. It seems like there is no documentation available.
I tried something like this in Robot Framework but there is no response coming back from the request:
REST Test Case
Get https://maps.googleapis.com/maps/api/timezone/json?location=39.6034810,-119.6822510×tamp=1331161200&sensor=true
Response test
Any ideas how to use this library?
So our custom library can be imported in the Settings section including the relative path where the file is located. Once the file is imported, you can start using the custom keywords inside your robot script.
To import the Python script inside Robot, we use the keyword Library in the Robot file under settings. To call the function, we use <file_name><dot><function name> . To add keywords inside the function, we use the keyword decorator. Here, BuildIn().
ROBOT framework is not only for REST APIs testing, it can be used for testing GUI (using selenium library ), verify database (using database library) and there are many more libraries which can be leveraged.
REST Library for Robot Framework is not developed since 2009 (see changes).
Robot Framework official page references several HTTP level testing libraries, as for example:
robotframework-requests - Development is active and uses Requests HTTP python library.
Example Usage:
Grab Avatar Url
Create Session github https://api.github.com
${resp}=
... Get Request github /users/jandias
Should Be Equal As Strings
... ${resp.status_code} 200
Dictionary Should Contain Key
... ${resp.json()} avatar_url
robotframework-httplibrary - Uses WebTest (with livetest) python library...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With