@apica-io/asm-pm-runner
Version:
Run a postman collection in Apica ASM.
79 lines • 1.5 kB
JSON
{
"info": {
"_postman_id": "e997536f-4d4e-427a-a28c-b1fd62832f68",
"name": "Ticket_Monster_Count_Events",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Get events",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"let eventCount =pm.response.json().length;",
"pm.collectionVariables.set(\"_Apica_ReturnValue\",eventCount)",
"pm.collectionVariables.set(\"_Apica_ReturnUnit\",\"events\")",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/ticket-monster/rest/events",
"host": [
"{{baseUrl}}"
],
"path": [
"ticket-monster",
"rest",
"events"
]
}
},
"response": []
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
],
"variable": [
{
"key": "baseUrl",
"value": "http://ticketmonster.apicasystem.com"
},
{
"key": "_Apica_ReturnValue",
"value": ""
},
{
"key": "_Apica_ReturnUnit",
"value": ""
}
]
}