From a Payload
Before we dive into this, we suggest watching this quick video on how to login and generate a test in under a minute. Then read the below to get a better understanding of the nuances of the tests themselves.
From a Spec File
The above video shows you the method using Generate Test from a payload, and to generate a test from a spec file you can review this page. This includes Postman Collections.
{
"swagger": "2.0",
"info": {
"title": "demoapif",
"version": "",
"description": "Call to the APIF demo API All Products Get."
},
"host": "demoapi.apifortress.com",
"basePath": "/api/retail",
"schemes": [
"http"
],
"paths": {
"/product": {
"get": {
"responses": {
"200": {
"description": "OK",
"headers": {},
"examples": {
"application/json": [
{
"id": 1,
"name": "Baseball Cap",
"price": 29.99,
"category": "1",
"description": "This is product 1!",
"quantity": 5,
"imageURL": "http://image.com",
"color": [
"blue",
"yellow"
],
"createdAt": "2018-03-20T15:38:39.542Z",
"updatedAt": "2018-03-20T15:38:39.542Z"
},
{
"id": 2,
"name": "Long Sleeve Shirt",
"price": 39.99,
"category": "1",
"description": "This is product 2!",
"quantity": 7,
"imageURL": "http://image.com",
"color": [
"blue",
"yellow",
"red"
],
"createdAt": "2018-03-20T15:38:39.542Z",
"updatedAt": "2018-03-20T15:38:39.542Z"
},
{
"id": 3,
"name": "Bluetooth Headphones",
"price": 49.99,
"category": "1",
"description": "This is product 3!",
"quantity": 50,
"imageURL": "http://image.com",
"color": [
"green",
"yellow"
],
"createdAt": "2018-03-20T15:38:39.542Z",
"updatedAt": "2018-03-20T15:38:39.542Z"
}
]
}
}
},
"summary": "List All Products",
"description": "",
"tags": [],
"parameters": [],
"produces": [
"application/json"
]
}
}
},
"definitions": {
"Questions Collection": {}
}
}