Skip to content

Instantly share code, notes, and snippets.

@jamesgeorge007
Last active November 17, 2023 11:08
Show Gist options
  • Save jamesgeorge007/082e49a88b384001181cb5e044f4f959 to your computer and use it in GitHub Desktop.
Save jamesgeorge007/082e49a88b384001181cb5e044f4f959 to your computer and use it in GitHub Desktop.
Test data
[
{
"id": "clna65a120004qr0iswm647p8",
"v": 1,
"name": "Pokemon API",
"folders": [],
"requests": [
{
"id": "clna65a3e000hqr0i0kltosc2",
"v": "1",
"auth": {
"authType": "none",
"authActive": true
},
"body": {
"body": null,
"contentType": null
},
"endpoint": "<<baseURL>>/pokemon",
"headers": [],
"method": "GET",
"name": "Get Three Pokemon",
"params": [
{
"key": "offset",
"value": "6",
"active": true
},
{
"key": "limit",
"value": "3",
"active": true
}
],
"preRequestScript": "",
"testScript": ""
}
]
},
{
"id": "clna65a100003qr0ihxuf6isb",
"v": 1,
"name": "Test",
"folders": [],
"requests": [
{
"id": "clna65a2f0007qr0ia6buk28u",
"v": "1",
"auth": {
"authType": "none",
"authActive": true
},
"body": {
"body": null,
"contentType": null
},
"endpoint": "https://pokeapi.co/api/v",
"headers": [],
"method": "GET",
"name": "Pokemon-api",
"params": [],
"preRequestScript": "",
"testScript": ""
},
{
"id": "clna65a2i0009qr0ii6ytihpl",
"v": "1",
"auth": {
"authType": "none",
"authActive": true
},
"body": {
"body": null,
"contentType": null
},
"endpoint": "<<baseURL>>/<<method>>",
"headers": [],
"method": "GET",
"name": "pre-request-scripts-sample",
"params": [],
"preRequestScript": "pw.env.set(\"baseURL\", \"https://httpbin.org\");\npw.env.set(\"method\", \"get\");\n",
"testScript": ""
},
{
"id": "clna65a2o000bqr0ie8e4j0m7",
"v": "1",
"auth": {
"authType": "none",
"authActive": true
},
"body": {
"body": null,
"contentType": null
},
"endpoint": "https://echo.hoppscotch.io",
"headers": [],
"method": "GET",
"name": "Test II",
"params": [],
"preRequestScript": "",
"testScript": ""
},
{
"id": "clna65a37000dqr0ius8ivypz",
"v": "1",
"auth": {
"authType": "none",
"authActive": true
},
"body": {
"body": null,
"contentType": null
},
"endpoint": "https://reqres.in/api/users/10",
"headers": [],
"method": "GET",
"name": "Assert response payload",
"params": [],
"preRequestScript": "",
"testScript": "pw.test(\"Check first name\", () => {\n const user = pw.response.body.data;\n pw.expect(user.first_name).toBe(\"Byron\");\n pw.expect(user.first_name).toBeType(\"string\");\n});\n"
},
{
"id": "clna65a3a000fqr0itqhucr1u",
"v": "1",
"auth": {
"authType": "none",
"authActive": true
},
"body": {
"body": null,
"contentType": null
},
"endpoint": "https://echo.hoppscotch.io",
"headers": [],
"method": "DELETE",
"name": "Test III",
"params": [],
"preRequestScript": "",
"testScript": ""
},
{
"id": "clna65a3t000lqr0i19fvh0no",
"v": "1",
"auth": {
"authType": "none",
"authActive": true
},
"body": {
"body": null,
"contentType": null
},
"endpoint": "https://www.httpbin.org/status/200",
"headers": [],
"method": "GET",
"name": "Post request tests",
"params": [],
"preRequestScript": "",
"testScript": "pw.test(\"Response is ok\", () => { pw.expect(pw.response.status).toBeLevel2xx(); });"
}
]
},
{
"id": "clnahlczp001eqr0in6tmaj8f",
"v": 1,
"name": "Random Test User",
"folders": [],
"requests": [
{
"id": "clna65a3n000jqr0ity8rimcn",
"v": "1",
"auth": {
"authType": "none",
"authActive": true
},
"body": {
"body": null,
"contentType": null
},
"endpoint": "<<baseURL>>users/<<randomValue>>",
"headers": [],
"method": "GET",
"name": "random-test-user",
"params": [],
"preRequestScript": "const random = Math.floor(Math.random() * 10);\npw.env.set(\"randomValue\", random.toString());\n",
"testScript": ""
}
]
},
{
"id": "clnahqsqm001yqr0ij927jtcp",
"v": 1,
"name": "Echo",
"folders": [],
"requests": [
{
"id": "clnahqvss0020qr0i43qgblzm",
"v": "1",
"auth": {
"authType": "none",
"authActive": true
},
"body": {
"body": null,
"contentType": null
},
"endpoint": "<<echoBaseURL>>",
"headers": [],
"method": "GET",
"name": "Basic echo",
"params": [],
"preRequestScript": "",
"testScript": ""
}
]
}
]
[
{
"id": "clnahloph001jqr0ikcfvt2cx",
"name": "Random Test User",
"variables": [
{
"key": "randomValue",
"value": "8"
},
{
"key": "baseURL",
"value": "https://reqres.in/api/"
}
]
},
{
"id": "clnahhisv000zqr0ic5ju5ecz",
"name": "Pokemon API Base URL",
"variables": [
{
"key": "baseURL",
"value": "https://pokeapi.co/api/v2"
}
]
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment