-
-
Save SyntaxColoring/5901b2093c1b391ec377217a7ac64111 to your computer and use it in GitHub Desktop.
Postman robot-server testing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"info": { | |
"_postman_id": "01d6d4d2-9041-4a27-9c98-68471614b041", | |
"name": "Protocols", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
}, | |
"item": [ | |
{ | |
"name": "GET /protocols", | |
"request": { | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "Opentrons-Version", | |
"value": "2", | |
"type": "text" | |
} | |
], | |
"url": { | |
"raw": "{{hostname}}:31950/protocols", | |
"host": [ | |
"{{hostname}}" | |
], | |
"port": "31950", | |
"path": [ | |
"protocols" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "POST /protocols", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"exec": [ | |
"pm.test(\"Protocol ID created\", () => {", | |
" const body = pm.response.json()", | |
" const id = body.data.id", | |
"", | |
" pm.expect(typeof id).to.equal('string')", | |
" pm.globals.set(\"protocol_id\", id)", | |
"})", | |
"" | |
], | |
"type": "text/javascript" | |
} | |
} | |
], | |
"request": { | |
"method": "POST", | |
"header": [ | |
{ | |
"key": "Opentrons-Version", | |
"value": "2", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "formdata", | |
"formdata": [ | |
{ | |
"key": "files", | |
"type": "file", | |
"src": [], | |
"disabled": true | |
} | |
] | |
}, | |
"url": { | |
"raw": "http://{{hostname}}:31950/protocols", | |
"protocol": "http", | |
"host": [ | |
"{{hostname}}" | |
], | |
"port": "31950", | |
"path": [ | |
"protocols" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "GET /protocols/:protocol_id", | |
"request": { | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "Opentrons-Version", | |
"value": "2", | |
"type": "text" | |
} | |
], | |
"url": { | |
"raw": "http://{{hostname}}:31950/protocols/{{protocol_id}}", | |
"protocol": "http", | |
"host": [ | |
"{{hostname}}" | |
], | |
"port": "31950", | |
"path": [ | |
"protocols", | |
"{{protocol_id}}" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "DELETE /protocols/:protocol_id", | |
"request": { | |
"method": "DELETE", | |
"header": [ | |
{ | |
"key": "Opentrons-Version", | |
"value": "2", | |
"type": "text" | |
} | |
], | |
"url": { | |
"raw": "http://{{hostname}}:31950/protocols/{{protocol_id}}", | |
"protocol": "http", | |
"host": [ | |
"{{hostname}}" | |
], | |
"port": "31950", | |
"path": [ | |
"protocols", | |
"{{protocol_id}}" | |
] | |
} | |
}, | |
"response": [] | |
} | |
], | |
"event": [ | |
{ | |
"listen": "prerequest", | |
"script": { | |
"type": "text/javascript", | |
"exec": [ | |
"" | |
] | |
} | |
}, | |
{ | |
"listen": "test", | |
"script": { | |
"type": "text/javascript", | |
"exec": [ | |
"" | |
] | |
} | |
} | |
], | |
"variable": [ | |
{ | |
"key": "hostname", | |
"value": "localhost" | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"info": { | |
"_postman_id": "d354a836-b54e-4a44-a034-72157fe48fb8", | |
"name": "Sessions", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
}, | |
"item": [ | |
{ | |
"name": "GET /sessions", | |
"request": { | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "Opentrons-Version", | |
"value": "2", | |
"type": "text" | |
} | |
], | |
"url": { | |
"raw": "{{hostname}}:31950/sessions", | |
"host": [ | |
"{{hostname}}" | |
], | |
"port": "31950", | |
"path": [ | |
"sessions" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "POST /sessions", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"exec": [ | |
"pm.test(\"Session ID created\", () => {", | |
" const body = pm.response.json()", | |
" const id = body.data.id", | |
"", | |
" pm.expect(typeof id).to.equal('string')", | |
" pm.globals.set(\"session_id\", id)", | |
"})", | |
"" | |
], | |
"type": "text/javascript" | |
} | |
} | |
], | |
"request": { | |
"method": "POST", | |
"header": [ | |
{ | |
"key": "Opentrons-Version", | |
"value": "2", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\n \"data\": {\n \"sessionType\": \"protocol\",\n \"createParams\": {\n \"protocolId\": \"{{protocol_id}}\"\n }\n }\n}", | |
"options": { | |
"raw": { | |
"language": "json" | |
} | |
} | |
}, | |
"url": { | |
"raw": "http://localhost:31950/sessions", | |
"protocol": "http", | |
"host": [ | |
"localhost" | |
], | |
"port": "31950", | |
"path": [ | |
"sessions" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "GET /sessions/:session_id", | |
"request": { | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "Opentrons-Version", | |
"value": "2", | |
"type": "text" | |
} | |
], | |
"url": { | |
"raw": "http://{{hostname}}:31950/sessions/{{session_id}}", | |
"protocol": "http", | |
"host": [ | |
"{{hostname}}" | |
], | |
"port": "31950", | |
"path": [ | |
"sessions", | |
"{{session_id}}" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "DELETE /sessions/:session_id", | |
"request": { | |
"method": "DELETE", | |
"header": [ | |
{ | |
"key": "Opentrons-Version", | |
"value": "2", | |
"type": "text" | |
} | |
], | |
"url": { | |
"raw": "http://{{hostname}}:31950/sessions/{{session_id}}", | |
"protocol": "http", | |
"host": [ | |
"{{hostname}}" | |
], | |
"port": "31950", | |
"path": [ | |
"sessions", | |
"{{session_id}}" | |
] | |
} | |
}, | |
"response": [] | |
} | |
], | |
"event": [ | |
{ | |
"listen": "prerequest", | |
"script": { | |
"type": "text/javascript", | |
"exec": [ | |
"" | |
] | |
} | |
}, | |
{ | |
"listen": "test", | |
"script": { | |
"type": "text/javascript", | |
"exec": [ | |
"" | |
] | |
} | |
} | |
], | |
"variable": [ | |
{ | |
"key": "hostname", | |
"value": "localhost" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment