52 lines
1.9 KiB
JSON
52 lines
1.9 KiB
JSON
[
|
|
{
|
|
"v": 1,
|
|
"name": "tests",
|
|
"folders": [],
|
|
"requests": [
|
|
{
|
|
"v": "1",
|
|
"endpoint": "https://echo.hoppscotch.io/<<HEADERS_TYPE1>>",
|
|
"name": "",
|
|
"params": [],
|
|
"headers": [],
|
|
"method": "GET",
|
|
"auth": {
|
|
"authType": "none",
|
|
"authActive": true,
|
|
"addTo": "Headers",
|
|
"key": "",
|
|
"value": ""
|
|
},
|
|
"preRequestScript": "pw.env.set(\"HEADERS_TYPE1\", \"devblin_local1\");",
|
|
"testScript": "// Check status code is 200\npwd.test(\"Status code is 200\", ()=> {\n pw.expect(pw.response.status).toBe(200);\n});\n\n// Check JSON response property\npw.test(\"Check JSON response property\", ()=> {\n pw.expect(pw.response.body.method).toBe(\"GET\");\n pw.expect(pw.response.body.headers).toBeType(\"string\");\n});",
|
|
"body": {
|
|
"contentType": "application/json",
|
|
"body": "{\n\"test\": \"<<HEADERS_TYPE1>>\"\n}"
|
|
}
|
|
},
|
|
{
|
|
"v": "1",
|
|
"endpoint": "https://echo.hoppscotch.dio/<<HEADERS_TYPE2>>",
|
|
"name": "success",
|
|
"params": [],
|
|
"headers": [],
|
|
"method": "GET",
|
|
"auth": {
|
|
"authType": "none",
|
|
"authActive": true,
|
|
"addTo": "Headers",
|
|
"key": "",
|
|
"value": ""
|
|
},
|
|
"preRequestScript": "pw.env.setd(\"HEADERS_TYPE2\", \"devblin_local2\");",
|
|
"testScript": "// Check status code is 200\npw.test(\"Status code is 200\", ()=> {\n pw.expect(pw.response.status).toBe(300);\n});\n\n// Check JSON response property\npw.test(\"Check JSON response property\", ()=> {\n pw.expect(pw.response.body.method).toBe(\"GET\");\n pw.expect(pw.response.body.headers).toBeType(\"object\");\n});",
|
|
"body": {
|
|
"contentType": "application/json",
|
|
"body": "{\n\"test\": \"<<HEADERS_TYPE2>>\"\n}"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|