github.com/kubeshop/testkube@v1.17.23/test/postman/LongRun.postman_collection.json (about)

     1  {
     2  	"info": {
     3  		"_postman_id": "543efea0-2137-4289-ae72-55b8fd121c88",
     4  		"name": "LongRun",
     5  		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
     6  	},
     7  	"item": [
     8  		{
     9  			"name": "kubeshop homepage",
    10  			"event": [
    11  				{
    12  					"listen": "test",
    13  					"script": {
    14  						"exec": [
    15  							"pm.test(\"Status code is 200\", function () {",
    16  							"    pm.response.to.have.status(200);",
    17  							"});"
    18  						],
    19  						"type": "text/javascript"
    20  					}
    21  				}
    22  			],
    23  			"request": {
    24  				"method": "GET",
    25  				"header": [],
    26  				"url": {
    27  					"raw": "https://kubeshop.io/",
    28  					"protocol": "https",
    29  					"host": [
    30  						"kubeshop",
    31  						"io"
    32  					],
    33  					"path": [
    34  						""
    35  					]
    36  				}
    37  			},
    38  			"response": []
    39  		},
    40  		{
    41  			"name": "kubeshop team",
    42  			"event": [
    43  				{
    44  					"listen": "test",
    45  					"script": {
    46  						"exec": [
    47  							"// save team members to variable",
    48  							"const $ = cheerio.load(pm.response.text());",
    49  							"let team = [];",
    50  							"$('.bio-title').each(function(i,e) {",
    51  							"   team.push($(e).text());",
    52  							"});",
    53  							"",
    54  							"pm.test(\"Status code is 200\", function () {",
    55  							"    pm.response.to.have.status(200);",
    56  							"});",
    57  							"",
    58  							"pm.environment.set(\"team\", team);"
    59  						],
    60  						"type": "text/javascript"
    61  					}
    62  				}
    63  			],
    64  			"request": {
    65  				"method": "GET",
    66  				"header": [],
    67  				"url": {
    68  					"raw": "https://kubeshop.io/our-team",
    69  					"protocol": "https",
    70  					"host": [
    71  						"kubeshop",
    72  						"io"
    73  					],
    74  					"path": [
    75  						"our-team"
    76  					]
    77  				}
    78  			},
    79  			"response": []
    80  		},
    81  		{
    82  			"name": "Save team to requestBin",
    83  			"request": {
    84  				"method": "GET",
    85  				"header": [],
    86  				"url": {
    87  					"raw": "https://en1gyetbc4hqz0h.m.pipedream.net?team={{team}}",
    88  					"protocol": "https",
    89  					"host": [
    90  						"en1gyetbc4hqz0h",
    91  						"m",
    92  						"pipedream",
    93  						"net"
    94  					],
    95  					"query": [
    96  						{
    97  							"key": "team",
    98  							"value": "{{team}}"
    99  						}
   100  					]
   101  				}
   102  			},
   103  			"response": []
   104  		},
   105  		{
   106  			"name": "Get all docs pages",
   107  			"event": [
   108  				{
   109  					"listen": "test",
   110  					"script": {
   111  						"exec": [
   112  							"const $ = cheerio.load(pm.response.text());",
   113  							"",
   114  							"const links = []",
   115  							"$('.md-nav__link').each((i,e) => { if($(e).attr('href'))links.push($(e).attr('href'))});",
   116  							"console.log(links);",
   117  							"",
   118  							"for(i in links) {",
   119  							"    pm.test(\"Testing \" + links[i] + \" page\", function () {",
   120  							"        pm.sendRequest('https://kubeshop.github.io/testkube/'+links[i], function (err, response) {",
   121  							"            setTimeout(function(){ ",
   122  							"                console.log(links[i] +\" response: \" + $('h1', response.text()).text());",
   123  							"            }, 31000);",
   124  							"            pm.expect(response.code).to.eq(200);",
   125  							"        });",
   126  							"    });",
   127  							"}",
   128  							""
   129  						],
   130  						"type": "text/javascript"
   131  					}
   132  				}
   133  			],
   134  			"request": {
   135  				"method": "GET",
   136  				"header": [],
   137  				"url": {
   138  					"raw": "https://docs.testkube.io/",
   139  					"protocol": "https",
   140  					"host": [
   141  						"kubeshop",
   142  						"github",
   143  						"io"
   144  					],
   145  					"path": [
   146  						"testkube",
   147  						""
   148  					]
   149  				}
   150  			},
   151  			"response": []
   152  		}
   153  	],
   154  	"event": [
   155  		{
   156  			"listen": "prerequest",
   157  			"script": {
   158  				"type": "text/javascript",
   159  				"exec": [
   160  					""
   161  				]
   162  			}
   163  		},
   164  		{
   165  			"listen": "test",
   166  			"script": {
   167  				"type": "text/javascript",
   168  				"exec": [
   169  					""
   170  				]
   171  			}
   172  		}
   173  	],
   174  	"variable": [
   175  		{
   176  			"key": "JACEK_POSITION",
   177  			"value": "none"
   178  		}
   179  	]
   180  }