Command line too to create a Robotframework library using a Postman collection
POSTMAN TO ROBOTFRAMEWORK
Usage:
postman2robot [--ifile <inputfile>] [--ofile <outputfile>] [options]
postman2robot -h
Options:
-i <inputfile>, --ifile <inputfile> Path to the postman collection. [default: collection.json]
-o <outputfile>, --ofile <outputfile> Path to the output folder. [default: ./postman_libraries]
Options-Flags:
-h, --help Show the help screen.
import requests
class newmanTest:
def GET_with_URL_Params(self):
"""
Simple GET request with URL Parameters
"""
url = "http://httpbin.org/get?lol=true"
method = "GET"
headers = {}
response = requests.request(method, url, headers=headers)
return response.text
*** Settings ***
Documentation A test suite with a single test to validate the library.
...
Library ./postman_libraries/newmanTest.py
*** Test Cases ***
Valid Library
GET with URL Params