48. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 10/5/2017 9:14:23 AM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

48.1 Files compared

# Location File Last Modified
1 GenISIS_Build_4.zip\Source Code\Services\src\test\resources Genisis API.postman_collection.json Tue Aug 29 18:23:32 2017 UTC
2 GenISIS_Build_4.zip\Source Code\Services\src\test\resources Genisis API.postman_collection.json Tue Oct 3 18:37:45 2017 UTC

48.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 6 8194
Changed 5 10
Inserted 0 0
Removed 0 0

48.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

48.4 Active regular expressions

No regular expressions were active.

48.5 Comparison detail

  1   {
  2           "v ariables":  [],
  3           "i nfo": {
  4                    "nam e": "Genis is2 API",
  5                    "_po stman_id":  "bcfd288c -caf8-ae63 -9a42-06f3 5a0153b2",
  6                    "des cription":  "Updated  to use a m ore restfu l design",
  7                    "sch ema": "htt ps://schem a.getpostm an.com/jso n/collecti on/v2.0.0/ collection .json"
  8           },
  9           "i tem": [
  10                    {
  11                             "name" : "Comment s",
  12                             "descr iption": " ",
  13                             "item" : [
  14                                      {
  15                                               "name": "C omments -  Create - O perations" ,
  16                                               "request":  {
  17                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/com ment",
  18                                                       "m ethod": "P OST",
  19                                                       "h eader": [
  20                                                                {
  21                                                                         "key":  "Content- Type",
  22                                                                         "value ": "applic ation/json ",
  23                                                                         "descr iption": " "
  24                                                                },
  25                                                                {
  26                                                                         "key":  "Accept-E ncoding",
  27                                                                         "value ": "applic ation/json ",
  28                                                                         "descr iption": " "
  29                                                                }
  30                                                       ],
  31                                                       "b ody": {
  32                                                                "mod e": "raw",
  33                                                                "raw ": "{\r\n\ t\"request Id\": 1,\r \n\t\"stat us\": \"Re turned\",\ r\n\t\"com ments\": \ "comment h ere test\" ,\r\n\t\"c reatedBy\" : \"genisi sdatamgr1@ gmail.com\ ",\r\n\t\" commentTyp e\": 1\r\n }"
  34                                                       },
  35                                                       "d escription ": ""
  36                                               },
  37                                               "response" : []
  38                                      },
  39                                      {
  40                                               "name": "C omments -  Create - G eneral",
  41                                               "request":  {
  42                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/com ment",
  43                                                       "m ethod": "P OST",
  44                                                       "h eader": [
  45                                                                {
  46                                                                         "key":  "Content- Type",
  47                                                                         "value ": "applic ation/json ",
  48                                                                         "descr iption": " "
  49                                                                },
  50                                                                {
  51                                                                         "key":  "Accept-E ncoding",
  52                                                                         "value ": "applic ation/json ",
  53                                                                         "descr iption": " "
  54                                                                }
  55                                                       ],
  56                                                       "b ody": {
  57                                                                "mod e": "raw",
  58                                                                "raw ": "{\r\n\ t\"request Id\": 1,\r \n\t\"stat us\": \"Re turned\",\ r\n\t\"com ments\": \ "comment h ere test\" ,\r\n\t\"c reatedBy\" : \"genisi sdatamgr1@ gmail.com\ ",\r\n\t\" commentTyp e\": 2\r\n }"
  59                                                       },
  60                                                       "d escription ": ""
  61                                               },
  62                                               "response" : []
  63                                      }
  64                             ]
  65                    },
  66                    {
  67                             "name" : "Request s",
  68                             "descr iption": " ",
  69                             "item" : [
  70                                      {
  71                                               "name": "R equests -  All",
  72                                               "event": [
  73                                                       {
  74                                                                "lis ten": "tes t",
  75                                                                "scr ipt": {
  76                                                                         "type" : "text/ja vascript",
  77                                                                         "exec" : [
  78                                                                                  "//meta  tests",
  79                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  80                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  81                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  82                                                                                  "",
  83                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  84                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  85                                                                                  "    ",
  86                                                                                  "    var  schema =  {",
  87                                                                                  "     \" items\": { ",
  88                                                                                  "          \"respon se\": \"ar ray\",",
  89                                                                                  "          \"succes s\": \"boo lean\",",
  90                                                                                  "          \"messag e\": \"str ing\"",
  91                                                                                  "         }",
  92                                                                                  "    };" ,
  93                                                                                  "    ",
  94                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  95                                                                                  "    ",
  96                                                                                  "    if  (tv4.error ) {",
  97                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  98                                                                                  "    }",
  99                                                                                  "    ",
  100                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  101                                                                                  "    ",
  102                                                                                  "    //i f success  is true we  have some  response  data",
  103                                                                                  "    if  (jsonData. success == = true) {" ,
  104                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  105                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  106                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  107                                                                                  "      " ,
  108                                                                                  "      / /single re sult, retu rn just th e object",
  109                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  110                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  111                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  112                                                                                  "      }  else if ( jsonData.r esponse) { ",
  113                                                                                  "           //multi ple result s, return  an array o f objects" ,
  114                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  115                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  116                                                                                  "      } ",
  117                                                                                  "    } e lse {",
  118                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  119                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  120                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  121                                                                                  "    }",
  122                                                                                  "    ",
  123                                                                                  "    //t ests speci fic to thi s API endp oint",
  124                                                                                  "    for  (var i in  jsonData. response)  {",
  125                                                                                  "         if (i > 1 0) {",
  126                                                                                  "             break ;",
  127                                                                                  "         }",
  128                                                                                  "         var reque st = jsonD ata.respon se[i];",
  129                                                                                  "         console.l og(request );",
  130                                                                                  "         tests[\"r equest \"  + i + \" h as an id f ield\"] =  (request.i d !== unde fined) ? t rue : fals e;",
  131                                                                                  "         tests[\"r equest \"  + i + \" i d is an in teger\"] =  (request. id !== und efined) ?  typeof req uest.id == = 'number'  : false;" ,
  132                                                                                  "         ",
  133                                                                                  "         tests[\"r equest \"  + i + \" h as a title  field\"]  = (request .title !==  undefined ) ? true :  false;",
  134                                                                                  "         tests[\"r equest \"  + i + \" t itle is a  string\"]  = (request .title !==  undefined ) ? typeof  request.t itle === ' string' :  false;",
  135                                                                                  "         ",
  136                                                                                  "         tests[\"r equest \"  + i + \"   has a desc ription fi eld\"] = ( request.de scription  !== undefi ned) ? tru e : false; ",
  137                                                                                  "         tests[\"r equest \"  + i + \" d escription  is a stri ng\"] = (r equest.des cription ! == undefin ed) ? type of request .descripti on === 'st ring' : fa lse;",
  138                                                                                  "         ",
  139                                                                                  "         tests[\"r equest \"  + i + \" h as a statu sDescripti on field\" ] = (reque st.statusD escription  !== undef ined) ? tr ue : false ;",
  140                                                                                  "         tests[\"r equest \"  + i + \" s tatusDescr iption is  a string\" ] = (reque st.statusD escription  !== undef ined) ? ty peof reque st.statusD escription  === 'stri ng' : fals e;",
  141                                                                                  "         ",
  142                                                                                  "         var valid StatusDesc riptions =  ['Draft',  'Submitte d', 'Appro ved', 'Sen t', 'Retur ned', 'Den ied', 'Req uestNotAcc epted', 'R equestAcce pted'];",
  143                                                                                  "         tests[\"r equest \"  + i + \" s tatusDescr iption is  a valid va lue\"] = ( request.st atusDescri ption !==  undefined)  ? validSt atusDescri ptions.ind exOf(reque st.statusD escription ) !== -1   : false;",
  144                                                                                  "         ",
  145                                                                                  "         tests[\"r equest \"  + i + \" h as a sourc e field\"]  = (reques t.sourceId  !== undef ined) ? tr ue : false ;",
  146                                                                                  "         tests[\"r equest \"  + i + \" s ource is a n integer\ "] = (requ est.source Id !== und efined) ?  typeof req uest.sourc e !== 'num ber' : fal se;",
  147                                                                                  "         ",
  148                                                                                  "         tests[\"r equest \"  + i + \" h as a study Approval f ield\"] =  (request.s tudyApprov alId !== u ndefined)  ? true : f alse;",
  149                                                                                  "         tests[\"r equest \"  + i + \" s tudyApprov al is a nu mber\"] =  (request.s tudyApprov alId !== u ndefined)  ? typeof j sonData.re sponse[0]. studyAppro val !== 'n umber' : f alse;",
  150                                                                                  "         ",
  151                                                                                  "         tests[\"r equest \"  + i + \" h as a creat edOn field \"] = (req uest.creat edOn !== u ndefined)  ? true : f alse;",
  152                                                                                  "         tests[\"r equest \"  + i + \" c reatedOn i s a number \"] = (req uest.creat edOn !== u ndefined)  ? typeof r equest.cre atedOn ===  'number'  : false;",
  153                                                                                  "         ",
  154                                                                                  "         tests[\"r equest \"  + i + \" h as a creat edBy field \"] = (req uest.creat edBy !== u ndefined)  ? true : f alse;",
  155                                                                                  "         tests[\"r equest \"  + i + \" c reatedBy i s a string \"] = (req uest.creat edBy !== u ndefined)  ? typeof r equest.cre atedBy ===  'string'  : false;",
  156                                                                                  "         ",
  157                                                                                  "         //tests[\ "request \ " + i + \"  has a not ify field\ "] = (requ est.notify  !== undef ined) ? tr ue : false ;",
  158                                                                                  "         //tests[\ "request \ " + i + \"  notify is  a boolean \"] = (req uest.notif y !== unde fined) ? t ypeof requ est.notify  === 'bool ean' : fal se;",
  159                                                                                  "         ",
  160                                                                                  "         //tests[\ "request \ " + i + \"  has a typ e field\"]  = (reques t.type !==  undefined ) ? true :  false;",
  161                                                                                  "         //tests[\ "request \ " + i + \"  type is a  number\"]  = (reques t.type !==  undefined ) ? typeof  request.t ype === 'n umber' : f alse;",
  162                                                                                  "         ",
  163                                                                                  "         //tests[\ "request \ " + i + \"  has a rea son field\ "] = (requ est.reason  !== undef ined) ? tr ue : false ;",
  164                                                                                  "         //tests[\ "request \ " + i + \"  reason is  a string\ "] = (requ est.reason  !== undef ined) ? (r equest.rea son ? type of request .reason == = 'string'  : request .reason == = null) :  false;",
  165                                                                                  "         ",
  166                                                                                  "         //tests[\ "request \ " + i + \"  has an as sociatedRe quests fie ld\"] = (r equest.ass ociatedReq uests !==  undefined)  ? true :  false;",
  167                                                                                  "         //tests[\ "request \ " + i + \"  associate dRequests  is an arra y\"] = (re quest.asso ciatedRequ ests !== u ndefined)  ? Array.is Array(requ est.associ atedReques ts) : fals e;",
  168                                                                                  "    }",
  169                                                                                  "} else  {",
  170                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  171                                                                                  "}"
  172                                                                         ]
  173                                                                }
  174                                                       }
  175                                               ],
  176                                               "request":  {
  177                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uests",
  178                                                       "m ethod": "G ET",
  179                                                       "h eader": [
  180                                                                {
  181                                                                         "key":  "Content- Type",
  182                                                                         "value ": "applic ation/json ",
  183                                                                         "descr iption": " "
  184                                                                },
  185                                                                {
  186                                                                         "key":  "Accept-E ncoding",
  187                                                                         "value ": "applic ation/json ",
  188                                                                         "descr iption": " "
  189                                                                }
  190                                                       ],
  191                                                       "b ody": {
  192                                                                "mod e": "formd ata",
  193                                                                "for mdata": [
  194                                                                         {
  195                                                                                  "key": " email",
  196                                                                                  "value":  "ge",
  197                                                                                  "type":  "text"
  198                                                                         },
  199                                                                         {
  200                                                                                  "key": " password",
  201                                                                                  "value":  "mysupers ecretpassw ord",
  202                                                                                  "type":  "text"
  203                                                                         }
  204                                                                ]
  205                                                       },
  206                                                       "d escription ": "retrie ve all req uest data"
  207                                               },
  208                                               "response" : []
  209                                      },
  210                                      {
  211                                               "name": "R equests -  By ID",
  212                                               "event": [
  213                                                       {
  214                                                                "lis ten": "tes t",
  215                                                                "scr ipt": {
  216                                                                         "type" : "text/ja vascript",
  217                                                                         "exec" : [
  218                                                                                  "//meta  tests",
  219                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  220                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  221                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  222                                                                                  "",
  223                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  224                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  225                                                                                  "    ",
  226                                                                                  "    var  schema =  {",
  227                                                                                  "     \" items\": { ",
  228                                                                                  "          \"respon se\": \"ar ray\",",
  229                                                                                  "          \"succes s\": \"boo lean\",",
  230                                                                                  "          \"messag e\": \"str ing\"",
  231                                                                                  "         }",
  232                                                                                  "    };" ,
  233                                                                                  "    ",
  234                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  235                                                                                  "    ",
  236                                                                                  "    if  (tv4.error ) {",
  237                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  238                                                                                  "    }",
  239                                                                                  "    ",
  240                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  241                                                                                  "    ",
  242                                                                                  "    //i f success  is true we  have some  response  data",
  243                                                                                  "    if  (jsonData. success == = true) {" ,
  244                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  245                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  246                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  247                                                                                  "      " ,
  248                                                                                  "      / /single re sult, retu rn just th e object",
  249                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  250                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  251                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  252                                                                                  "      }  else if ( jsonData.r esponse) { ",
  253                                                                                  "           //multi ple result s, return  an array o f objects" ,
  254                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  255                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  256                                                                                  "      } ",
  257                                                                                  "      " ,
  258                                                                                  "      / /specific  to this en dpoint",
  259                                                                                  "      t ests[\"req uest has t his ID\"]  = (jsonDat a.response  && jsonDa ta.respons e.id !== u ndefined)  ? jsonData .response. id === 1 :  false;",
  260                                                                                  "      " ,
  261                                                                                  "    } e lse {",
  262                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  263                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  264                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  265                                                                                  "    }",
  266                                                                                  "} else  {",
  267                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  268                                                                                  "}"
  269                                                                         ]
  270                                                                }
  271                                                       }
  272                                               ],
  273                                               "request":  {
  274                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uests/0",
  275                                                       "m ethod": "G ET",
  276                                                       "h eader": [
  277                                                                {
  278                                                                         "key":  "Content- Type",
  279                                                                         "value ": "applic ation/json ",
  280                                                                         "descr iption": " "
  281                                                                },
  282                                                                {
  283                                                                         "key":  "Accept-E ncoding",
  284                                                                         "value ": "applic ation/json ",
  285                                                                         "descr iption": " "
  286                                                                }
  287                                                       ],
  288                                                       "b ody": {
  289                                                                "mod e": "formd ata",
  290                                                                "for mdata": [
  291                                                                         {
  292                                                                                  "key": " email",
  293                                                                                  "value":  "ge",
  294                                                                                  "type":  "text"
  295                                                                         },
  296                                                                         {
  297                                                                                  "key": " password",
  298                                                                                  "value":  "mysupers ecretpassw ord",
  299                                                                                  "type":  "text"
  300                                                                         }
  301                                                                ]
  302                                                       },
  303                                                       "d escription ": "retrie ve a singl e request  by the ID  number"
  304                                               },
  305                                               "response" : []
  306                                      },
  307                                      {
  308                                               "name": "R equests -  By User",
  309                                               "event": [
  310                                                       {
  311                                                                "lis ten": "tes t",
  312                                                                "scr ipt": {
  313                                                                         "type" : "text/ja vascript",
  314                                                                         "exec" : [
  315                                                                                  "//meta  tests",
  316                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  317                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  318                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  319                                                                                  "",
  320                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  321                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  322                                                                                  "    ",
  323                                                                                  "    var  schema =  {",
  324                                                                                  "     \" items\": { ",
  325                                                                                  "          \"respon se\": \"ar ray\",",
  326                                                                                  "          \"succes s\": \"boo lean\",",
  327                                                                                  "          \"messag e\": \"str ing\"",
  328                                                                                  "         }",
  329                                                                                  "    };" ,
  330                                                                                  "    ",
  331                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  332                                                                                  "    ",
  333                                                                                  "    if  (tv4.error ) {",
  334                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  335                                                                                  "    }",
  336                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  337                                                                                  "    ",
  338                                                                                  "    //i f success  is true we  have some  response  data",
  339                                                                                  "    if  (jsonData. success == = true) {" ,
  340                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  341                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  342                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  343                                                                                  "      " ,
  344                                                                                  "      / /single re sult, retu rn just th e object",
  345                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  346                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  347                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  348                                                                                  "      }  else if ( jsonData.r esponse) { ",
  349                                                                                  "           //multi ple result s, return  an array o f objects" ,
  350                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  351                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  352                                                                                  "      } ",
  353                                                                                  "      " ,
  354                                                                                  "      / /tests spe cific to t his API ca ll",
  355                                                                                  "      f or (var i  in jsonDat a.response ) {",
  356                                                                                  "         if (i > 1 0) { break ; }",
  357                                                                                  "         var reque st = jsonD ata.respon se[i];",
  358                                                                                  "         tests[\"r equest \"  + i + \" c reatedBy =  genisisda tamgr1@gma il.com\"]  = request. createdBy  === 'genis isdatamgr1 @gmail.com ';",
  359                                                                                  "      } ",
  360                                                                                  "      " ,
  361                                                                                  "    } e lse {",
  362                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  363                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  364                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  365                                                                                  "    }",
  366                                                                                  "} else  {",
  367                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  368                                                                                  "}"
  369                                                                         ]
  370                                                                }
  371                                                       }
  372                                               ],
  373                                               "request":  {
  374                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uests/geni sisdatamgr 4@gmail.co m/createdB y",
  375                                                       "m ethod": "G ET",
  376                                                       "h eader": [
  377                                                                {
  378                                                                         "key":  "Content- Type",
  379                                                                         "value ": "applic ation/json ",
  380                                                                         "descr iption": " "
  381                                                                },
  382                                                                {
  383                                                                         "key":  "Accept-E ncoding",
  384                                                                         "value ": "applic ation/json ",
  385                                                                         "descr iption": " "
  386                                                                }
  387                                                       ],
  388                                                       "b ody": {
  389                                                                "mod e": "formd ata",
  390                                                                "for mdata": [
  391                                                                         {
  392                                                                                  "key": " email",
  393                                                                                  "value":  "ge",
  394                                                                                  "type":  "text"
  395                                                                         },
  396                                                                         {
  397                                                                                  "key": " password",
  398                                                                                  "value":  "mysupers ecretpassw ord",
  399                                                                                  "type":  "text"
  400                                                                         }
  401                                                                ]
  402                                                       },
  403                                                       "d escription ": "retrie ve all req uests by c reated by  a specific  user"
  404                                               },
  405                                               "response" : []
  406                                      },
  407                                      {
  408                                               "name": "R equests -  By DataMan ager",
  409                                               "event": [
  410                                                       {
  411                                                                "lis ten": "tes t",
  412                                                                "scr ipt": {
  413                                                                         "type" : "text/ja vascript",
  414                                                                         "exec" : [
  415                                                                                  "//meta  tests",
  416                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  417                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  418                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  419                                                                                  "",
  420                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  421                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  422                                                                                  "    ",
  423                                                                                  "    var  schema =  {",
  424                                                                                  "     \" items\": { ",
  425                                                                                  "          \"respon se\": \"ar ray\",",
  426                                                                                  "          \"succes s\": \"boo lean\",",
  427                                                                                  "          \"messag e\": \"str ing\"",
  428                                                                                  "         }",
  429                                                                                  "    };" ,
  430                                                                                  "    ",
  431                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  432                                                                                  "    ",
  433                                                                                  "    if  (tv4.error ) {",
  434                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  435                                                                                  "    }",
  436                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  437                                                                                  "    ",
  438                                                                                  "    //i f success  is true we  have some  response  data",
  439                                                                                  "    if  (jsonData. success == = true) {" ,
  440                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  441                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  442                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  443                                                                                  "      " ,
  444                                                                                  "      / /single re sult, retu rn just th e object",
  445                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  446                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  447                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  448                                                                                  "      }  else if ( jsonData.r esponse) { ",
  449                                                                                  "           //multi ple result s, return  an array o f objects" ,
  450                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  451                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  452                                                                                  "      } ",
  453                                                                                  "    } e lse {",
  454                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  455                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  456                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  457                                                                                  "    }",
  458                                                                                  "} else  {",
  459                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  460                                                                                  "}"
  461                                                                         ]
  462                                                                }
  463                                                       }
  464                                               ],
  465                                               "request":  {
  466                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uests/geni sisdatamgr 1@gmail.co m/dataMana ger",
  467                                                       "m ethod": "G ET",
  468                                                       "h eader": [
  469                                                                {
  470                                                                         "key":  "Content- Type",
  471                                                                         "value ": "applic ation/json ",
  472                                                                         "descr iption": " "
  473                                                                },
  474                                                                {
  475                                                                         "key":  "Accept-E ncoding",
  476                                                                         "value ": "applic ation/json ",
  477                                                                         "descr iption": " "
  478                                                                }
  479                                                       ],
  480                                                       "b ody": {
  481                                                                "mod e": "formd ata",
  482                                                                "for mdata": [
  483                                                                         {
  484                                                                                  "key": " email",
  485                                                                                  "value":  "ge",
  486                                                                                  "type":  "text"
  487                                                                         },
  488                                                                         {
  489                                                                                  "key": " password",
  490                                                                                  "value":  "mysupers ecretpassw ord",
  491                                                                                  "type":  "text"
  492                                                                         }
  493                                                                ]
  494                                                       },
  495                                                       "d escription ": "retrie ve all req uests that  were crea ted by use rs assigne d to this  data manag er"
  496                                               },
  497                                               "response" : []
  498                                      },
  499                                      {
  500                                               "name": "R equests -  By StudyAp proval",
  501                                               "event": [
  502                                                       {
  503                                                                "lis ten": "tes t",
  504                                                                "scr ipt": {
  505                                                                         "type" : "text/ja vascript",
  506                                                                         "exec" : [
  507                                                                                  "//meta  tests",
  508                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  509                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  510                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  511                                                                                  "",
  512                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  513                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  514                                                                                  "    ",
  515                                                                                  "    var  schema =  {",
  516                                                                                  "     \" items\": { ",
  517                                                                                  "          \"respon se\": \"ar ray\",",
  518                                                                                  "          \"succes s\": \"boo lean\",",
  519                                                                                  "          \"messag e\": \"str ing\"",
  520                                                                                  "         }",
  521                                                                                  "    };" ,
  522                                                                                  "    ",
  523                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  524                                                                                  "    ",
  525                                                                                  "    if  (tv4.error ) {",
  526                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  527                                                                                  "    }",
  528                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  529                                                                                  "    ",
  530                                                                                  "    //i f success  is true we  have some  response  data",
  531                                                                                  "    if  (jsonData. success == = true) {" ,
  532                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  533                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  534                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  535                                                                                  "      " ,
  536                                                                                  "      / /single re sult, retu rn just th e object",
  537                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  538                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  539                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  540                                                                                  "      }  else if ( jsonData.r esponse) { ",
  541                                                                                  "           //multi ple result s, return  an array o f objects" ,
  542                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  543                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  544                                                                                  "      } ",
  545                                                                                  "      " ,
  546                                                                                  "      / /tests spe cific to t his API ca ll",
  547                                                                                  "      f or (var i  in jsonDat a.response ) {",
  548                                                                                  "         if (i > 1 0) { break ; }",
  549                                                                                  "         var reque st = jsonD ata.respon se[i];",
  550                                                                                  "         tests[\"r equest \"  + i + \" s tudyApprov al = 1\"]  = request. studyAppro valId ===  1;",
  551                                                                                  "      } ",
  552                                                                                  "      " ,
  553                                                                                  "    } e lse {",
  554                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  555                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  556                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  557                                                                                  "    }",
  558                                                                                  "} else  {",
  559                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  560                                                                                  "}"
  561                                                                         ]
  562                                                                }
  563                                                       }
  564                                               ],
  565                                               "request":  {
  566                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uests/1/st udyApprova l",
  567                                                       "m ethod": "G ET",
  568                                                       "h eader": [
  569                                                                {
  570                                                                         "key":  "Content- Type",
  571                                                                         "value ": "applic ation/json ",
  572                                                                         "descr iption": " "
  573                                                                },
  574                                                                {
  575                                                                         "key":  "Accept-E ncoding",
  576                                                                         "value ": "applic ation/json ",
  577                                                                         "descr iption": " "
  578                                                                }
  579                                                       ],
  580                                                       "b ody": {
  581                                                                "mod e": "formd ata",
  582                                                                "for mdata": [
  583                                                                         {
  584                                                                                  "key": " email",
  585                                                                                  "value":  "ge",
  586                                                                                  "type":  "text"
  587                                                                         },
  588                                                                         {
  589                                                                                  "key": " password",
  590                                                                                  "value":  "mysupers ecretpassw ord",
  591                                                                                  "type":  "text"
  592                                                                         }
  593                                                                ]
  594                                                       },
  595                                                       "d escription ": "retrie ve all req uests that  have this  same stud y approval  id"
  596                                               },
  597                                               "response" : []
  598                                      },
  599                                      {
  600                                               "name": "R equests -  By Status  = Sent",
  601                                               "event": [
  602                                                       {
  603                                                                "lis ten": "tes t",
  604                                                                "scr ipt": {
  605                                                                         "type" : "text/ja vascript",
  606                                                                         "exec" : [
  607                                                                                  "//meta  tests",
  608                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  609                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  610                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  611                                                                                  "",
  612                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  613                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  614                                                                                  "    ",
  615                                                                                  "    var  schema =  {",
  616                                                                                  "     \" items\": { ",
  617                                                                                  "          \"respon se\": \"ar ray\",",
  618                                                                                  "          \"succes s\": \"boo lean\",",
  619                                                                                  "          \"messag e\": \"str ing\"",
  620                                                                                  "         }",
  621                                                                                  "    };" ,
  622                                                                                  "    ",
  623                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  624                                                                                  "    ",
  625                                                                                  "    if  (tv4.error ) {",
  626                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  627                                                                                  "    }",
  628                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  629                                                                                  "    ",
  630                                                                                  "    //i f success  is true we  have some  response  data",
  631                                                                                  "    if  (jsonData. success == = true) {" ,
  632                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  633                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  634                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  635                                                                                  "      " ,
  636                                                                                  "      / /single re sult, retu rn just th e object",
  637                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  638                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  639                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  640                                                                                  "      }  else if ( jsonData.r esponse) { ",
  641                                                                                  "           //multi ple result s, return  an array o f objects" ,
  642                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  643                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  644                                                                                  "      } ",
  645                                                                                  "      " ,
  646                                                                                  "      / /tests spe cific to t his API ca ll",
  647                                                                                  "      f or (var i  in jsonDat a.response ) {",
  648                                                                                  "         if (i > 1 0) { break ; }",
  649                                                                                  "         var reque st = jsonD ata.respon se[i];",
  650                                                                                  "         tests[\"r equest \"  + i + \" s tatusDescr iption = s ent\"] = r equest.sta tusDescrip tion === ' Sent';",
  651                                                                                  "      } ",
  652                                                                                  "      " ,
  653                                                                                  "    } e lse {",
  654                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  655                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  656                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  657                                                                                  "    }",
  658                                                                                  "} else  {",
  659                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  660                                                                                  "}"
  661                                                                         ]
  662                                                                }
  663                                                       }
  664                                               ],
  665                                               "request":  {
  666                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uests/sent /status",
  667                                                       "m ethod": "G ET",
  668                                                       "h eader": [
  669                                                                {
  670                                                                         "key":  "Content- Type",
  671                                                                         "value ": "applic ation/json ",
  672                                                                         "descr iption": " "
  673                                                                },
  674                                                                {
  675                                                                         "key":  "Accept-E ncoding",
  676                                                                         "value ": "applic ation/json ",
  677                                                                         "descr iption": " "
  678                                                                }
  679                                                       ],
  680                                                       "b ody": {
  681                                                                "mod e": "formd ata",
  682                                                                "for mdata": [
  683                                                                         {
  684                                                                                  "key": " email",
  685                                                                                  "value":  "ge",
  686                                                                                  "type":  "text"
  687                                                                         },
  688                                                                         {
  689                                                                                  "key": " password",
  690                                                                                  "value":  "mysupers ecretpassw ord",
  691                                                                                  "type":  "text"
  692                                                                         }
  693                                                                ]
  694                                                       },
  695                                                       "d escription ": "retrie ve all app roved requ ests"
  696                                               },
  697                                               "response" : []
  698                                      },
  699                                      {
  700                                               "name": "R equests -  By Status  = Denied",
  701                                               "event": [
  702                                                       {
  703                                                                "lis ten": "tes t",
  704                                                                "scr ipt": {
  705                                                                         "type" : "text/ja vascript",
  706                                                                         "exec" : [
  707                                                                                  "//meta  tests",
  708                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  709                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  710                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  711                                                                                  "",
  712                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  713                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  714                                                                                  "    ",
  715                                                                                  "    var  schema =  {",
  716                                                                                  "     \" items\": { ",
  717                                                                                  "          \"respon se\": \"ar ray\",",
  718                                                                                  "          \"succes s\": \"boo lean\",",
  719                                                                                  "          \"messag e\": \"str ing\"",
  720                                                                                  "         }",
  721                                                                                  "    };" ,
  722                                                                                  "    ",
  723                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  724                                                                                  "    ",
  725                                                                                  "    if  (tv4.error ) {",
  726                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  727                                                                                  "    }",
  728                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  729                                                                                  "    ",
  730                                                                                  "    //i f success  is true we  have some  response  data",
  731                                                                                  "    if  (jsonData. success == = true) {" ,
  732                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  733                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  734                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  735                                                                                  "      " ,
  736                                                                                  "      / /single re sult, retu rn just th e object",
  737                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  738                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  739                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  740                                                                                  "      }  else if ( jsonData.r esponse) { ",
  741                                                                                  "           //multi ple result s, return  an array o f objects" ,
  742                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  743                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  744                                                                                  "      } ",
  745                                                                                  "      " ,
  746                                                                                  "      / /tests spe cific to t his API ca ll",
  747                                                                                  "      f or (var i  in jsonDat a.response ) {",
  748                                                                                  "         if (i > 1 0) { break ; }",
  749                                                                                  "         var reque st = jsonD ata.respon se[i];",
  750                                                                                  "         tests[\"r equest \"  + i + \" s tatusDescr iption = d enied\"] =  request.s tatusDescr iption ===  'Denied'; ",
  751                                                                                  "      } ",
  752                                                                                  "      " ,
  753                                                                                  "    } e lse {",
  754                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  755                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  756                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  757                                                                                  "    }",
  758                                                                                  "} else  {",
  759                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  760                                                                                  "}"
  761                                                                         ]
  762                                                                }
  763                                                       }
  764                                               ],
  765                                               "request":  {
  766                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uests/deni ed/status" ,
  767                                                       "m ethod": "G ET",
  768                                                       "h eader": [
  769                                                                {
  770                                                                         "key":  "Content- Type",
  771                                                                         "value ": "applic ation/json ",
  772                                                                         "descr iption": " "
  773                                                                },
  774                                                                {
  775                                                                         "key":  "Accept-E ncoding",
  776                                                                         "value ": "applic ation/json ",
  777                                                                         "descr iption": " "
  778                                                                }
  779                                                       ],
  780                                                       "b ody": {
  781                                                                "mod e": "formd ata",
  782                                                                "for mdata": [
  783                                                                         {
  784                                                                                  "key": " email",
  785                                                                                  "value":  "ge",
  786                                                                                  "type":  "text"
  787                                                                         },
  788                                                                         {
  789                                                                                  "key": " password",
  790                                                                                  "value":  "mysupers ecretpassw ord",
  791                                                                                  "type":  "text"
  792                                                                         }
  793                                                                ]
  794                                                       },
  795                                                       "d escription ": "retrie ve all den ied reques ts"
  796                                               },
  797                                               "response" : []
  798                                      },
  799                                      {
  800                                               "name": "R equests -  By Status  = Submitte d",
  801                                               "event": [
  802                                                       {
  803                                                                "lis ten": "tes t",
  804                                                                "scr ipt": {
  805                                                                         "type" : "text/ja vascript",
  806                                                                         "exec" : [
  807                                                                                  "//meta  tests",
  808                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  809                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  810                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  811                                                                                  "",
  812                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  813                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  814                                                                                  "    ",
  815                                                                                  "    var  schema =  {",
  816                                                                                  "     \" items\": { ",
  817                                                                                  "          \"respon se\": \"ar ray\",",
  818                                                                                  "          \"succes s\": \"boo lean\",",
  819                                                                                  "          \"messag e\": \"str ing\"",
  820                                                                                  "         }",
  821                                                                                  "    };" ,
  822                                                                                  "    ",
  823                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  824                                                                                  "    ",
  825                                                                                  "    if  (tv4.error ) {",
  826                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  827                                                                                  "    }",
  828                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  829                                                                                  "    ",
  830                                                                                  "    //i f success  is true we  have some  response  data",
  831                                                                                  "    if  (jsonData. success == = true) {" ,
  832                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  833                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  834                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  835                                                                                  "      " ,
  836                                                                                  "      / /single re sult, retu rn just th e object",
  837                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  838                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  839                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  840                                                                                  "      }  else if ( jsonData.r esponse) { ",
  841                                                                                  "           //multi ple result s, return  an array o f objects" ,
  842                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  843                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  844                                                                                  "      } ",
  845                                                                                  "      " ,
  846                                                                                  "      / /tests spe cific to t his API ca ll",
  847                                                                                  "      f or (var i  in jsonDat a.response ) {",
  848                                                                                  "         if (i > 1 0) { break ; }",
  849                                                                                  "         var reque st = jsonD ata.respon se[i];",
  850                                                                                  "         tests[\"r equest \"  + i + \" s tatusDescr iption = S ubmitted\" ] = reques t.statusDe scription  === 'Submi tted';",
  851                                                                                  "      } ",
  852                                                                                  "      " ,
  853                                                                                  "    } e lse {",
  854                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  855                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  856                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  857                                                                                  "    }",
  858                                                                                  "} else  {",
  859                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  860                                                                                  "}"
  861                                                                         ]
  862                                                                }
  863                                                       }
  864                                               ],
  865                                               "request":  {
  866                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uests/subm itted/stat us",
  867                                                       "m ethod": "G ET",
  868                                                       "h eader": [
  869                                                                {
  870                                                                         "key":  "Content- Type",
  871                                                                         "value ": "applic ation/json ",
  872                                                                         "descr iption": " "
  873                                                                },
  874                                                                {
  875                                                                         "key":  "Accept-E ncoding",
  876                                                                         "value ": "applic ation/json ",
  877                                                                         "descr iption": " "
  878                                                                }
  879                                                       ],
  880                                                       "b ody": {
  881                                                                "mod e": "formd ata",
  882                                                                "for mdata": [
  883                                                                         {
  884                                                                                  "key": " email",
  885                                                                                  "value":  "ge",
  886                                                                                  "type":  "text"
  887                                                                         },
  888                                                                         {
  889                                                                                  "key": " password",
  890                                                                                  "value":  "mysupers ecretpassw ord",
  891                                                                                  "type":  "text"
  892                                                                         }
  893                                                                ]
  894                                                       },
  895                                                       "d escription ": "retrie ve all sub mitted req uests that  the data  manager ca n approve  or deny"
  896                                               },
  897                                               "response" : []
  898                                      },
  899                                      {
  900                                               "name": "R equests -  Count on S tatus",
  901                                               "event": [
  902                                                       {
  903                                                                "lis ten": "tes t",
  904                                                                "scr ipt": {
  905                                                                         "type" : "text/ja vascript",
  906                                                                         "exec" : [
  907                                                                                  "//meta  tests",
  908                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  909                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  910                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  911                                                                                  "",
  912                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  913                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  914                                                                                  "    ",
  915                                                                                  "    var  schema =  {",
  916                                                                                  "     \" items\": { ",
  917                                                                                  "          \"respon se\": \"ar ray\",",
  918                                                                                  "          \"succes s\": \"boo lean\",",
  919                                                                                  "          \"messag e\": \"str ing\"",
  920                                                                                  "         }",
  921                                                                                  "    };" ,
  922                                                                                  "    ",
  923                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  924                                                                                  "    ",
  925                                                                                  "    if  (tv4.error ) {",
  926                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  927                                                                                  "    }",
  928                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  929                                                                                  "    ",
  930                                                                                  "    //i f success  is true we  have some  response  data",
  931                                                                                  "    if  (jsonData. success == = true) {" ,
  932                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  933                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  934                                                                                  "      / /tests[\"m essage ===  null\"] =  jsonData. message == = null;",
  935                                                                                  "      " ,
  936                                                                                  "      / /single re sult, retu rn just th e object",
  937                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  938                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  939                                                                                  "          tests[\" response.l ength ===  1 returns  single obj ect\"] = t ypeof json Data.respo nse === 'o bject';",
  940                                                                                  "      }  else if ( jsonData.r esponse) { ",
  941                                                                                  "           //multi ple result s, return  an array o f objects" ,
  942                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  943                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  944                                                                                  "           ",
  945                                                                                  "           var val idDesc = [ 'Draft', ' Submitted' , 'Denied' , 'Returne d', 'Sent' , 'Update' , 'Request Accepted',  'RequestN otAccepted ', 'Result sAccepted' , 'Results NotAccepte d', 'Reque stDelivere d', 'Cance lled'];",
  946                                                                                  "           ",
  947                                                                                  "           for (va r i in jso nData.resp onse) {",
  948                                                                                  "             var r equest = j sonData.re sponse[i]; ",
  949                                                                                  "             tests [\"respons e\" + i +  \" has des cription e lement\"]  = (request .descripti on !== und efined) ?  true : fal se;",
  950                                                                                  "             tests [\"respons e\" + i +  \" has cou nt element \"] = (req uest.count  !== undef ined) ? tr ue : false ;",
  951                                                                                  "             ",
  952                                                                                  "             //con sole.log(r equest.des cription); ",
  953                                                                                  "             //con sole.log(v alidDesc.i ndexOf(req uest.descr iption))",
  954                                                                                  "             tests [\"Desc\"  + i + \" h as valid c ontent\"]  = (request .descripti on !== und efined) ?  validDesc. indexOf(re quest.desc ription) ! == -1  : f alse;",
  955                                                                                  "             tests [\"count\"  + i + \"  is an inte ger\"] = ( request.co unt !== un defined) ?  typeof re quest.coun t === 'num ber' : fal se;",
  956                                                                                  "           }",
  957                                                                                  "      } ",
  958                                                                                  "    } e lse {",
  959                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  960                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  961                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  962                                                                                  "    }",
  963                                                                                  "} else  {",
  964                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  965                                                                                  "}"
  966                                                                         ]
  967                                                                }
  968                                                       }
  969                                               ],
  970                                               "request":  {
  971                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uests/stat us/count",
  972                                                       "m ethod": "G ET",
  973                                                       "h eader": [
  974                                                                {
  975                                                                         "key":  "Content- Type",
  976                                                                         "value ": "applic ation/json ",
  977                                                                         "descr iption": " "
  978                                                                },
  979                                                                {
  980                                                                         "key":  "Accept-E ncoding",
  981                                                                         "value ": "applic ation/json ",
  982                                                                         "descr iption": " "
  983                                                                }
  984                                                       ],
  985                                                       "b ody": {
  986                                                                "mod e": "formd ata",
  987                                                                "for mdata": [
  988                                                                         {
  989                                                                                  "key": " email",
  990                                                                                  "value":  "ge",
  991                                                                                  "type":  "text"
  992                                                                         },
  993                                                                         {
  994                                                                                  "key": " password",
  995                                                                                  "value":  "mysupers ecretpassw ord",
  996                                                                                  "type":  "text"
  997                                                                         }
  998                                                                ]
  999                                                       },
  1000                                                       "d escription ": "retrie ve the log  for this  request"
  1001                                               },
  1002                                               "response" : []
  1003                                      },
  1004                                      {
  1005                                               "name": "R equests -  Log",
  1006                                               "event": [
  1007                                                       {
  1008                                                                "lis ten": "tes t",
  1009                                                                "scr ipt": {
  1010                                                                         "type" : "text/ja vascript",
  1011                                                                         "exec" : [
  1012                                                                                  "//meta  tests",
  1013                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  1014                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  1015                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  1016                                                                                  "",
  1017                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  1018                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  1019                                                                                  "    ",
  1020                                                                                  "    var  schema =  {",
  1021                                                                                  "     \" items\": { ",
  1022                                                                                  "          \"respon se\": \"ar ray\",",
  1023                                                                                  "          \"succes s\": \"boo lean\",",
  1024                                                                                  "          \"messag e\": \"str ing\"",
  1025                                                                                  "         }",
  1026                                                                                  "    };" ,
  1027                                                                                  "    ",
  1028                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  1029                                                                                  "    ",
  1030                                                                                  "    if  (tv4.error ) {",
  1031                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  1032                                                                                  "    }",
  1033                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  1034                                                                                  "    ",
  1035                                                                                  "    //i f success  is true we  have some  response  data",
  1036                                                                                  "    if  (jsonData. success == = true) {" ,
  1037                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  1038                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  1039                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  1040                                                                                  "      " ,
  1041                                                                                  "      / /single re sult, retu rn just th e object",
  1042                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  1043                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  1044                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  1045                                                                                  "      }  else if ( jsonData.r esponse) { ",
  1046                                                                                  "           //multi ple result s, return  an array o f objects" ,
  1047                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  1048                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  1049                                                                                  "      } ",
  1050                                                                                  "    } e lse {",
  1051                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  1052                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  1053                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  1054                                                                                  "    }",
  1055                                                                                  "} else  {",
  1056                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  1057                                                                                  "}"
  1058                                                                         ]
  1059                                                                }
  1060                                                       }
  1061                                               ],
  1062                                               "request":  {
  1063                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uests/1/re quester/lo g",
  1064                                                       "m ethod": "G ET",
  1065                                                       "h eader": [
  1066                                                                {
  1067                                                                         "key":  "Content- Type",
  1068                                                                         "value ": "applic ation/json ",
  1069                                                                         "descr iption": " "
  1070                                                                },
  1071                                                                {
  1072                                                                         "key":  "Accept-E ncoding",
  1073                                                                         "value ": "applic ation/json ",
  1074                                                                         "descr iption": " "
  1075                                                                }
  1076                                                       ],
  1077                                                       "b ody": {
  1078                                                                "mod e": "formd ata",
  1079                                                                "for mdata": [
  1080                                                                         {
  1081                                                                                  "key": " email",
  1082                                                                                  "value":  "ge",
  1083                                                                                  "type":  "text"
  1084                                                                         },
  1085                                                                         {
  1086                                                                                  "key": " password",
  1087                                                                                  "value":  "mysupers ecretpassw ord",
  1088                                                                                  "type":  "text"
  1089                                                                         }
  1090                                                                ]
  1091                                                       },
  1092                                                       "d escription ": "retrie ve the log  for this  request"
  1093                                               },
  1094                                               "response" : []
  1095                                      },
  1096                                      {
  1097                                               "name": "R equests -  Create",
  1098                                               "event": [
  1099                                                       {
  1100                                                                "lis ten": "tes t",
  1101                                                                "scr ipt": {
  1102                                                                         "type" : "text/ja vascript",
  1103                                                                         "exec" : [
  1104                                                                                  "//meta  tests",
  1105                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  1106                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  1107                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  1108                                                                                  "",
  1109                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  1110                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  1111                                                                                  "    ",
  1112                                                                                  "    var  schema =  {",
  1113                                                                                  "     \" items\": { ",
  1114                                                                                  "          \"respon se\": \"ar ray\",",
  1115                                                                                  "          \"succes s\": \"boo lean\",",
  1116                                                                                  "          \"messag e\": \"str ing\"",
  1117                                                                                  "         }",
  1118                                                                                  "    };" ,
  1119                                                                                  "    ",
  1120                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  1121                                                                                  "    ",
  1122                                                                                  "    if  (tv4.error ) {",
  1123                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  1124                                                                                  "    }",
  1125                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  1126                                                                                  "    ",
  1127                                                                                  "    //i f success  is true we  have some  response  data",
  1128                                                                                  "    if  (jsonData. success == = true) {" ,
  1129                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  1130                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  1131                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  1132                                                                                  "      " ,
  1133                                                                                  "      / /single re sult, retu rn just th e object",
  1134                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  1135                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  1136                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  1137                                                                                  "      }  else if ( jsonData.r esponse) { ",
  1138                                                                                  "           //multi ple result s, return  an array o f objects" ,
  1139                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  1140                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  1141                                                                                  "      } ",
  1142                                                                                  "    } e lse {",
  1143                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  1144                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  1145                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  1146                                                                                  "    }",
  1147                                                                                  "} else  {",
  1148                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  1149                                                                                  "}"
  1150                                                                         ]
  1151                                                                }
  1152                                                       }
  1153                                               ],
  1154                                               "request":  {
  1155                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uests",
  1156                                                       "m ethod": "P OST",
  1157                                                       "h eader": [
  1158                                                                {
  1159                                                                         "key":  "Content- Type",
  1160                                                                         "value ": "applic ation/json ",
  1161                                                                         "descr iption": " "
  1162                                                                },
  1163                                                                {
  1164                                                                         "key":  "Accept-E ncoding",
  1165                                                                         "value ": "applic ation/json ",
  1166                                                                         "descr iption": " "
  1167                                                                }
  1168                                                       ],
  1169                                                       "b ody": {
  1170                                                                "mod e": "raw",
  1171                                                                "raw ": "{\n     \"title\" : \"Postma n Sample R equest\",\ n    \"des cription\" : \"This i s a sample  new reque st for dem o purposes \",\n    \ "requestTy peId\": \" 1\",\n     \"sourceId \": \"2\", \n    \"st udyApprova lId\": \"1 77\",\n     \"created By\": \"ge nisisresea rcher1@gma il.com\",\ n    \"com ments\": \ "local tes t\"\n}\n\n "
  1172                                                       },
  1173                                                       "d escription ": "create  a new req uest"
  1174                                               },
  1175                                               "response" : []
  1176                                      },
  1177                                      {
  1178                                               "name": "R equests -  Update",
  1179                                               "event": [
  1180                                                       {
  1181                                                                "lis ten": "tes t",
  1182                                                                "scr ipt": {
  1183                                                                         "type" : "text/ja vascript",
  1184                                                                         "exec" : [
  1185                                                                                  "//meta  tests",
  1186                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  1187                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  1188                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  1189                                                                                  "",
  1190                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  1191                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  1192                                                                                  "    ",
  1193                                                                                  "    var  schema =  {",
  1194                                                                                  "     \" items\": { ",
  1195                                                                                  "          \"respon se\": \"ar ray\",",
  1196                                                                                  "          \"succes s\": \"boo lean\",",
  1197                                                                                  "          \"messag e\": \"str ing\"",
  1198                                                                                  "         }",
  1199                                                                                  "    };" ,
  1200                                                                                  "    ",
  1201                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  1202                                                                                  "    ",
  1203                                                                                  "    if  (tv4.error ) {",
  1204                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  1205                                                                                  "    }",
  1206                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  1207                                                                                  "    ",
  1208                                                                                  "    //i f success  is true we  have some  response  data",
  1209                                                                                  "    if  (jsonData. success == = true) {" ,
  1210                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  1211                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  1212                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  1213                                                                                  "      " ,
  1214                                                                                  "      / /single re sult, retu rn just th e object",
  1215                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  1216                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  1217                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  1218                                                                                  "      }  else if ( jsonData.r esponse) { ",
  1219                                                                                  "           //multi ple result s, return  an array o f objects" ,
  1220                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  1221                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  1222                                                                                  "      } ",
  1223                                                                                  "    } e lse {",
  1224                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  1225                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  1226                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  1227                                                                                  "    }",
  1228                                                                                  "} else  {",
  1229                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  1230                                                                                  "}"
  1231                                                                         ]
  1232                                                                }
  1233                                                       }
  1234                                               ],
  1235                                               "request":  {
  1236                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uests/1",
  1237                                                       "m ethod": "P UT",
  1238                                                       "h eader": [
  1239                                                                {
  1240                                                                         "key":  "Content- Type",
  1241                                                                         "value ": "applic ation/json ",
  1242                                                                         "descr iption": " "
  1243                                                                },
  1244                                                                {
  1245                                                                         "key":  "Accept-E ncoding",
  1246                                                                         "value ": "applic ation/json ",
  1247                                                                         "descr iption": " "
  1248                                                                }
  1249                                                       ],
  1250                                                       "b ody": {
  1251                                                                "mod e": "raw",
  1252                                                                "raw ": "{\r\n     \"title \": \"Post man Sample  Create Re quest - Up dated\",\r \n    \"de scription\ ": \"This  is a sampl e new requ est for de mo purpose s - update d\",\r\n     \"reques tTypeId\":  \"1\",\r\ n    \"sou rceId\": \ "1\",\r\n     \"notif y\": true, \r\n    \" studyAppro valId\": \ "1\",\r\n     \"comme nts\" : \" Update Req uest\",\r\ n    \"cre atedBy\":  \"genisisr esearcher1 @gmail.com \"\r\n}"
  1253                                                       },
  1254                                                       "d escription ": "update  an existi ng request "
  1255                                               },
  1256                                               "response" : []
  1257                                      },
  1258                                      {
  1259                                               "name": "R equests -  Submit",
  1260                                               "event": [
  1261                                                       {
  1262                                                                "lis ten": "tes t",
  1263                                                                "scr ipt": {
  1264                                                                         "type" : "text/ja vascript",
  1265                                                                         "exec" : [
  1266                                                                                  "//meta  tests",
  1267                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  1268                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  1269                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  1270                                                                                  "",
  1271                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  1272                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  1273                                                                                  "    ",
  1274                                                                                  "    var  schema =  {",
  1275                                                                                  "     \" items\": { ",
  1276                                                                                  "          \"respon se\": \"ar ray\",",
  1277                                                                                  "          \"succes s\": \"boo lean\",",
  1278                                                                                  "          \"messag e\": \"str ing\"",
  1279                                                                                  "         }",
  1280                                                                                  "    };" ,
  1281                                                                                  "    ",
  1282                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  1283                                                                                  "    ",
  1284                                                                                  "    if  (tv4.error ) {",
  1285                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  1286                                                                                  "    }",
  1287                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  1288                                                                                  "    ",
  1289                                                                                  "    //i f success  is true we  have some  response  data",
  1290                                                                                  "    if  (jsonData. success == = true) {" ,
  1291                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  1292                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  1293                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  1294                                                                                  "      " ,
  1295                                                                                  "      / /single re sult, retu rn just th e object",
  1296                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  1297                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  1298                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  1299                                                                                  "      }  else if ( jsonData.r esponse) { ",
  1300                                                                                  "           //multi ple result s, return  an array o f objects" ,
  1301                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  1302                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  1303                                                                                  "      } ",
  1304                                                                                  "    } e lse {",
  1305                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  1306                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  1307                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  1308                                                                                  "    }",
  1309                                                                                  "} else  {",
  1310                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  1311                                                                                  "}"
  1312                                                                         ]
  1313                                                                }
  1314                                                       }
  1315                                               ],
  1316                                               "request":  {
  1317                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uests/1/su bmit",
  1318                                                       "m ethod": "P UT",
  1319                                                       "h eader": [
  1320                                                                {
  1321                                                                         "key":  "Content- Type",
  1322                                                                         "value ": "applic ation/json ",
  1323                                                                         "descr iption": " "
  1324                                                                },
  1325                                                                {
  1326                                                                         "key":  "Accept-E ncoding",
  1327                                                                         "value ": "applic ation/json ",
  1328                                                                         "descr iption": " "
  1329                                                                }
  1330                                                       ],
  1331                                                       "b ody": {
  1332                                                                "mod e": "raw",
  1333                                                                "raw ": "{\n\t\ "createdBy \": \"geni sisresearc her1@gmail .com\"\n}"
  1334                                                       },
  1335                                                       "d escription ": "submit  a request  to a data  manager f or approva l"
  1336                                               },
  1337                                               "response" : []
  1338                                      },
  1339                                      {
  1340                                               "name": "R equests -  Approve Re quest by D DM",
  1341                                               "event": [
  1342                                                       {
  1343                                                                "lis ten": "tes t",
  1344                                                                "scr ipt": {
  1345                                                                         "type" : "text/ja vascript",
  1346                                                                         "exec" : [
  1347                                                                                  "//meta  tests",
  1348                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  1349                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  1350                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  1351                                                                                  "",
  1352                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  1353                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  1354                                                                                  "    ",
  1355                                                                                  "    var  schema =  {",
  1356                                                                                  "     \" items\": { ",
  1357                                                                                  "          \"respon se\": \"ar ray\",",
  1358                                                                                  "          \"succes s\": \"boo lean\",",
  1359                                                                                  "          \"messag e\": \"str ing\"",
  1360                                                                                  "         }",
  1361                                                                                  "    };" ,
  1362                                                                                  "    ",
  1363                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  1364                                                                                  "    ",
  1365                                                                                  "    if  (tv4.error ) {",
  1366                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  1367                                                                                  "    }",
  1368                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  1369                                                                                  "    ",
  1370                                                                                  "    //i f success  is true we  have some  response  data",
  1371                                                                                  "    if  (jsonData. success == = true) {" ,
  1372                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  1373                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  1374                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  1375                                                                                  "      " ,
  1376                                                                                  "      / /single re sult, retu rn just th e object",
  1377                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  1378                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  1379                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  1380                                                                                  "      }  else if ( jsonData.r esponse) { ",
  1381                                                                                  "           //multi ple result s, return  an array o f objects" ,
  1382                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  1383                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  1384                                                                                  "      } ",
  1385                                                                                  "    } e lse {",
  1386                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  1387                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  1388                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  1389                                                                                  "    }",
  1390                                                                                  "} else  {",
  1391                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  1392                                                                                  "}"
  1393                                                                         ]
  1394                                                                }
  1395                                                       }
  1396                                               ],
  1397                                               "request":  {
  1398                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uests/1/se nt",
  1399                                                       "m ethod": "P UT",
  1400                                                       "h eader": [
  1401                                                                {
  1402                                                                         "key":  "Content- Type",
  1403                                                                         "value ": "applic ation/json ",
  1404                                                                         "descr iption": " "
  1405                                                                },
  1406                                                                {
  1407                                                                         "key":  "Accept-E ncoding",
  1408                                                                         "value ": "applic ation/json ",
  1409                                                                         "descr iption": " "
  1410                                                                }
  1411                                                       ],
  1412                                                       "b ody": {
  1413                                                                "mod e": "raw",
  1414                                                                "raw ": "{\n\t\ "createdBy \": \"geni sisdatamgr 1@gmail.co m\"\n}"
  1415                                                       },
  1416                                                       "d escription ": "allow  a data man ager to ap prove a re quest"
  1417                                               },
  1418                                               "response" : []
  1419                                      },
  1420                                      {
  1421                                               "name": "R equests -  Deny Reque st by DDM" ,
  1422                                               "event": [
  1423                                                       {
  1424                                                                "lis ten": "tes t",
  1425                                                                "scr ipt": {
  1426                                                                         "type" : "text/ja vascript",
  1427                                                                         "exec" : [
  1428                                                                                  "//meta  tests",
  1429                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  1430                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  1431                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  1432                                                                                  "",
  1433                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  1434                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  1435                                                                                  "    ",
  1436                                                                                  "    var  schema =  {",
  1437                                                                                  "     \" items\": { ",
  1438                                                                                  "          \"respon se\": \"ar ray\",",
  1439                                                                                  "          \"succes s\": \"boo lean\",",
  1440                                                                                  "          \"messag e\": \"str ing\"",
  1441                                                                                  "         }",
  1442                                                                                  "    };" ,
  1443                                                                                  "    ",
  1444                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  1445                                                                                  "    ",
  1446                                                                                  "    if  (tv4.error ) {",
  1447                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  1448                                                                                  "    }",
  1449                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  1450                                                                                  "    ",
  1451                                                                                  "    //i f success  is true we  have some  response  data",
  1452                                                                                  "    if  (jsonData. success == = true) {" ,
  1453                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  1454                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  1455                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  1456                                                                                  "      " ,
  1457                                                                                  "      / /single re sult, retu rn just th e object",
  1458                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  1459                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  1460                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  1461                                                                                  "      }  else if ( jsonData.r esponse) { ",
  1462                                                                                  "           //multi ple result s, return  an array o f objects" ,
  1463                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  1464                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  1465                                                                                  "      } ",
  1466                                                                                  "    } e lse {",
  1467                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  1468                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  1469                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  1470                                                                                  "    }",
  1471                                                                                  "} else  {",
  1472                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  1473                                                                                  "}"
  1474                                                                         ]
  1475                                                                }
  1476                                                       }
  1477                                               ],
  1478                                               "request":  {
  1479                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uests/1/de ny",
  1480                                                       "m ethod": "P UT",
  1481                                                       "h eader": [
  1482                                                                {
  1483                                                                         "key":  "Content- Type",
  1484                                                                         "value ": "applic ation/json ",
  1485                                                                         "descr iption": " "
  1486                                                                },
  1487                                                                {
  1488                                                                         "key":  "Accept-E ncoding",
  1489                                                                         "value ": "applic ation/json ",
  1490                                                                         "descr iption": " "
  1491                                                                }
  1492                                                       ],
  1493                                                       "b ody": {
  1494                                                                "mod e": "raw",
  1495                                                                "raw ": "{\n\t\ "reason\":  \"This ha s the wron g study ap proval, pl ease chang e to ABCXY Z\",\n\t\" createdBy\ ": \"genis isdatamgr1 @gmail.com \"\n}"
  1496                                                       },
  1497                                                       "d escription ": "allow  a data man ager to de ny a reque st"
  1498                                               },
  1499                                               "response" : []
  1500                                      },
  1501                                      {
  1502                                               "name": "R equests -  Return Req uest to Re quester",
  1503                                               "event": [
  1504                                                       {
  1505                                                                "lis ten": "tes t",
  1506                                                                "scr ipt": {
  1507                                                                         "type" : "text/ja vascript",
  1508                                                                         "exec" : [
  1509                                                                                  "//meta  tests",
  1510                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  1511                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  1512                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  1513                                                                                  "",
  1514                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  1515                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  1516                                                                                  "    ",
  1517                                                                                  "    var  schema =  {",
  1518                                                                                  "     \" items\": { ",
  1519                                                                                  "          \"respon se\": \"ar ray\",",
  1520                                                                                  "          \"succes s\": \"boo lean\",",
  1521                                                                                  "          \"messag e\": \"str ing\"",
  1522                                                                                  "         }",
  1523                                                                                  "    };" ,
  1524                                                                                  "    ",
  1525                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  1526                                                                                  "    ",
  1527                                                                                  "    if  (tv4.error ) {",
  1528                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  1529                                                                                  "    }",
  1530                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  1531                                                                                  "    ",
  1532                                                                                  "    //i f success  is true we  have some  response  data",
  1533                                                                                  "    if  (jsonData. success == = true) {" ,
  1534                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  1535                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  1536                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  1537                                                                                  "      " ,
  1538                                                                                  "      / /single re sult, retu rn just th e object",
  1539                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  1540                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  1541                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  1542                                                                                  "      }  else if ( jsonData.r esponse) { ",
  1543                                                                                  "           //multi ple result s, return  an array o f objects" ,
  1544                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  1545                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  1546                                                                                  "      } ",
  1547                                                                                  "    } e lse {",
  1548                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  1549                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  1550                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  1551                                                                                  "    }",
  1552                                                                                  "} else  {",
  1553                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  1554                                                                                  "}"
  1555                                                                         ]
  1556                                                                }
  1557                                                       }
  1558                                               ],
  1559                                               "request":  {
  1560                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uests/1/re turn",
  1561                                                       "m ethod": "P UT",
  1562                                                       "h eader": [
  1563                                                                {
  1564                                                                         "key":  "Content- Type",
  1565                                                                         "value ": "applic ation/json ",
  1566                                                                         "descr iption": " "
  1567                                                                },
  1568                                                                {
  1569                                                                         "key":  "Accept-E ncoding",
  1570                                                                         "value ": "applic ation/json ",
  1571                                                                         "descr iption": " "
  1572                                                                }
  1573                                                       ],
  1574                                                       "b ody": {
  1575                                                                "mod e": "raw",
  1576                                                                "raw ": "{\n\t\ "reason\":  \"This is  a bad req uest, make  it better \",\n\t\"c reatedBy\" : \"genisi sdatamgr1@ gmail.com\ "\n}"
  1577                                                       },
  1578                                                       "d escription ": "allow  a data man ager to re turn a req uest back  to the res earcher fo r more inf o"
  1579                                               },
  1580                                               "response" : []
  1581                                      },
  1582                                      {
  1583                                               "name": "R equests -  Return to  DDM by DSM ",
  1584                                               "event": [
  1585                                                       {
  1586                                                                "lis ten": "tes t",
  1587                                                                "scr ipt": {
  1588                                                                         "type" : "text/ja vascript",
  1589                                                                         "exec" : [
  1590                                                                                  "//meta  tests",
  1591                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  1592                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  1593                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  1594                                                                                  "",
  1595                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  1596                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  1597                                                                                  "    ",
  1598                                                                                  "    var  schema =  {",
  1599                                                                                  "     \" items\": { ",
  1600                                                                                  "          \"respon se\": \"ar ray\",",
  1601                                                                                  "          \"succes s\": \"boo lean\",",
  1602                                                                                  "          \"messag e\": \"str ing\"",
  1603                                                                                  "         }",
  1604                                                                                  "    };" ,
  1605                                                                                  "    ",
  1606                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  1607                                                                                  "    ",
  1608                                                                                  "    if  (tv4.error ) {",
  1609                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  1610                                                                                  "    }",
  1611                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  1612                                                                                  "    ",
  1613                                                                                  "    //i f success  is true we  have some  response  data",
  1614                                                                                  "    if  (jsonData. success == = true) {" ,
  1615                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  1616                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  1617                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  1618                                                                                  "      " ,
  1619                                                                                  "      / /single re sult, retu rn just th e object",
  1620                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  1621                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  1622                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  1623                                                                                  "      }  else if ( jsonData.r esponse) { ",
  1624                                                                                  "           //multi ple result s, return  an array o f objects" ,
  1625                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  1626                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  1627                                                                                  "      } ",
  1628                                                                                  "    } e lse {",
  1629                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  1630                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  1631                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  1632                                                                                  "    }",
  1633                                                                                  "} else  {",
  1634                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  1635                                                                                  "}"
  1636                                                                         ]
  1637                                                                }
  1638                                                       }
  1639                                               ],
  1640                                               "request":  {
  1641                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uests/1/re turntoddm" ,
  1642                                                       "m ethod": "P UT",
  1643                                                       "h eader": [
  1644                                                                {
  1645                                                                         "key":  "Content- Type",
  1646                                                                         "value ": "applic ation/json ",
  1647                                                                         "descr iption": " "
  1648                                                                },
  1649                                                                {
  1650                                                                         "key":  "Accept-E ncoding",
  1651                                                                         "value ": "applic ation/json ",
  1652                                                                         "descr iption": " "
  1653                                                                }
  1654                                                       ],
  1655                                                       "b ody": {
  1656                                                                "mod e": "raw",
  1657                                                                "raw ": "{\n\t\ "createdBy \": \"geni sisdatamgr 1@gmail.co m\"\n}"
  1658                                                       },
  1659                                                       "d escription ": "allow  a data man ager to ac cept data  from VINCI  or other  data sourc e and retu rn it to t he request or for rev iew"
  1660                                               },
  1661                                               "response" : []
  1662                                      },
  1663                                      {
  1664                                               "name": "R equests -  Accept Dat a by DSM",
  1665                                               "event": [
  1666                                                       {
  1667                                                                "lis ten": "tes t",
  1668                                                                "scr ipt": {
  1669                                                                         "type" : "text/ja vascript",
  1670                                                                         "exec" : [
  1671                                                                                  "//meta  tests",
  1672                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  1673                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  1674                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  1675                                                                                  "",
  1676                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  1677                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  1678                                                                                  "    ",
  1679                                                                                  "    var  schema =  {",
  1680                                                                                  "     \" items\": { ",
  1681                                                                                  "          \"respon se\": \"ar ray\",",
  1682                                                                                  "          \"succes s\": \"boo lean\",",
  1683                                                                                  "          \"messag e\": \"str ing\"",
  1684                                                                                  "         }",
  1685                                                                                  "    };" ,
  1686                                                                                  "    ",
  1687                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  1688                                                                                  "    ",
  1689                                                                                  "    if  (tv4.error ) {",
  1690                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  1691                                                                                  "    }",
  1692                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  1693                                                                                  "    ",
  1694                                                                                  "    //i f success  is true we  have some  response  data",
  1695                                                                                  "    if  (jsonData. success == = true) {" ,
  1696                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  1697                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  1698                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  1699                                                                                  "      " ,
  1700                                                                                  "      / /single re sult, retu rn just th e object",
  1701                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  1702                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  1703                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  1704                                                                                  "      }  else if ( jsonData.r esponse) { ",
  1705                                                                                  "           //multi ple result s, return  an array o f objects" ,
  1706                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  1707                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  1708                                                                                  "      } ",
  1709                                                                                  "    } e lse {",
  1710                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  1711                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  1712                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  1713                                                                                  "    }",
  1714                                                                                  "} else  {",
  1715                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  1716                                                                                  "}"
  1717                                                                         ]
  1718                                                                }
  1719                                                       }
  1720                                               ],
  1721                                               "request":  {
  1722                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uests/1/ac ceptdata",
  1723                                                       "m ethod": "P UT",
  1724                                                       "h eader": [
  1725                                                                {
  1726                                                                         "key":  "Content- Type",
  1727                                                                         "value ": "applic ation/json ",
  1728                                                                         "descr iption": " "
  1729                                                                },
  1730                                                                {
  1731                                                                         "key":  "Accept-E ncoding",
  1732                                                                         "value ": "applic ation/json ",
  1733                                                                         "descr iption": " "
  1734                                                                }
  1735                                                       ],
  1736                                                       "b ody": {
  1737                                                                "mod e": "raw",
  1738                                                                "raw ": "{\n\t\ "createdBy \": \"geni sisdatamgr 1@gmail.co m\"\n}"
  1739                                                       },
  1740                                                       "d escription ": "allow  a data man ager to ac cept data  from VINCI  or other  data sourc e and retu rn it to t he request or for rev iew"
  1741                                               },
  1742                                               "response" : []
  1743                                      },
  1744                                      {
  1745                                               "name": "R equests -  Results De livered",
  1746                                               "event": [
  1747                                                       {
  1748                                                                "lis ten": "tes t",
  1749                                                                "scr ipt": {
  1750                                                                         "type" : "text/ja vascript",
  1751                                                                         "exec" : [
  1752                                                                                  "//meta  tests",
  1753                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  1754                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  1755                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  1756                                                                                  "",
  1757                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  1758                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  1759                                                                                  "    ",
  1760                                                                                  "    var  schema =  {",
  1761                                                                                  "     \" items\": { ",
  1762                                                                                  "          \"respon se\": \"ar ray\",",
  1763                                                                                  "          \"succes s\": \"boo lean\",",
  1764                                                                                  "          \"messag e\": \"str ing\"",
  1765                                                                                  "         }",
  1766                                                                                  "    };" ,
  1767                                                                                  "    ",
  1768                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  1769                                                                                  "    ",
  1770                                                                                  "    if  (tv4.error ) {",
  1771                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  1772                                                                                  "    }",
  1773                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  1774                                                                                  "    ",
  1775                                                                                  "    //i f success  is true we  have some  response  data",
  1776                                                                                  "    if  (jsonData. success == = true) {" ,
  1777                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  1778                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  1779                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  1780                                                                                  "      " ,
  1781                                                                                  "      / /single re sult, retu rn just th e object",
  1782                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  1783                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  1784                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  1785                                                                                  "      }  else if ( jsonData.r esponse) { ",
  1786                                                                                  "           //multi ple result s, return  an array o f objects" ,
  1787                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  1788                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  1789                                                                                  "      } ",
  1790                                                                                  "    } e lse {",
  1791                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  1792                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  1793                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  1794                                                                                  "    }",
  1795                                                                                  "} else  {",
  1796                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  1797                                                                                  "}"
  1798                                                                         ]
  1799                                                                }
  1800                                                       }
  1801                                               ],
  1802                                               "request":  {
  1803                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uests/1/re sultsdeliv ered",
  1804                                                       "m ethod": "P UT",
  1805                                                       "h eader": [
  1806                                                                {
  1807                                                                         "key":  "Content- Type",
  1808                                                                         "value ": "applic ation/json ",
  1809                                                                         "descr iption": " "
  1810                                                                },
  1811                                                                {
  1812                                                                         "key":  "Accept-E ncoding",
  1813                                                                         "value ": "applic ation/json ",
  1814                                                                         "descr iption": " "
  1815                                                                }
  1816                                                       ],
  1817                                                       "b ody": {
  1818                                                                "mod e": "raw",
  1819                                                                "raw ": "{\n\t\ "createdBy \": \"geni sisresearc her1@gmail .com\"\n}"
  1820                                                       },
  1821                                                       "d escription ": "allow  the person  who creat ed the req uest to co nfirm that  the data  they got f rom VINCI  or other d ata source  meets the ir require ments"
  1822                                               },
  1823                                               "response" : []
  1824                                      },
  1825                                      {
  1826                                               "name": "R equests -  Confirm Da ta",
  1827                                               "event": [
  1828                                                       {
  1829                                                                "lis ten": "tes t",
  1830                                                                "scr ipt": {
  1831                                                                         "type" : "text/ja vascript",
  1832                                                                         "exec" : [
  1833                                                                                  "//meta  tests",
  1834                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  1835                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  1836                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  1837                                                                                  "",
  1838                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  1839                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  1840                                                                                  "    ",
  1841                                                                                  "    var  schema =  {",
  1842                                                                                  "     \" items\": { ",
  1843                                                                                  "          \"respon se\": \"ar ray\",",
  1844                                                                                  "          \"succes s\": \"boo lean\",",
  1845                                                                                  "          \"messag e\": \"str ing\"",
  1846                                                                                  "         }",
  1847                                                                                  "    };" ,
  1848                                                                                  "    ",
  1849                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  1850                                                                                  "    ",
  1851                                                                                  "    if  (tv4.error ) {",
  1852                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  1853                                                                                  "    }",
  1854                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  1855                                                                                  "    ",
  1856                                                                                  "    //i f success  is true we  have some  response  data",
  1857                                                                                  "    if  (jsonData. success == = true) {" ,
  1858                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  1859                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  1860                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  1861                                                                                  "      " ,
  1862                                                                                  "      / /single re sult, retu rn just th e object",
  1863                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  1864                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  1865                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  1866                                                                                  "      }  else if ( jsonData.r esponse) { ",
  1867                                                                                  "           //multi ple result s, return  an array o f objects" ,
  1868                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  1869                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  1870                                                                                  "      } ",
  1871                                                                                  "    } e lse {",
  1872                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  1873                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  1874                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  1875                                                                                  "    }",
  1876                                                                                  "} else  {",
  1877                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  1878                                                                                  "}"
  1879                                                                         ]
  1880                                                                }
  1881                                                       }
  1882                                               ],
  1883                                               "request":  {
  1884                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uests/1/co nfirmdata" ,
  1885                                                       "m ethod": "P UT",
  1886                                                       "h eader": [
  1887                                                                {
  1888                                                                         "key":  "Content- Type",
  1889                                                                         "value ": "applic ation/json ",
  1890                                                                         "descr iption": " "
  1891                                                                },
  1892                                                                {
  1893                                                                         "key":  "Accept-E ncoding",
  1894                                                                         "value ": "applic ation/json ",
  1895                                                                         "descr iption": " "
  1896                                                                }
  1897                                                       ],
  1898                                                       "b ody": {
  1899                                                                "mod e": "raw",
  1900                                                                "raw ": "{\n\t\ "createdBy \": \"geni sisresearc her1@gmail .com\"\n}"
  1901                                                       },
  1902                                                       "d escription ": "allow  the person  who creat ed the req uest to co nfirm that  the data  they got f rom VINCI  or other d ata source  meets the ir require ments"
  1903                                               },
  1904                                               "response" : []
  1905                                      },
  1906                                      {
  1907                                               "name": "R equests -  Reject Dat a",
  1908                                               "event": [
  1909                                                       {
  1910                                                                "lis ten": "tes t",
  1911                                                                "scr ipt": {
  1912                                                                         "type" : "text/ja vascript",
  1913                                                                         "exec" : [
  1914                                                                                  "//meta  tests",
  1915                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  1916                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  1917                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  1918                                                                                  "",
  1919                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  1920                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  1921                                                                                  "    ",
  1922                                                                                  "    var  schema =  {",
  1923                                                                                  "     \" items\": { ",
  1924                                                                                  "          \"respon se\": \"ar ray\",",
  1925                                                                                  "          \"succes s\": \"boo lean\",",
  1926                                                                                  "          \"messag e\": \"str ing\"",
  1927                                                                                  "         }",
  1928                                                                                  "    };" ,
  1929                                                                                  "    ",
  1930                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  1931                                                                                  "    ",
  1932                                                                                  "    if  (tv4.error ) {",
  1933                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  1934                                                                                  "    }",
  1935                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  1936                                                                                  "    ",
  1937                                                                                  "    //i f success  is true we  have some  response  data",
  1938                                                                                  "    if  (jsonData. success == = true) {" ,
  1939                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  1940                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  1941                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  1942                                                                                  "      " ,
  1943                                                                                  "      / /single re sult, retu rn just th e object",
  1944                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  1945                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  1946                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  1947                                                                                  "      }  else if ( jsonData.r esponse) { ",
  1948                                                                                  "           //multi ple result s, return  an array o f objects" ,
  1949                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  1950                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  1951                                                                                  "      } ",
  1952                                                                                  "    } e lse {",
  1953                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  1954                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  1955                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  1956                                                                                  "    }",
  1957                                                                                  "} else  {",
  1958                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  1959                                                                                  "}"
  1960                                                                         ]
  1961                                                                }
  1962                                                       }
  1963                                               ],
  1964                                               "request":  {
  1965                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uests/1/re jectdata",
  1966                                                       "m ethod": "P UT",
  1967                                                       "h eader": [
  1968                                                                {
  1969                                                                         "key":  "Content- Type",
  1970                                                                         "value ": "applic ation/json ",
  1971                                                                         "descr iption": " "
  1972                                                                },
  1973                                                                {
  1974                                                                         "key":  "Accept-E ncoding",
  1975                                                                         "value ": "applic ation/json ",
  1976                                                                         "descr iption": " "
  1977                                                                }
  1978                                                       ],
  1979                                                       "b ody": {
  1980                                                                "mod e": "raw",
  1981                                                                "raw ": "{\n\t\ "createdBy \": \"geni sisresearc her1@gmail .com\"\n}"
  1982                                                       },
  1983                                                       "d escription ": "allow  the person  who creat ed the req uest to sa y that the  data they  got from  VINCI or o ther data  source doe s NOT meet  their req uirements"
  1984                                               },
  1985                                               "response" : []
  1986                                      },
  1987                                      {
  1988                                               "name": "R equests -  Cancel Req uest",
  1989                                               "event": [
  1990                                                       {
  1991                                                                "lis ten": "tes t",
  1992                                                                "scr ipt": {
  1993                                                                         "type" : "text/ja vascript",
  1994                                                                         "exec" : [
  1995                                                                                  "//meta  tests",
  1996                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  1997                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  1998                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  1999                                                                                  "",
  2000                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  2001                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  2002                                                                                  "    ",
  2003                                                                                  "    var  schema =  {",
  2004                                                                                  "     \" items\": { ",
  2005                                                                                  "          \"respon se\": \"ar ray\",",
  2006                                                                                  "          \"succes s\": \"boo lean\",",
  2007                                                                                  "          \"messag e\": \"str ing\"",
  2008                                                                                  "         }",
  2009                                                                                  "    };" ,
  2010                                                                                  "    ",
  2011                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  2012                                                                                  "    ",
  2013                                                                                  "    if  (tv4.error ) {",
  2014                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  2015                                                                                  "    }",
  2016                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  2017                                                                                  "    ",
  2018                                                                                  "    //i f success  is true we  have some  response  data",
  2019                                                                                  "    if  (jsonData. success == = true) {" ,
  2020                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  2021                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  2022                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  2023                                                                                  "      " ,
  2024                                                                                  "      / /single re sult, retu rn just th e object",
  2025                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  2026                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  2027                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  2028                                                                                  "      }  else if ( jsonData.r esponse) { ",
  2029                                                                                  "           //multi ple result s, return  an array o f objects" ,
  2030                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  2031                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  2032                                                                                  "      } ",
  2033                                                                                  "    } e lse {",
  2034                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  2035                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  2036                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  2037                                                                                  "    }",
  2038                                                                                  "} else  {",
  2039                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  2040                                                                                  "}"
  2041                                                                         ]
  2042                                                                }
  2043                                                       }
  2044                                               ],
  2045                                               "request":  {
  2046                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uests/1/ca ncelled",
  2047                                                       "m ethod": "P UT",
  2048                                                       "h eader": [
  2049                                                                {
  2050                                                                         "key":  "Content- Type",
  2051                                                                         "value ": "applic ation/json ",
  2052                                                                         "descr iption": " "
  2053                                                                },
  2054                                                                {
  2055                                                                         "key":  "Accept-E ncoding",
  2056                                                                         "value ": "applic ation/json ",
  2057                                                                         "descr iption": " "
  2058                                                                }
  2059                                                       ],
  2060                                                       "b ody": {
  2061                                                                "mod e": "raw",
  2062                                                                "raw ": "{\n     \"created By\": \"ge nisisdatam gr1@gmail. com\"\n}"
  2063                                                       },
  2064                                                       "d escription ": "allow  the person  who creat ed the req uest to sa y that the  data they  got from  VINCI or o ther data  source doe s NOT meet  their req uirements"
  2065                                               },
  2066                                               "response" : []
  2067                                      }
  2068                             ]
  2069                    },
  2070                    {
  2071                             "name" : "StudyAp provals",
  2072                             "descr iption": " ",
  2073                             "item" : [
  2074                                      {
  2075                                               "name": "S tudyApprov als - All" ,
  2076                                               "event": [
  2077                                                       {
  2078                                                                "lis ten": "tes t",
  2079                                                                "scr ipt": {
  2080                                                                         "type" : "text/ja vascript",
  2081                                                                         "exec" : [
  2082                                                                                  "//meta  tests",
  2083                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  2084                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  2085                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  2086                                                                                  "",
  2087                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  2088                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  2089                                                                                  "    ",
  2090                                                                                  "    var  schema =  {",
  2091                                                                                  "     \" items\": { ",
  2092                                                                                  "          \"respon se\": \"ar ray\",",
  2093                                                                                  "          \"succes s\": \"boo lean\",",
  2094                                                                                  "          \"messag e\": \"str ing\"",
  2095                                                                                  "         }",
  2096                                                                                  "    };" ,
  2097                                                                                  "    ",
  2098                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  2099                                                                                  "    ",
  2100                                                                                  "    if  (tv4.error ) {",
  2101                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  2102                                                                                  "    }",
  2103                                                                                  "    ",
  2104                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  2105                                                                                  "    ",
  2106                                                                                  "    //i f success  is true we  have some  response  data",
  2107                                                                                  "    if  (jsonData. success == = true) {" ,
  2108                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  2109                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  2110                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  2111                                                                                  "      " ,
  2112                                                                                  "      / /single re sult, retu rn just th e object",
  2113                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  2114                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  2115                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  2116                                                                                  "      }  else if ( jsonData.r esponse) { ",
  2117                                                                                  "           //multi ple result s, return  an array o f objects" ,
  2118                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  2119                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  2120                                                                                  "      } ",
  2121                                                                                  "      " ,
  2122                                                                                  "      / /tests spe cific to t his API en dpoint",
  2123                                                                                  "      f or (var i  in jsonDat a.response ) {",
  2124                                                                                  "         if (i > 1 0) { break ; }",
  2125                                                                                  "         var study Approval =  jsonData. response[i ];",
  2126                                                                                  "",
  2127                                                                                  "         tests[\"s tudyApprov al \" + i  + \" has a n id field \"] = (stu dyApproval .id !== un defined) ?  true : fa lse;",
  2128                                                                                  "         tests[\"s tudyApprov al \" + i  + \" id is  an intege r\"] = (st udyApprova l.id !== u ndefined)  ? typeof s tudyApprov al.id ===  'number' :  false;",
  2129                                                                                  "         ",
  2130                                                                                  "         tests[\"s tudyApprov al \" + i  + \" has a  title fie ld\"] = (s tudyApprov al.title ! == undefin ed) ? true  : false;" ,
  2131                                                                                  "         tests[\"s tudyApprov al \" + i  + \" title  is a stri ng\"] = (s tudyApprov al.title ! == undefin ed) ? type of studyAp proval.tit le === 'st ring' : fa lse;",
  2132                                                                                  "         ",
  2133                                                                                  "         tests[\"s tudyApprov al \" + i  + \"  has  a descript ion field\ "] = (stud yApproval. descriptio n !== unde fined) ? t rue : fals e;",
  2134                                                                                  "         tests[\"s tudyApprov al \" + i  + \" descr iption is  a string\" ] = (study Approval.d escription  !== undef ined) ? ty peof study Approval.d escription  === 'stri ng' : fals e;",
  2135                                                                                  "         ",
  2136                                                                                  "         tests[\"s tudyApprov al \" + i  + \" has a  createdOn  field\"]  = (studyAp proval.cre atedOn !==  undefined ) ? true :  false;",
  2137                                                                                  "         tests[\"s tudyApprov al \" + i  + \" creat edOn is a  number\"]  = (studyAp proval.cre atedOn !==  undefined ) ? typeof  studyAppr oval.creat edOn === ' number' :  false;",
  2138                                                                                  "         ",
  2139                                                                                  "         tests[\"s tudyApprov al \" + i  + \" has a  createdBy  field\"]  = (studyAp proval.cre atedBy !==  undefined ) ? true :  false;",
  2140                                                                                  "         tests[\"s tudyApprov al \" + i  + \" creat edBy is a  string\"]  = (studyAp proval.cre atedBy !==  undefined ) ? typeof  studyAppr oval.creat edBy === ' string' :  false;",
  2141                                                                                  "         ",
  2142                                                                                  "         tests[\"s tudyApprov al \" + i  + \" has a  obtained  field\"] =  (studyApp roval.obta ined !== u ndefined)  ? true : f alse;",
  2143                                                                                  "         tests[\"s tudyApprov al \" + i  + \" obtai ned is a s tring\"] =  (studyApp roval.obta ined !== u ndefined)  ? (studyAp proval.obt ained ? ty peof study Approval.o btained == = 'string'  : studyAp proval.obt ained ===  null) : fa lse;",
  2144                                                                                  "         ",
  2145                                                                                  "         tests[\"s tudyApprov al \" + i  + \" has a n associat edApproval s field\"]  = (studyA pproval.as sociatedAp provals != = undefine d) ? true  : false;",
  2146                                                                                  "         tests[\"s tudyApprov al \" + i  + \" assoc iatedAppro vals is an  array\"]  = (studyAp proval.ass ociatedApp rovals !==  undefined ) ? Array. isArray(st udyApprova l.associat edApproval s) : false ;",
  2147                                                                                  "      } ",
  2148                                                                                  "    } e lse {",
  2149                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  2150                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  2151                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  2152                                                                                  "    }",
  2153                                                                                  "} else  {",
  2154                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  2155                                                                                  "}"
  2156                                                                         ]
  2157                                                                }
  2158                                                       }
  2159                                               ],
  2160                                               "request":  {
  2161                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/stu dyApproval s",
  2162                                                       "m ethod": "G ET",
  2163                                                       "h eader": [
  2164                                                                {
  2165                                                                         "key":  "Content- Type",
  2166                                                                         "value ": "applic ation/json ",
  2167                                                                         "descr iption": " "
  2168                                                                },
  2169                                                                {
  2170                                                                         "key":  "Accept-E ncoding",
  2171                                                                         "value ": "applic ation/json ",
  2172                                                                         "descr iption": " "
  2173                                                                }
  2174                                                       ],
  2175                                                       "b ody": {
  2176                                                                "mod e": "raw",
  2177                                                                "raw ": ""
  2178                                                       },
  2179                                                       "d escription ": "retrie ve all stu dy approva ls"
  2180                                               },
  2181                                               "response" : []
  2182                                      },
  2183                                      {
  2184                                               "name": "S tudyApprov als - By I D",
  2185                                               "event": [
  2186                                                       {
  2187                                                                "lis ten": "tes t",
  2188                                                                "scr ipt": {
  2189                                                                         "type" : "text/ja vascript",
  2190                                                                         "exec" : [
  2191                                                                                  "//meta  tests",
  2192                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  2193                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  2194                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  2195                                                                                  "",
  2196                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  2197                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  2198                                                                                  "    ",
  2199                                                                                  "    var  schema =  {",
  2200                                                                                  "     \" items\": { ",
  2201                                                                                  "          \"respon se\": \"ar ray\",",
  2202                                                                                  "          \"succes s\": \"boo lean\",",
  2203                                                                                  "          \"messag e\": \"str ing\"",
  2204                                                                                  "         }",
  2205                                                                                  "    };" ,
  2206                                                                                  "    ",
  2207                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  2208                                                                                  "    ",
  2209                                                                                  "    if  (tv4.error ) {",
  2210                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  2211                                                                                  "    }",
  2212                                                                                  "    ",
  2213                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  2214                                                                                  "    ",
  2215                                                                                  "    //i f success  is true we  have some  response  data",
  2216                                                                                  "    if  (jsonData. success == = true) {" ,
  2217                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  2218                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  2219                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  2220                                                                                  "      " ,
  2221                                                                                  "      / /single re sult, retu rn just th e object",
  2222                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  2223                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  2224                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  2225                                                                                  "      }  else if ( jsonData.r esponse) { ",
  2226                                                                                  "           //multi ple result s, return  an array o f objects" ,
  2227                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  2228                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  2229                                                                                  "      } ",
  2230                                                                                  "      " ,
  2231                                                                                  "      / /specific  to this en dpoint",
  2232                                                                                  "      t ests[\"stu dyApproval  has this  ID\"] = (j sonData.re sponse &&  jsonData.r esponse.id  !== undef ined) ? js onData.res ponse.id = == 1 : fal se;",
  2233                                                                                  "      " ,
  2234                                                                                  "    } e lse {",
  2235                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  2236                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  2237                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  2238                                                                                  "    }",
  2239                                                                                  "} else  {",
  2240                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  2241                                                                                  "}"
  2242                                                                         ]
  2243                                                                }
  2244                                                       }
  2245                                               ],
  2246                                               "request":  {
  2247                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/stu dyApproval s/176",
  2248                                                       "m ethod": "G ET",
  2249                                                       "h eader": [
  2250                                                                {
  2251                                                                         "key":  "Content- Type",
  2252                                                                         "value ": "applic ation/json ",
  2253                                                                         "descr iption": " "
  2254                                                                },
  2255                                                                {
  2256                                                                         "key":  "Accept-E ncoding",
  2257                                                                         "value ": "applic ation/json ",
  2258                                                                         "descr iption": " "
  2259                                                                }
  2260                                                       ],
  2261                                                       "b ody": {
  2262                                                                "mod e": "raw",
  2263                                                                "raw ": ""
  2264                                                       },
  2265                                                       "d escription ": "retrie ve a speci fic study  approval"
  2266                                               },
  2267                                               "response" : []
  2268                                      },
  2269                                      {
  2270                                               "name": "S tudyApprov als - By U ser",
  2271                                               "event": [
  2272                                                       {
  2273                                                                "lis ten": "tes t",
  2274                                                                "scr ipt": {
  2275                                                                         "type" : "text/ja vascript",
  2276                                                                         "exec" : [
  2277                                                                                  "//meta  tests",
  2278                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  2279                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  2280                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  2281                                                                                  "",
  2282                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  2283                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  2284                                                                                  "    ",
  2285                                                                                  "    var  schema =  {",
  2286                                                                                  "     \" items\": { ",
  2287                                                                                  "          \"respon se\": \"ar ray\",",
  2288                                                                                  "          \"succes s\": \"boo lean\",",
  2289                                                                                  "          \"messag e\": \"str ing\"",
  2290                                                                                  "         }",
  2291                                                                                  "    };" ,
  2292                                                                                  "    ",
  2293                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  2294                                                                                  "    ",
  2295                                                                                  "    if  (tv4.error ) {",
  2296                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  2297                                                                                  "    }",
  2298                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  2299                                                                                  "    ",
  2300                                                                                  "    //i f success  is true we  have some  response  data",
  2301                                                                                  "    if  (jsonData. success == = true) {" ,
  2302                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  2303                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  2304                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  2305                                                                                  "      " ,
  2306                                                                                  "      / /single re sult, retu rn just th e object",
  2307                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  2308                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  2309                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  2310                                                                                  "      }  else if ( jsonData.r esponse) { ",
  2311                                                                                  "           //multi ple result s, return  an array o f objects" ,
  2312                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  2313                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  2314                                                                                  "      } ",
  2315                                                                                  "      " ,
  2316                                                                                  "      / /tests spe cific to t his API ca ll",
  2317                                                                                  "      f or (var i  in jsonDat a.response ) {",
  2318                                                                                  "         if (i > 1 0) { break ; }",
  2319                                                                                  "         var study Approval =  jsonData. response[i ];",
  2320                                                                                  "         tests[\"s tudyApprov al \" + i  + \" creat edBy = res earcher1\" ] = studyA pproval.cr eatedBy == = 'researc her1';",
  2321                                                                                  "      } ",
  2322                                                                                  "      " ,
  2323                                                                                  "    } e lse {",
  2324                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  2325                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  2326                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  2327                                                                                  "    }",
  2328                                                                                  "} else  {",
  2329                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  2330                                                                                  "}"
  2331                                                                         ]
  2332                                                                }
  2333                                                       }
  2334                                               ],
  2335                                               "request":  {
  2336                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/stu dyApproval s/research er1/create dBy",
  2337                                                       "m ethod": "G ET",
  2338                                                       "h eader": [
  2339                                                                {
  2340                                                                         "key":  "Content- Type",
  2341                                                                         "value ": "applic ation/json ",
  2342                                                                         "descr iption": " "
  2343                                                                },
  2344                                                                {
  2345                                                                         "key":  "Accept-E ncoding",
  2346                                                                         "value ": "applic ation/json ",
  2347                                                                         "descr iption": " "
  2348                                                                }
  2349                                                       ],
  2350                                                       "b ody": {
  2351                                                                "mod e": "raw",
  2352                                                                "raw ": ""
  2353                                                       },
  2354                                                       "d escription ": "retrie ve all stu dy approva ls created  by a spec ific user"
  2355                                               },
  2356                                               "response" : []
  2357                                      },
  2358                                      {
  2359                                               "name": "S tudyApprov als - Crea te",
  2360                                               "event": [
  2361                                                       {
  2362                                                                "lis ten": "tes t",
  2363                                                                "scr ipt": {
  2364                                                                         "type" : "text/ja vascript",
  2365                                                                         "exec" : [
  2366                                                                                  "//meta  tests",
  2367                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  2368                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  2369                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  2370                                                                                  "",
  2371                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  2372                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  2373                                                                                  "    ",
  2374                                                                                  "    var  schema =  {",
  2375                                                                                  "     \" items\": { ",
  2376                                                                                  "          \"respon se\": \"ar ray\",",
  2377                                                                                  "          \"succes s\": \"boo lean\",",
  2378                                                                                  "          \"messag e\": \"str ing\"",
  2379                                                                                  "         }",
  2380                                                                                  "    };" ,
  2381                                                                                  "    ",
  2382                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  2383                                                                                  "    ",
  2384                                                                                  "    if  (tv4.error ) {",
  2385                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  2386                                                                                  "    }",
  2387                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  2388                                                                                  "    ",
  2389                                                                                  "    //i f success  is true we  have some  response  data",
  2390                                                                                  "    if  (jsonData. success == = true) {" ,
  2391                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  2392                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  2393                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  2394                                                                                  "      " ,
  2395                                                                                  "      / /single re sult, retu rn just th e object",
  2396                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  2397                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  2398                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  2399                                                                                  "      }  else if ( jsonData.r esponse) { ",
  2400                                                                                  "           //multi ple result s, return  an array o f objects" ,
  2401                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  2402                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  2403                                                                                  "      } ",
  2404                                                                                  "    } e lse {",
  2405                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  2406                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  2407                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  2408                                                                                  "    }",
  2409                                                                                  "} else  {",
  2410                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  2411                                                                                  "}"
  2412                                                                         ]
  2413                                                                }
  2414                                                       }
  2415                                               ],
  2416                                               "request":  {
  2417                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/stu dyApproval s",
  2418                                                       "m ethod": "P OST",
  2419                                                       "h eader": [
  2420                                                                {
  2421                                                                         "key":  "Content- Type",
  2422                                                                         "value ": "applic ation/json ",
  2423                                                                         "descr iption": " "
  2424                                                                },
  2425                                                                {
  2426                                                                         "key":  "Accept-E ncoding",
  2427                                                                         "value ": "applic ation/json ",
  2428                                                                         "descr iption": " "
  2429                                                                }
  2430                                                       ],
  2431                                                       "b ody": {
  2432                                                                "mod e": "raw",
  2433                                                                "raw ": "{\n\t\ "title\":  \"Postman  sample stu dy approva l\",\n\t\" descriptio n\": \"thi s is a stu dy approva l for demo  purposes\ ",\n\t\"as sociatedAp provals\": [1,2,3],\n \t\"create dBy\": \"r esearcher1 \",\n\t\"o btained\":  \"obtaine d\"\n}"
  2434                                                       },
  2435                                                       "d escription ": "create  a study a pproval"
  2436                                               },
  2437                                               "response" : []
  2438                                      },
  2439                                      {
  2440                                               "name": "S tudyApprov als - Upda te",
  2441                                               "event": [
  2442                                                       {
  2443                                                                "lis ten": "tes t",
  2444                                                                "scr ipt": {
  2445                                                                         "type" : "text/ja vascript",
  2446                                                                         "exec" : [
  2447                                                                                  "//meta  tests",
  2448                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  2449                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  2450                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  2451                                                                                  "",
  2452                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  2453                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  2454                                                                                  "    ",
  2455                                                                                  "    var  schema =  {",
  2456                                                                                  "     \" items\": { ",
  2457                                                                                  "          \"respon se\": \"ar ray\",",
  2458                                                                                  "          \"succes s\": \"boo lean\",",
  2459                                                                                  "          \"messag e\": \"str ing\"",
  2460                                                                                  "         }",
  2461                                                                                  "    };" ,
  2462                                                                                  "    ",
  2463                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  2464                                                                                  "    ",
  2465                                                                                  "    if  (tv4.error ) {",
  2466                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  2467                                                                                  "    }",
  2468                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  2469                                                                                  "    ",
  2470                                                                                  "    //i f success  is true we  have some  response  data",
  2471                                                                                  "    if  (jsonData. success == = true) {" ,
  2472                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  2473                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  2474                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  2475                                                                                  "      " ,
  2476                                                                                  "      / /single re sult, retu rn just th e object",
  2477                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  2478                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  2479                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  2480                                                                                  "      }  else if ( jsonData.r esponse) { ",
  2481                                                                                  "           //multi ple result s, return  an array o f objects" ,
  2482                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  2483                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  2484                                                                                  "      } ",
  2485                                                                                  "    } e lse {",
  2486                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  2487                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  2488                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  2489                                                                                  "    }",
  2490                                                                                  "} else  {",
  2491                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  2492                                                                                  "}"
  2493                                                                         ]
  2494                                                                }
  2495                                                       }
  2496                                               ],
  2497                                               "request":  {
  2498                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/stu dyApproval s/2",
  2499                                                       "m ethod": "P UT",
  2500                                                       "h eader": [
  2501                                                                {
  2502                                                                         "key":  "Content- Type",
  2503                                                                         "value ": "applic ation/json ",
  2504                                                                         "descr iption": " "
  2505                                                                },
  2506                                                                {
  2507                                                                         "key":  "Accept-E ncoding",
  2508                                                                         "value ": "applic ation/json ",
  2509                                                                         "descr iption": " "
  2510                                                                }
  2511                                                       ],
  2512                                                       "b ody": {
  2513                                                                "mod e": "raw",
  2514                                                                "raw ": "{\n\t\ "title\":  \"Postman  sample stu dy approva l - update d\",\n\t\" descriptio n\": \"thi s is a stu dy approva l for demo  purposes  - updated\ ",\n\t\"as sociatedAp provals\": [],\n\t\"c reatedBy\" : \"resear cher1\"\n} "
  2515                                                       },
  2516                                                       "d escription ": "create  a study a pproval"
  2517                                               },
  2518                                               "response" : []
  2519                                      }
  2520                             ]
  2521                    },
  2522                    {
  2523                             "name" : "Users",
  2524                             "descr iption": " ",
  2525                             "item" : [
  2526                                      {
  2527                                               "name": "U sers - By  ID",
  2528                                               "event": [
  2529                                                       {
  2530                                                                "lis ten": "tes t",
  2531                                                                "scr ipt": {
  2532                                                                         "type" : "text/ja vascript",
  2533                                                                         "exec" : [
  2534                                                                                  "//meta  tests",
  2535                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  2536                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  2537                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  2538                                                                                  "",
  2539                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  2540                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  2541                                                                                  "    ",
  2542                                                                                  "    var  schema =  {",
  2543                                                                                  "     \" items\": { ",
  2544                                                                                  "          \"respon se\": \"ar ray\",",
  2545                                                                                  "          \"succes s\": \"boo lean\",",
  2546                                                                                  "          \"messag e\": \"str ing\"",
  2547                                                                                  "         }",
  2548                                                                                  "    };" ,
  2549                                                                                  "    ",
  2550                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  2551                                                                                  "    ",
  2552                                                                                  "    if  (tv4.error ) {",
  2553                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  2554                                                                                  "    }",
  2555                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  2556                                                                                  "    ",
  2557                                                                                  "    //i f success  is true we  have some  response  data",
  2558                                                                                  "    if  (jsonData. success == = true) {" ,
  2559                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  2560                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  2561                                                                                  "      / /tests[\"m essage ===  null\"] =  jsonData. message == = null;",
  2562                                                                                  "      " ,
  2563                                                                                  "      / /single re sult, retu rn just th e object",
  2564                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  2565                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  2566                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  2567                                                                                  "      }  else if ( jsonData.r esponse) { ",
  2568                                                                                  "           //multi ple result s, return  an array o f objects" ,
  2569                                                                                  "           console .log(typeo f jsonData .response) ;",
  2570                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  2571                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  2572                                                                                  "      } ",
  2573                                                                                  "      " ,
  2574                                                                                  "      / /specific  to this en dpoint",
  2575                                                                                  "      t ests[\"res ponse has  userId ele ment\"] =  (jsonData. response.u serId !==  undefined)  ? true :  false;",
  2576                                                                                  "      t ests[\"res ponse has  firstName  element\"]  = (jsonDa ta.respons e.firstNam e !== unde fined) ? t rue : fals e;",
  2577                                                                                  "      t ests[\"res ponse has  middleName  element\" ] = (jsonD ata.respon se.middleN ame !== un defined) ?  true : fa lse;",
  2578                                                                                  "      t ests[\"res ponse has  lastName e lement\"]  = (jsonDat a.response .lastName  !== undefi ned) ? tru e : false; ",
  2579                                                                                  "      t ests[\"res ponse has  createDate  element\" ] = (jsonD ata.respon se.createD ate !== un defined) ?  true : fa lse;",
  2580                                                                                  "      t ests[\"res ponse has  email elem ent\"] = ( jsonData.r esponse.em ailId !==  undefined)  ? true :  false;",
  2581                                                                                  "      t ests[\"res ponse has  status ele ment\"] =  (jsonData. response.s tatus !==  undefined)  ? true :  false;",
  2582                                                                                  "      t ests[\"res ponse has  role eleme nt\"] = (j sonData.re sponse.rol e !== unde fined) ? t rue : fals e;",
  2583                                                                                  "      t ests[\"res ponse has  roleDesc e lement\"]  = (jsonDat a.response .roleDesc  !== undefi ned) ? tru e : false; ",
  2584                                                                                  "      t ests[\"res ponse has  username e lement\"]  = (jsonDat a.response .username  !== undefi ned) ? tru e : false; ",
  2585                                                                                  "      " ,
  2586                                                                                  "      v ar validSt atusDescri ptions = [ 'Active',  'Disabled' ]; ",
  2587                                                                                  "      t ests[\"use r has vali d statusDe scription\ "] = (json Data.respo nse.status  !== undef ined) ? va lidStatusD escription s.indexOf( jsonData.r esponse.st atus) !==  -1  : fals e;",
  2588                                                                                  "         ",
  2589                                                                                  "      v ar validRo les = ['Ad ministrato r', 'reque ster', 'da taDestinat ionManager ', 'dataSo urceManage r'];",
  2590                                                                                  "      t ests[\"use r has vali d Role\"]  = (jsonDat a.response .role !==  undefined)  ? validRo les.indexO f(jsonData .response. role) !==  -1  : fals e;",
  2591                                                                                  "      " ,
  2592                                                                                  "      v ar validRo leroleDesc s = ['Admi nistrator' , 'Researc her', 'Dat a Destinat ion Manage r', 'Data  Source Man ager'];",
  2593                                                                                  "      t ests[\"use r has vali d RoleDesc \"] = (jso nData.resp onse.roleD esc !== un defined) ?  validRole roleDescs. indexOf(js onData.res ponse.role Desc) !==  -1  : fals e;",
  2594                                                                                  "      " ,
  2595                                                                                  "    } e lse {",
  2596                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  2597                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = json.mes sage === \ "No record s found.\" ;",
  2598                                                                                  "      t ests[\"suc cess === f alse\"] =  json.succe ss === fal se;",
  2599                                                                                  "    }",
  2600                                                                                  "} else  {",
  2601                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  2602                                                                                  "}"
  2603                                                                         ]
  2604                                                                }
  2605                                                       }
  2606                                               ],
  2607                                               "request":  {
  2608                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/use rs/1",
  2609                                                       "m ethod": "G ET",
  2610                                                       "h eader": [
  2611                                                                {
  2612                                                                         "key":  "Content- Type",
  2613                                                                         "value ": "applic ation/json ",
  2614                                                                         "descr iption": " "
  2615                                                                },
  2616                                                                {
  2617                                                                         "key":  "Accept-E ncoding",
  2618                                                                         "value ": "applic ation/json ",
  2619                                                                         "descr iption": " "
  2620                                                                }
  2621                                                       ],
  2622                                                       "b ody": {
  2623                                                                "mod e": "formd ata",
  2624                                                                "for mdata": [
  2625                                                                         {
  2626                                                                                  "key": " email",
  2627                                                                                  "value":  "ge",
  2628                                                                                  "type":  "text"
  2629                                                                         },
  2630                                                                         {
  2631                                                                                  "key": " password",
  2632                                                                                  "value":  "mysupers ecretpassw ord",
  2633                                                                                  "type":  "text"
  2634                                                                         }
  2635                                                                ]
  2636                                                       },
  2637                                                       "d escription ": "retrie ve user da ta by ID"
  2638                                               },
  2639                                               "response" : []
  2640                                      },
  2641                                      {
  2642                                               "name": "U sers - By  ID - doesn 't exists" ,
  2643                                               "event": [
  2644                                                       {
  2645                                                                "lis ten": "tes t",
  2646                                                                "scr ipt": {
  2647                                                                         "type" : "text/ja vascript",
  2648                                                                         "exec" : [
  2649                                                                                  "//meta  tests",
  2650                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  2651                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  2652                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  2653                                                                                  "",
  2654                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  2655                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  2656                                                                                  "    ",
  2657                                                                                  "    var  schema =  {",
  2658                                                                                  "     \" items\": { ",
  2659                                                                                  "          \"respon se\": \"ar ray\",",
  2660                                                                                  "          \"succes s\": \"boo lean\",",
  2661                                                                                  "          \"messag e\": \"str ing\"",
  2662                                                                                  "         }",
  2663                                                                                  "    };" ,
  2664                                                                                  "    ",
  2665                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  2666                                                                                  "    ",
  2667                                                                                  "    if  (tv4.error ) {",
  2668                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  2669                                                                                  "    }",
  2670                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  2671                                                                                  "    ",
  2672                                                                                  "    //i f success  is true we  have some  response  data",
  2673                                                                                  "    if  (jsonData. success == = true) {" ,
  2674                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  2675                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  2676                                                                                  "      / /tests[\"m essage ===  null\"] =  jsonData. message == = null;",
  2677                                                                                  "      " ,
  2678                                                                                  "      / /single re sult, retu rn just th e object",
  2679                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  2680                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  2681                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  2682                                                                                  "      }  else if ( jsonData.r esponse) { ",
  2683                                                                                  "           //multi ple result s, return  an array o f objects" ,
  2684                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  2685                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  2686                                                                                  "      } ",
  2687                                                                                  "      " ,
  2688                                                                                  "      / /specific  to this en dpoint",
  2689                                                                                  "      / /tests[\"s tudyApprov al has thi s ID\"] =  (jsonData. response[0 ].id !== u ndefined)  ? jsonData .response[ 0].id ===  1 : false; ",
  2690                                                                                  "      " ,
  2691                                                                                  "    } e lse {",
  2692                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  2693                                                                                  "      t ests[\"mes sage === N o records  found\"] =  jsonData. message == = \"No rec ords found \";",
  2694                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  2695                                                                                  "    }",
  2696                                                                                  "} else  {",
  2697                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  2698                                                                                  "}"
  2699                                                                         ]
  2700                                                                }
  2701                                                       }
  2702                                               ],
  2703                                               "request":  {
  2704                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/use rs/0",
  2705                                                       "m ethod": "G ET",
  2706                                                       "h eader": [
  2707                                                                {
  2708                                                                         "key":  "Content- Type",
  2709                                                                         "value ": "applic ation/json ",
  2710                                                                         "descr iption": " "
  2711                                                                },
  2712                                                                {
  2713                                                                         "key":  "Accept-E ncoding",
  2714                                                                         "value ": "applic ation/json ",
  2715                                                                         "descr iption": " "
  2716                                                                }
  2717                                                       ],
  2718                                                       "b ody": {
  2719                                                                "mod e": "formd ata",
  2720                                                                "for mdata": [
  2721                                                                         {
  2722                                                                                  "key": " email",
  2723                                                                                  "value":  "ge",
  2724                                                                                  "type":  "text"
  2725                                                                         },
  2726                                                                         {
  2727                                                                                  "key": " password",
  2728                                                                                  "value":  "mysupers ecretpassw ord",
  2729                                                                                  "type":  "text"
  2730                                                                         }
  2731                                                                ]
  2732                                                       },
  2733                                                       "d escription ": "retrie ve user da ta by ID"
  2734                                               },
  2735                                               "response" : []
  2736                                      },
  2737                                      {
  2738                                               "name": "U sers - By  Email",
  2739                                               "event": [
  2740                                                       {
  2741                                                                "lis ten": "tes t",
  2742                                                                "scr ipt": {
  2743                                                                         "type" : "text/ja vascript",
  2744                                                                         "exec" : [
  2745                                                                                  "//meta  tests",
  2746                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  2747                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  2748                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  2749                                                                                  "",
  2750                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  2751                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  2752                                                                                  "    ",
  2753                                                                                  "    var  schema =  {",
  2754                                                                                  "     \" items\": { ",
  2755                                                                                  "          \"respon se\": \"ar ray\",",
  2756                                                                                  "          \"succes s\": \"boo lean\",",
  2757                                                                                  "          \"messag e\": \"str ing\"",
  2758                                                                                  "         }",
  2759                                                                                  "    };" ,
  2760                                                                                  "    ",
  2761                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  2762                                                                                  "    ",
  2763                                                                                  "    if  (tv4.error ) {",
  2764                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  2765                                                                                  "    }",
  2766                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  2767                                                                                  "    ",
  2768                                                                                  "    //i f success  is true we  have some  response  data",
  2769                                                                                  "    if  (jsonData. success == = true) {" ,
  2770                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  2771                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  2772                                                                                  "      / /tests[\"m essage ===  null\"] =  jsonData. message == = null;",
  2773                                                                                  "      " ,
  2774                                                                                  "      / /single re sult, retu rn just th e object",
  2775                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  2776                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  2777                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  2778                                                                                  "      }  else if ( jsonData.r esponse) { ",
  2779                                                                                  "           //multi ple result s, return  an array o f objects" ,
  2780                                                                                  "           console .log(typeo f jsonData .response) ;",
  2781                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  2782                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  2783                                                                                  "      } ",
  2784                                                                                  "      " ,
  2785                                                                                  "      / /specific  to this en dpoint",
  2786                                                                                  "      t ests[\"res ponse has  userId ele ment\"] =  (jsonData. response.u serId !==  undefined)  ? true :  false;",
  2787                                                                                  "      t ests[\"res ponse has  firstName  element\"]  = (jsonDa ta.respons e.firstNam e !== unde fined) ? t rue : fals e;",
  2788                                                                                  "      t ests[\"res ponse has  middleName  element\" ] = (jsonD ata.respon se.middleN ame !== un defined) ?  true : fa lse;",
  2789                                                                                  "      t ests[\"res ponse has  lastName e lement\"]  = (jsonDat a.response .lastName  !== undefi ned) ? tru e : false; ",
  2790                                                                                  "      t ests[\"res ponse has  createDate  element\" ] = (jsonD ata.respon se.createD ate !== un defined) ?  true : fa lse;",
  2791                                                                                  "      t ests[\"res ponse has  email elem ent\"] = ( jsonData.r esponse.em ailId !==  undefined)  ? true :  false;",
  2792                                                                                  "      t ests[\"res ponse has  status ele ment\"] =  (jsonData. response.s tatus !==  undefined)  ? true :  false;",
  2793                                                                                  "      t ests[\"res ponse has  role eleme nt\"] = (j sonData.re sponse.rol e !== unde fined) ? t rue : fals e;",
  2794                                                                                  "      t ests[\"res ponse has  roleDesc e lement\"]  = (jsonDat a.response .roleDesc  !== undefi ned) ? tru e : false; ",
  2795                                                                                  "      t ests[\"res ponse has  username e lement\"]  = (jsonDat a.response .username  !== undefi ned) ? tru e : false; ",
  2796                                                                                  "      " ,
  2797                                                                                  "      v ar validSt atusDescri ptions = [ 'Active',  'Disabled' ]; ",
  2798                                                                                  "      t ests[\"use r has vali d statusDe scription\ "] = (json Data.respo nse.status  !== undef ined) ? va lidStatusD escription s.indexOf( jsonData.r esponse.st atus) !==  -1  : fals e;",
  2799                                                                                  "         ",
  2800                                                                                  "      v ar validRo les = ['Ad ministrato r', 'reque ster', 'da taDestinat ionManager ', 'dataSo urceManage r'];",
  2801                                                                                  "      t ests[\"use r has vali d Role\"]  = (jsonDat a.response .role !==  undefined)  ? validRo les.indexO f(jsonData .response. role) !==  -1  : fals e;",
  2802                                                                                  "      " ,
  2803                                                                                  "      v ar validRo leroleDesc s = ['Admi nistrator' , 'Request er', 'Data  Destinati on Manager ', 'Data S ource Mana ger'];",
  2804                                                                                  "      t ests[\"use r has vali d RoleDesc \"] = (jso nData.resp onse.roleD esc !== un defined) ?  validRole roleDescs. indexOf(js onData.res ponse.role Desc) !==  -1  : fals e;",
  2805                                                                                  "      " ,
  2806                                                                                  "    } e lse {",
  2807                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  2808                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = json.mes sage === \ "No record s found.\" ;",
  2809                                                                                  "      t ests[\"suc cess === f alse\"] =  json.succe ss === fal se;",
  2810                                                                                  "    }",
  2811                                                                                  "} else  {",
  2812                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  2813                                                                                  "}"
  2814                                                                         ]
  2815                                                                }
  2816                                                       }
  2817                                               ],
  2818                                               "request":  {
  2819                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/use rs/genisis researcher 4@gmail.co m/email",
  2820                                                       "m ethod": "G ET",
  2821                                                       "h eader": [
  2822                                                                {
  2823                                                                         "key":  "Content- Type",
  2824                                                                         "value ": "applic ation/json ",
  2825                                                                         "descr iption": " "
  2826                                                                },
  2827                                                                {
  2828                                                                         "key":  "Accept-E ncoding",
  2829                                                                         "value ": "applic ation/json ",
  2830                                                                         "descr iption": " "
  2831                                                                }
  2832                                                       ],
  2833                                                       "b ody": {
  2834                                                                "mod e": "formd ata",
  2835                                                                "for mdata": [
  2836                                                                         {
  2837                                                                                  "key": " email",
  2838                                                                                  "value":  "ge",
  2839                                                                                  "type":  "text"
  2840                                                                         },
  2841                                                                         {
  2842                                                                                  "key": " password",
  2843                                                                                  "value":  "mysupers ecretpassw ord",
  2844                                                                                  "type":  "text"
  2845                                                                         }
  2846                                                                ]
  2847                                                       },
  2848                                                       "d escription ": "retrie ve user da ta for a s ingle user  by email  address"
  2849                                               },
  2850                                               "response" : []
  2851                                      },
  2852                                      {
  2853                                               "name": "U sers - By  Email - do esn't exis ts",
  2854                                               "event": [
  2855                                                       {
  2856                                                                "lis ten": "tes t",
  2857                                                                "scr ipt": {
  2858                                                                         "type" : "text/ja vascript",
  2859                                                                         "exec" : [
  2860                                                                                  "//meta  tests",
  2861                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  2862                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  2863                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  2864                                                                                  "",
  2865                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  2866                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  2867                                                                                  "    ",
  2868                                                                                  "    var  schema =  {",
  2869                                                                                  "     \" items\": { ",
  2870                                                                                  "          \"respon se\": \"ar ray\",",
  2871                                                                                  "          \"succes s\": \"boo lean\",",
  2872                                                                                  "          \"messag e\": \"str ing\"",
  2873                                                                                  "         }",
  2874                                                                                  "    };" ,
  2875                                                                                  "    ",
  2876                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  2877                                                                                  "    ",
  2878                                                                                  "    if  (tv4.error ) {",
  2879                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  2880                                                                                  "    }",
  2881                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  2882                                                                                  "    ",
  2883                                                                                  "    //i f success  is true we  have some  response  data",
  2884                                                                                  "    if  (jsonData. success == = true) {" ,
  2885                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  2886                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  2887                                                                                  "      / /tests[\"m essage ===  null\"] =  jsonData. message == = null;",
  2888                                                                                  "      " ,
  2889                                                                                  "      / /single re sult, retu rn just th e object",
  2890                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  2891                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  2892                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  2893                                                                                  "      }  else if ( jsonData.r esponse) { ",
  2894                                                                                  "           //multi ple result s, return  an array o f objects" ,
  2895                                                                                  "           console .log(typeo f jsonData .response) ;",
  2896                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  2897                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  2898                                                                                  "      } ",
  2899                                                                                  "      " ,
  2900                                                                                  "      / /specific  to this en dpoint",
  2901                                                                                  "      t ests[\"use r has this  email\"]  = (jsonDat a.response .emailId ! == undefin ed) ? json Data.respo nse.emailI d === \"ge nisisresea rcher1@gma il.com\" :  false;",
  2902                                                                                  "    } e lse {",
  2903                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  2904                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d\";",
  2905                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  2906                                                                                  "    }",
  2907                                                                                  "} else  {",
  2908                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  2909                                                                                  "}"
  2910                                                                         ]
  2911                                                                }
  2912                                                       }
  2913                                               ],
  2914                                               "request":  {
  2915                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/use rs/abc@abc .abc/email ",
  2916                                                       "m ethod": "G ET",
  2917                                                       "h eader": [
  2918                                                                {
  2919                                                                         "key":  "Content- Type",
  2920                                                                         "value ": "applic ation/json ",
  2921                                                                         "descr iption": " "
  2922                                                                },
  2923                                                                {
  2924                                                                         "key":  "Accept-E ncoding",
  2925                                                                         "value ": "applic ation/json ",
  2926                                                                         "descr iption": " "
  2927                                                                }
  2928                                                       ],
  2929                                                       "b ody": {
  2930                                                                "mod e": "formd ata",
  2931                                                                "for mdata": [
  2932                                                                         {
  2933                                                                                  "key": " email",
  2934                                                                                  "value":  "ge",
  2935                                                                                  "type":  "text"
  2936                                                                         },
  2937                                                                         {
  2938                                                                                  "key": " password",
  2939                                                                                  "value":  "mysupers ecretpassw ord",
  2940                                                                                  "type":  "text"
  2941                                                                         }
  2942                                                                ]
  2943                                                       },
  2944                                                       "d escription ": "retrie ve user da ta for a s ingle user  by email  address"
  2945                                               },
  2946                                               "response" : []
  2947                                      },
  2948                                      {
  2949                                               "name": "U sers Role  - By ID",
  2950                                               "event": [
  2951                                                       {
  2952                                                                "lis ten": "tes t",
  2953                                                                "scr ipt": {
  2954                                                                         "type" : "text/ja vascript",
  2955                                                                         "exec" : [
  2956                                                                                  "//meta  tests",
  2957                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  2958                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  2959                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  2960                                                                                  "",
  2961                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  2962                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  2963                                                                                  "    ",
  2964                                                                                  "    var  schema =  {",
  2965                                                                                  "     \" items\": { ",
  2966                                                                                  "          \"respon se\": \"ar ray\",",
  2967                                                                                  "          \"succes s\": \"boo lean\",",
  2968                                                                                  "          \"messag e\": \"str ing\"",
  2969                                                                                  "         }",
  2970                                                                                  "    };" ,
  2971                                                                                  "    ",
  2972                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  2973                                                                                  "    ",
  2974                                                                                  "    if  (tv4.error ) {",
  2975                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  2976                                                                                  "    }",
  2977                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  2978                                                                                  "    ",
  2979                                                                                  "    //i f success  is true we  have some  response  data",
  2980                                                                                  "    if  (jsonData. success == = true) {" ,
  2981                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  2982                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  2983                                                                                  "      / /tests[\"m essage ===  null\"] =  jsonData. message == = null;",
  2984                                                                                  "      " ,
  2985                                                                                  "      v ar validRo les = ['Ad ministrato r', 'reque ster', 'da taDestinat ionManager ', 'dataSo urceManage r'];",
  2986                                                                                  "      t ests[\"res ponse has  valid Role \"] = (jso nData.resp onse !== u ndefined)  ? validRol es.indexOf (jsonData. response)  !== -1  :  false;",
  2987                                                                                  "    } e lse {",
  2988                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  2989                                                                                  "      t ests[\"mes sage === N o records  found\"] =  jsonData. message == = \"No rec ords found \";",
  2990                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  2991                                                                                  "    }",
  2992                                                                                  "} else  {",
  2993                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  2994                                                                                  "}"
  2995                                                                         ]
  2996                                                                }
  2997                                                       }
  2998                                               ],
  2999                                               "request":  {
  3000                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/use rs/role/1" ,
  3001                                                       "m ethod": "G ET",
  3002                                                       "h eader": [
  3003                                                                {
  3004                                                                         "key":  "Content- Type",
  3005                                                                         "value ": "applic ation/json ",
  3006                                                                         "descr iption": " "
  3007                                                                },
  3008                                                                {
  3009                                                                         "key":  "Accept-E ncoding",
  3010                                                                         "value ": "applic ation/json ",
  3011                                                                         "descr iption": " "
  3012                                                                }
  3013                                                       ],
  3014                                                       "b ody": {
  3015                                                                "mod e": "formd ata",
  3016                                                                "for mdata": [
  3017                                                                         {
  3018                                                                                  "key": " email",
  3019                                                                                  "value":  "ge",
  3020                                                                                  "type":  "text"
  3021                                                                         },
  3022                                                                         {
  3023                                                                                  "key": " password",
  3024                                                                                  "value":  "mysupers ecretpassw ord",
  3025                                                                                  "type":  "text"
  3026                                                                         }
  3027                                                                ]
  3028                                                       },
  3029                                                       "d escription ": "retrie ve user ro le by user Id"
  3030                                               },
  3031                                               "response" : []
  3032                                      },
  3033                                      {
  3034                                               "name": "U sers Role  - By ID -  doen't exi sts",
  3035                                               "event": [
  3036                                                       {
  3037                                                                "lis ten": "tes t",
  3038                                                                "scr ipt": {
  3039                                                                         "type" : "text/ja vascript",
  3040                                                                         "exec" : [
  3041                                                                                  "//meta  tests",
  3042                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  3043                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  3044                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  3045                                                                                  "",
  3046                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  3047                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  3048                                                                                  "    ",
  3049                                                                                  "    var  schema =  {",
  3050                                                                                  "     \" items\": { ",
  3051                                                                                  "          \"respon se\": \"ar ray\",",
  3052                                                                                  "          \"succes s\": \"boo lean\",",
  3053                                                                                  "          \"messag e\": \"str ing\"",
  3054                                                                                  "         }",
  3055                                                                                  "    };" ,
  3056                                                                                  "    ",
  3057                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  3058                                                                                  "    ",
  3059                                                                                  "    if  (tv4.error ) {",
  3060                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  3061                                                                                  "    }",
  3062                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  3063                                                                                  "    ",
  3064                                                                                  "    //i f success  is true we  have some  response  data",
  3065                                                                                  "    if  (jsonData. success == = true) {" ,
  3066                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  3067                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  3068                                                                                  "      / /tests[\"m essage ===  null\"] =  jsonData. message == = null;",
  3069                                                                                  "      " ,
  3070                                                                                  "      v ar validRo les = ['Ad ministrato r', 'reque ster', 'da taDestinat ionManager ', 'dataSo urceManage r'];",
  3071                                                                                  "      t ests[\"res ponse has  valid Role \"] = (jso nData.resp onse !== u ndefined)  ? validRol es.indexOf (jsonData. response)  !== -1  :  false;",
  3072                                                                                  "    } e lse {",
  3073                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  3074                                                                                  "      t ests[\"mes sage === N o roles fo und.\"] =  jsonData.m essage ===  \"No role s found.\" ;",
  3075                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  3076                                                                                  "    }",
  3077                                                                                  "} else  {",
  3078                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  3079                                                                                  "}"
  3080                                                                         ]
  3081                                                                }
  3082                                                       }
  3083                                               ],
  3084                                               "request":  {
  3085                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/use rs/role/0" ,
  3086                                                       "m ethod": "G ET",
  3087                                                       "h eader": [
  3088                                                                {
  3089                                                                         "key":  "Content- Type",
  3090                                                                         "value ": "applic ation/json ",
  3091                                                                         "descr iption": " "
  3092                                                                },
  3093                                                                {
  3094                                                                         "key":  "Accept-E ncoding",
  3095                                                                         "value ": "applic ation/json ",
  3096                                                                         "descr iption": " "
  3097                                                                }
  3098                                                       ],
  3099                                                       "b ody": {
  3100                                                                "mod e": "formd ata",
  3101                                                                "for mdata": [
  3102                                                                         {
  3103                                                                                  "key": " email",
  3104                                                                                  "value":  "ge",
  3105                                                                                  "type":  "text"
  3106                                                                         },
  3107                                                                         {
  3108                                                                                  "key": " password",
  3109                                                                                  "value":  "mysupers ecretpassw ord",
  3110                                                                                  "type":  "text"
  3111                                                                         }
  3112                                                                ]
  3113                                                       },
  3114                                                       "d escription ": "retrie ve user ro le by user Id"
  3115                                               },
  3116                                               "response" : []
  3117                                      },
  3118                                      {
  3119                                               "name": "U sers - By  userName",
  3120                                               "event": [
  3121                                                       {
  3122                                                                "lis ten": "tes t",
  3123                                                                "scr ipt": {
  3124                                                                         "type" : "text/ja vascript",
  3125                                                                         "exec" : [
  3126                                                                                  "//meta  tests",
  3127                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  3128                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  3129                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  3130                                                                                  "",
  3131                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  3132                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  3133                                                                                  "    ",
  3134                                                                                  "    var  schema =  {",
  3135                                                                                  "     \" items\": { ",
  3136                                                                                  "          \"respon se\": \"ar ray\",",
  3137                                                                                  "          \"succes s\": \"boo lean\",",
  3138                                                                                  "          \"messag e\": \"str ing\"",
  3139                                                                                  "         }",
  3140                                                                                  "    };" ,
  3141                                                                                  "    ",
  3142                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  3143                                                                                  "    ",
  3144                                                                                  "    if  (tv4.error ) {",
  3145                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  3146                                                                                  "    }",
  3147                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  3148                                                                                  "    ",
  3149                                                                                  "    //i f success  is true we  have some  response  data",
  3150                                                                                  "    if  (jsonData. success == = true) {" ,
  3151                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  3152                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  3153                                                                                  "      / /tests[\"m essage ===  null\"] =  jsonData. message == = null;",
  3154                                                                                  "      " ,
  3155                                                                                  "      / /single re sult, retu rn just th e object",
  3156                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  3157                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  3158                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  3159                                                                                  "      }  else if ( jsonData.r esponse) { ",
  3160                                                                                  "           //multi ple result s, return  an array o f objects" ,
  3161                                                                                  "           console .log(typeo f jsonData .response) ;",
  3162                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  3163                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  3164                                                                                  "      } ",
  3165                                                                                  "      " ,
  3166                                                                                  "      / /specific  to this en dpoint",
  3167                                                                                  "      t ests[\"res ponse has  userId ele ment\"] =  (jsonData. response.u serId !==  undefined)  ? true :  false;",
  3168                                                                                  "      t ests[\"res ponse has  firstName  element\"]  = (jsonDa ta.respons e.firstNam e !== unde fined) ? t rue : fals e;",
  3169                                                                                  "      t ests[\"res ponse has  middleName  element\" ] = (jsonD ata.respon se.middleN ame !== un defined) ?  true : fa lse;",
  3170                                                                                  "      t ests[\"res ponse has  lastName e lement\"]  = (jsonDat a.response .lastName  !== undefi ned) ? tru e : false; ",
  3171                                                                                  "      t ests[\"res ponse has  createDate  element\" ] = (jsonD ata.respon se.createD ate !== un defined) ?  true : fa lse;",
  3172                                                                                  "      t ests[\"res ponse has  email elem ent\"] = ( jsonData.r esponse.em ailId !==  undefined)  ? true :  false;",
  3173                                                                                  "      t ests[\"res ponse has  status ele ment\"] =  (jsonData. response.s tatus !==  undefined)  ? true :  false;",
  3174                                                                                  "      t ests[\"res ponse has  role eleme nt\"] = (j sonData.re sponse.rol e !== unde fined) ? t rue : fals e;",
  3175                                                                                  "      t ests[\"res ponse has  roleDesc e lement\"]  = (jsonDat a.response .roleDesc  !== undefi ned) ? tru e : false; ",
  3176                                                                                  "      t ests[\"res ponse has  username e lement\"]  = (jsonDat a.response .username  !== undefi ned) ? tru e : false; ",
  3177                                                                                  "      " ,
  3178                                                                                  "      / /tests[\"u ser has th is userId\ "] = (json Data.respo nse.userId  !== undef ined) ? js onData.res ponse.user Id === 1 :  false;",
  3179                                                                                  "      / /tests[\"u ser has th is firstNa me\"] = (j sonData.re sponse.fir stName !==  undefined ) ? jsonDa ta.respons e.firstNam e === \"Fr ancis\" :  false;",
  3180                                                                                  "      / /tests[\"u ser has th is middleN ame\"] = ( jsonData.r esponse.mi ddleName ! == undefin ed) ? json Data.respo nse.middle Name === \ "\" : fals e;",
  3181                                                                                  "      / /tests[\"u ser has th is lastNam e\"] = (js onData.res ponse.last Name !== u ndefined)  ? jsonData .response. lastName = == \"Swift \" : false ;",
  3182                                                                                  "      / /tests[\"u ser has th is createD ate\"] = ( jsonData.r esponse.cr eateDate ! == undefin ed) ? json Data.respo nse.create Date === 1 4926146543 93 : false ;",
  3183                                                                                  "      / /tests[\"u ser has th is email\" ] = (jsonD ata.respon se.emailId  !== undef ined) ? js onData.res ponse.emai lId === \" genisisad@ gmail.com\ " : false; ",
  3184                                                                                  "      " ,
  3185                                                                                  "      v ar validSt atusDescri ptions = [ 'Active',  'Disabled' ]; ",
  3186                                                                                  "      t ests[\"use r has vali d statusDe scription\ "] = (json Data.respo nse.status  !== undef ined) ? va lidStatusD escription s.indexOf( jsonData.r esponse.st atus) !==  -1  : fals e;",
  3187                                                                                  "         ",
  3188                                                                                  "      v ar validRo les = ['Ad ministrato r', 'reque ster', 'da taDestinat ionManager ', 'dataSo urceManage r'];",
  3189                                                                                  "      t ests[\"use r has vali d Role\"]  = (jsonDat a.response .role !==  undefined)  ? validRo les.indexO f(jsonData .response. role) !==  -1  : fals e;",
  3190                                                                                  "      " ,
  3191                                                                                  "      v ar validRo leroleDesc s = ['Admi nistrator' , 'Researc her', 'Dat a Destinat ion Manage r', 'Data  Source Man ager'];",
  3192                                                                                  "      t ests[\"use r has vali d RoleDesc \"] = (jso nData.resp onse.roleD esc !== un defined) ?  validRole roleDescs. indexOf(js onData.res ponse.role Desc) !==  -1  : fals e;",
  3193                                                                                  "      " ,
  3194                                                                                         //tests[\" user has t his userna me\"] = (j sonData.re sponse.use rname !==  undefined)  ? jsonDat a.response .username  === \" D N
S      DN S\" : fals e;",
  3195                                                                                  "    } e lse {",
  3196                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  3197                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = json.mes sage === \ "No record s found.\" ;",
  3198                                                                                  "      t ests[\"suc cess === f alse\"] =  json.succe ss === fal se;",
  3199                                                                                  "    }",
  3200                                                                                  "} else  {",
  3201                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  3202                                                                                  "}"
  3203                                                                         ]
  3204                                                                }
  3205                                                       }
  3206                                               ],
  3207                                               "request":  {
  3208                                                        "url": "{{ genisis2.s ervice.url }}/Genisis 2Services/ services/u sers/usern ame/ DN S      D NS ",
  3209                                                       "m ethod": "G ET",
  3210                                                       "h eader": [
  3211                                                                {
  3212                                                                         "key":  "Content- Type",
  3213                                                                         "value ": "applic ation/json ",
  3214                                                                         "descr iption": " "
  3215                                                                },
  3216                                                                {
  3217                                                                         "key":  "Accept-E ncoding",
  3218                                                                         "value ": "applic ation/json ",
  3219                                                                         "descr iption": " "
  3220                                                                }
  3221                                                       ],
  3222                                                       "b ody": {
  3223                                                                "mod e": "formd ata",
  3224                                                                "for mdata": [
  3225                                                                         {
  3226                                                                                  "key": " email",
  3227                                                                                  "value":  "ge",
  3228                                                                                  "type":  "text"
  3229                                                                         },
  3230                                                                         {
  3231                                                                                  "key": " password",
  3232                                                                                  "value":  "mysupers ecretpassw ord",
  3233                                                                                  "type":  "text"
  3234                                                                         }
  3235                                                                ]
  3236                                                       },
  3237                                                       "d escription ": "retrie ve user da ta for a s ingle user  by userna me"
  3238                                               },
  3239                                               "response" : []
  3240                                      },
  3241                                      {
  3242                                               "name": "U sers - By  userName -  Doesn't e xists",
  3243                                               "event": [
  3244                                                       {
  3245                                                                "lis ten": "tes t",
  3246                                                                "scr ipt": {
  3247                                                                         "type" : "text/ja vascript",
  3248                                                                         "exec" : [
  3249                                                                                  "//meta  tests",
  3250                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  3251                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  3252                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  3253                                                                                  "",
  3254                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  3255                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  3256                                                                                  "    ",
  3257                                                                                  "    var  schema =  {",
  3258                                                                                  "     \" items\": { ",
  3259                                                                                  "          \"respon se\": \"ar ray\",",
  3260                                                                                  "          \"succes s\": \"boo lean\",",
  3261                                                                                  "          \"messag e\": \"str ing\"",
  3262                                                                                  "         }",
  3263                                                                                  "    };" ,
  3264                                                                                  "    ",
  3265                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  3266                                                                                  "    ",
  3267                                                                                  "    if  (tv4.error ) {",
  3268                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  3269                                                                                  "    }",
  3270                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  3271                                                                                  "    ",
  3272                                                                                  "    //i f success  is true we  have some  response  data",
  3273                                                                                  "    if  (jsonData. success == = true) {" ,
  3274                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  3275                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  3276                                                                                  "      / /tests[\"m essage ===  null\"] =  jsonData. message == = null;",
  3277                                                                                  "      " ,
  3278                                                                                  "      / /single re sult, retu rn just th e object",
  3279                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  3280                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  3281                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  3282                                                                                  "      }  else if ( jsonData.r esponse) { ",
  3283                                                                                  "           //multi ple result s, return  an array o f objects" ,
  3284                                                                                  "           console .log(typeo f jsonData .response) ;",
  3285                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  3286                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  3287                                                                                  "      } ",
  3288                                                                                  "      " ,
  3289                                                                                  "      / /specific  to this en dpoint",
  3290                                                                                  "      t ests[\"res ponse has  userId ele ment\"] =  (jsonData. response.u serId !==  undefined)  ? true :  false;",
  3291                                                                                  "      t ests[\"res ponse has  firstName  element\"]  = (jsonDa ta.respons e.firstNam e !== unde fined) ? t rue : fals e;",
  3292                                                                                  "      t ests[\"res ponse has  middleName  element\" ] = (jsonD ata.respon se.middleN ame !== un defined) ?  true : fa lse;",
  3293                                                                                  "      t ests[\"res ponse has  lastName e lement\"]  = (jsonDat a.response .lastName  !== undefi ned) ? tru e : false; ",
  3294                                                                                  "      t ests[\"res ponse has  createDate  element\" ] = (jsonD ata.respon se.createD ate !== un defined) ?  true : fa lse;",
  3295                                                                                  "      t ests[\"res ponse has  email elem ent\"] = ( jsonData.r esponse.em ailId !==  undefined)  ? true :  false;",
  3296                                                                                  "      t ests[\"res ponse has  status ele ment\"] =  (jsonData. response.s tatus !==  undefined)  ? true :  false;",
  3297                                                                                  "      t ests[\"res ponse has  role eleme nt\"] = (j sonData.re sponse.rol e !== unde fined) ? t rue : fals e;",
  3298                                                                                  "      t ests[\"res ponse has  username e lement\"]  = (jsonDat a.response .username  !== undefi ned) ? tru e : false; ",
  3299                                                                                  "      " ,
  3300                                                                                  "      t ests[\"use r has this  userId\"]  = (jsonDa ta.respons e.userId ! == undefin ed) ? json Data.respo nse.userId  === 1 : f alse;",
  3301                                                                                  "      t ests[\"use r has this  firstName \"] = (jso nData.resp onse.first Name !== u ndefined)  ? jsonData .response. firstName  === \"Fran cis\" : fa lse;",
  3302                                                                                  "      t ests[\"use r has this  middleNam e\"] = (js onData.res ponse.midd leName !==  undefined ) ? jsonDa ta.respons e.middleNa me === \"\ " : false; ",
  3303                                                                                  "      t ests[\"use r has this  lastName\ "] = (json Data.respo nse.lastNa me !== und efined) ?  jsonData.r esponse.la stName ===  \"Swift\"  : false;" ,
  3304                                                                                  "      / /tests[\"u ser has th is createD ate\"] = ( jsonData.r esponse.cr eateDate ! == undefin ed) ? json Data.respo nse.create Date === 1 4926146543 93 : false ;",
  3305                                                                                  "      t ests[\"use r has this  email\"]  = (jsonDat a.response .emailId ! == undefin ed) ? json Data.respo nse.emailI d === \"ge nisisad@gm ail.com\"  : false;",
  3306                                                                                  "      " ,
  3307                                                                                  "      v ar validSt atusDescri ptions = [ 'Active',  'Disabled' ]; ",
  3308                                                                                  "      t ests[\"use r has vali d statusDe scription\ "] = (json Data.respo nse.status  !== undef ined) ? va lidStatusD escription s.indexOf( jsonData.r esponse.st atus) !==  -1  : fals e;",
  3309                                                                                  "         ",
  3310                                                                                  "      v ar validRo les = ['Ad ministrato r', 'reque ster', 'da taDestinat ionManager ', 'dataSo urceManage r'];",
  3311                                                                                  "      t ests[\"use r has vali d Role\"]  = (jsonDat a.response .role !==  undefined)  ? validRo les.indexO f(jsonData .response. role) !==  -1  : fals e;",
  3312                                                                                  "      " ,
  3313                                                                                         tests[\"us er has thi s username \"] = (jso nData.resp onse.usern ame !== un defined) ?  jsonData. response.u sername == = \" D N
S      DN S\" : fals e;",
  3314                                                                                  "    } e lse {",
  3315                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  3316                                                                                  "      t ests[\"mes sage === T his user d oes not ex ist in the  system\"]  = jsonDat a.message  === \"This  user does  not exist  in the sy stem\";",
  3317                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  3318                                                                                  "    }",
  3319                                                                                  "} else  {",
  3320                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  3321                                                                                  "}"
  3322                                                                         ]
  3323                                                                }
  3324                                                       }
  3325                                               ],
  3326                                               "request":  {
  3327                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/use rs/usernam e/abcd",
  3328                                                       "m ethod": "G ET",
  3329                                                       "h eader": [
  3330                                                                {
  3331                                                                         "key":  "Content- Type",
  3332                                                                         "value ": "applic ation/json ",
  3333                                                                         "descr iption": " "
  3334                                                                },
  3335                                                                {
  3336                                                                         "key":  "Accept-E ncoding",
  3337                                                                         "value ": "applic ation/json ",
  3338                                                                         "descr iption": " "
  3339                                                                }
  3340                                                       ],
  3341                                                       "b ody": {
  3342                                                                "mod e": "formd ata",
  3343                                                                "for mdata": [
  3344                                                                         {
  3345                                                                                  "key": " email",
  3346                                                                                  "value":  "ge",
  3347                                                                                  "type":  "text"
  3348                                                                         },
  3349                                                                         {
  3350                                                                                  "key": " password",
  3351                                                                                  "value":  "mysupers ecretpassw ord",
  3352                                                                                  "type":  "text"
  3353                                                                         }
  3354                                                                ]
  3355                                                       },
  3356                                                       "d escription ": "retrie ve user da ta for a s ingle user  by userna me"
  3357                                               },
  3358                                               "response" : []
  3359                                      },
  3360                                      {
  3361                                               "name": "U sers - Use r Count on  Role",
  3362                                               "event": [
  3363                                                       {
  3364                                                                "lis ten": "tes t",
  3365                                                                "scr ipt": {
  3366                                                                         "type" : "text/ja vascript",
  3367                                                                         "exec" : [
  3368                                                                                  "//meta  tests",
  3369                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  3370                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  3371                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  3372                                                                                  "",
  3373                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  3374                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  3375                                                                                  "    ",
  3376                                                                                  "    var  schema =  {",
  3377                                                                                  "     \" items\": { ",
  3378                                                                                  "          \"respon se\": \"ar ray\",",
  3379                                                                                  "          \"succes s\": \"boo lean\",",
  3380                                                                                  "          \"messag e\": \"str ing\"",
  3381                                                                                  "         }",
  3382                                                                                  "    };" ,
  3383                                                                                  "    ",
  3384                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  3385                                                                                  "    ",
  3386                                                                                  "    if  (tv4.error ) {",
  3387                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  3388                                                                                  "    }",
  3389                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  3390                                                                                  "    ",
  3391                                                                                  "    //i f success  is true we  have some  response  data",
  3392                                                                                  "    if  (jsonData. success == = true) {" ,
  3393                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  3394                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  3395                                                                                  "      / /tests[\"m essage ===  null\"] =  jsonData. message == = null;",
  3396                                                                                  "      " ,
  3397                                                                                  "      / /single re sult, retu rn just th e object",
  3398                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  3399                                                                                  "         tests[\"r esponse.le ngth === 1  is not an  array\"]  = !Array.i sArray(jso nData.resp onse);",
  3400                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  3401                                                                                  "      }  else if ( jsonData.r esponse) { ",
  3402                                                                                  "           //multi ple result s, return  an array o f objects" ,
  3403                                                                                  "           console .log(typeo f jsonData .response) ;",
  3404                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  3405                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  3406                                                                                  "      } ",
  3407                                                                                  "      " ,
  3408                                                                                  "      t ests[\"res ponse has  lastRefres hed elemen t\"] = (js onData.res ponse.last Refreshed  !== undefi ned) ? tru e : false; ",
  3409                                                                                  "      t ests[\"res ponse has  totalUsers  element\" ] = (jsonD ata.respon se.totalUs ers !== un defined) ?  true : fa lse;",
  3410                                                                                  "      / /tests[\"r esponse ha s numAdmin s element\ "] = (json Data.respo nse.numAdm ins !== un defined) ?  true : fa lse;",
  3411                                                                                  "      t ests[\"res ponse has  numRequest ers elemen t\"] = (js onData.res ponse.numR equesters  !== undefi ned) ? tru e : false; ",
  3412                                                                                  "      t ests[\"res ponse has  numDDMs el ement\"] =  (jsonData .response. numDDMs != = undefine d) ? true  : false;",
  3413                                                                                  "      t ests[\"res ponse has  numDSMs el ement\"] =  (jsonData .response. numDSMs != = undefine d) ? true  : false;",
  3414                                                                                  "      " ,
  3415                                                                                  "      / /console.l og(typeof  jsonData.r esponse.la stRefreshe d);",
  3416                                                                                  "      t ests[\"las tRefreshed  is an int eger\"] =  (jsonData. response.l astRefresh ed !== und efined) ?  typeof jso nData.resp onse.lastR efreshed = == 'number ' : false; ",
  3417                                                                                  "      t ests[\"tot alUsers is  an intege r\"] = (js onData.res ponse.tota lUsers !==  undefined ) ? typeof  jsonData. response.t otalUsers  === 'numbe r' : false ;",
  3418                                                                                  "      / /tests[\"n umAdmins i s an integ er\"] = (j sonData.re sponse.num Admins !==  undefined ) ? typeof  jsonData. response.n umAdmins = == 'number ' : false; ",
  3419                                                                                  "      t ests[\"num Requesters  is an int eger\"] =  (jsonData. response.n umRequeste rs !== und efined) ?  typeof jso nData.resp onse.numRe questers = == 'number ' : false; ",
  3420                                                                                  "      t ests[\"num DDMs is an  integer\" ] = (jsonD ata.respon se.numDDMs  !== undef ined) ? ty peof jsonD ata.respon se.numDDMs  === 'numb er' : fals e;",
  3421                                                                                  "      t ests[\"num DSMs is an  integer\" ] = (jsonD ata.respon se.numDSMs  !== undef ined) ? ty peof jsonD ata.respon se.numDSMs  === 'numb er' : fals e;",
  3422                                                                                  "    } e lse {",
  3423                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  3424                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = json.mes sage === \ "No record s found.\" ;",
  3425                                                                                  "      t ests[\"suc cess === f alse\"] =  json.succe ss === fal se;",
  3426                                                                                  "    }",
  3427                                                                                  "} else  {",
  3428                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  3429                                                                                  "}"
  3430                                                                         ]
  3431                                                                }
  3432                                                       }
  3433                                               ],
  3434                                               "request":  {
  3435                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/use rs/lastRef reshed",
  3436                                                       "m ethod": "G ET",
  3437                                                       "h eader": [
  3438                                                                {
  3439                                                                         "key":  "Content- Type",
  3440                                                                         "value ": "applic ation/json ",
  3441                                                                         "descr iption": " "
  3442                                                                },
  3443                                                                {
  3444                                                                         "key":  "Accept-E ncoding",
  3445                                                                         "value ": "applic ation/json ",
  3446                                                                         "descr iption": " "
  3447                                                                }
  3448                                                       ],
  3449                                                       "b ody": {
  3450                                                                "mod e": "formd ata",
  3451                                                                "for mdata": [
  3452                                                                         {
  3453                                                                                  "key": " email",
  3454                                                                                  "value":  "ge",
  3455                                                                                  "type":  "text"
  3456                                                                         },
  3457                                                                         {
  3458                                                                                  "key": " password",
  3459                                                                                  "value":  "mysupers ecretpassw ord",
  3460                                                                                  "type":  "text"
  3461                                                                         }
  3462                                                                ]
  3463                                                       },
  3464                                                       "d escription ": "retrie ves user c ounts by r ole and LD AP last re fresh date /time"
  3465                                               },
  3466                                               "response" : []
  3467                                      },
  3468                                      {
  3469                                               "name": "U sers - LDA P refresh" ,
  3470                                               "event": [
  3471                                                       {
  3472                                                                "lis ten": "tes t",
  3473                                                                "scr ipt": {
  3474                                                                         "type" : "text/ja vascript",
  3475                                                                         "exec" : [
  3476                                                                                  "//meta  tests",
  3477                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  3478                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  3479                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  3480                                                                                  "",
  3481                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  3482                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  3483                                                                                  "    ",
  3484                                                                                  "    var  schema =  {",
  3485                                                                                  "     \" items\": { ",
  3486                                                                                  "          \"respon se\": \"ar ray\",",
  3487                                                                                  "          \"succes s\": \"boo lean\",",
  3488                                                                                  "          \"messag e\": \"str ing\"",
  3489                                                                                  "         }",
  3490                                                                                  "    };" ,
  3491                                                                                  "    ",
  3492                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  3493                                                                                  "    ",
  3494                                                                                  "    if  (tv4.error ) {",
  3495                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  3496                                                                                  "    }",
  3497                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  3498                                                                                  "    ",
  3499                                                                                  "    //i f success  is true we  have some  response  data",
  3500                                                                                  "    if  (jsonData. success == = true) {" ,
  3501                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  3502                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  3503                                                                                  "      / /tests[\"m essage ===  null\"] =  jsonData. message == = null;",
  3504                                                                                  "      " ,
  3505                                                                                  "      / /single re sult, retu rn just th e object",
  3506                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  3507                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  3508                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  3509                                                                                  "      }  else if ( jsonData.r esponse) { ",
  3510                                                                                  "           //multi ple result s, return  an array o f objects" ,
  3511                                                                                  "           console .log(typeo f jsonData .response) ;",
  3512                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  3513                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  3514                                                                                  "      } ",
  3515                                                                                  "      " ,
  3516                                                                                  "      t ests[\"res ponse has  lastRefres hed elemen t\"] = (js onData.res ponse.last Refreshed  !== undefi ned) ? tru e : false; ",
  3517                                                                                  "      t ests[\"res ponse has  totalUsers  element\" ] = (jsonD ata.respon se.totalUs ers !== un defined) ?  true : fa lse;",
  3518                                                                                  "      / /tests[\"r esponse ha s numAdmin s element\ "] = (json Data.respo nse.numAdm ins !== un defined) ?  true : fa lse;",
  3519                                                                                  "      t ests[\"res ponse has  numRequest ers elemen t\"] = (js onData.res ponse.numR equesters  !== undefi ned) ? tru e : false; ",
  3520                                                                                  "      t ests[\"res ponse has  numDDMs el ement\"] =  (jsonData .response. numDDMs != = undefine d) ? true  : false;",
  3521                                                                                  "      t ests[\"res ponse has  numDSMs el ement\"] =  (jsonData .response. numDSMs != = undefine d) ? true  : false;",
  3522                                                                                  "      " ,
  3523                                                                                  "      / /console.l og(typeof  jsonData.r esponse.la stRefreshe d);",
  3524                                                                                  "      t ests[\"las tRefreshed  is an int eger\"] =  (jsonData. response.l astRefresh ed !== und efined) ?  typeof jso nData.resp onse.lastR efreshed = == 'number ' : false; ",
  3525                                                                                  "      t ests[\"tot alUsers is  an intege r\"] = (js onData.res ponse.tota lUsers !==  undefined ) ? typeof  jsonData. response.t otalUsers  === 'numbe r' : false ;",
  3526                                                                                  "      / /tests[\"n umAdmins i s an integ er\"] = (j sonData.re sponse.num Admins !==  undefined ) ? typeof  jsonData. response.n umAdmins = == 'number ' : false; ",
  3527                                                                                  "      t ests[\"num Requesters  is an int eger\"] =  (jsonData. response.n umRequeste rs !== und efined) ?  typeof jso nData.resp onse.numRe questers = == 'number ' : false; ",
  3528                                                                                  "      t ests[\"num DDMs is an  integer\" ] = (jsonD ata.respon se.numDDMs  !== undef ined) ? ty peof jsonD ata.respon se.numDDMs  === 'numb er' : fals e;",
  3529                                                                                  "      t ests[\"num DSMs is an  integer\" ] = (jsonD ata.respon se.numDSMs  !== undef ined) ? ty peof jsonD ata.respon se.numDSMs  === 'numb er' : fals e;",
  3530                                                                                  "    } e lse {",
  3531                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  3532                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = json.mes sage === \ "No record s found.\" ;",
  3533                                                                                  "      t ests[\"suc cess === f alse\"] =  json.succe ss === fal se;",
  3534                                                                                  "    }",
  3535                                                                                  "} else  {",
  3536                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  3537                                                                                  "}"
  3538                                                                         ]
  3539                                                                }
  3540                                                       }
  3541                                               ],
  3542                                               "request":  {
  3543                                                        "url": "{{ genisis2.s ervice.url }}/Genisis 2Services/ services/u sers/ldapR efresh/ DN S      D N S ",
  3544                                                       "m ethod": "G ET",
  3545                                                       "h eader": [
  3546                                                                {
  3547                                                                         "key":  "Content- Type",
  3548                                                                         "value ": "applic ation/json ",
  3549                                                                         "descr iption": " "
  3550                                                                },
  3551                                                                {
  3552                                                                         "key":  "Accept-E ncoding",
  3553                                                                         "value ": "applic ation/json ",
  3554                                                                         "descr iption": " "
  3555                                                                }
  3556                                                       ],
  3557                                                       "b ody": {
  3558                                                                "mod e": "formd ata",
  3559                                                                "for mdata": [
  3560                                                                         {
  3561                                                                                  "key": " email",
  3562                                                                                  "value":  "ge",
  3563                                                                                  "type":  "text"
  3564                                                                         },
  3565                                                                         {
  3566                                                                                  "key": " password",
  3567                                                                                  "value":  "mysupers ecretpassw ord",
  3568                                                                                  "type":  "text"
  3569                                                                         }
  3570                                                                ]
  3571                                                       },
  3572                                                       "d escription ": "refres hes Genisi s2 user da ta with VA  LDAP user  data"
  3573                                               },
  3574                                               "response" : []
  3575                                      }
  3576                             ]
  3577                    },
  3578                    {
  3579                             "name" : "misc",
  3580                             "descr iption": " ",
  3581                             "item" : [
  3582                                      {
  3583                                               "name": "G enisis API  Version",
  3584                                               "event": [
  3585                                                       {
  3586                                                                "lis ten": "tes t",
  3587                                                                "scr ipt": {
  3588                                                                         "type" : "text/ja vascript",
  3589                                                                         "exec" : [
  3590                                                                                  "//meta  tests",
  3591                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  3592                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  3593                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  3594                                                                                  "",
  3595                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  3596                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  3597                                                                                  "    ",
  3598                                                                                  "    var  schema =  {",
  3599                                                                                  "     \" items\": { ",
  3600                                                                                  "          \"respon se\": \"ar ray\",",
  3601                                                                                  "          \"succes s\": \"boo lean\",",
  3602                                                                                  "          \"messag e\": \"str ing\"",
  3603                                                                                  "         }",
  3604                                                                                  "    };" ,
  3605                                                                                  "    ",
  3606                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  3607                                                                                  "    ",
  3608                                                                                  "    if  (tv4.error ) {",
  3609                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  3610                                                                                  "    }",
  3611                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  3612                                                                                  "    ",
  3613                                                                                  "    tes ts[\"succe ss === tru e\"] = (js onData.suc cess !== u ndefined)  ? jsonData .success = == true :  false;",
  3614                                                                                  "    ",
  3615                                                                                  "    //i f success  is true we  have some  response  data",
  3616                                                                                  "    if  (jsonData. success == = true) {" ,
  3617                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  3618                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  3619                                                                                  "    }",
  3620                                                                                  "} else  {",
  3621                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  3622                                                                                  "}"
  3623                                                                         ]
  3624                                                                }
  3625                                                       }
  3626                                               ],
  3627                                               "request":  {
  3628                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/api version",
  3629                                                       "m ethod": "G ET",
  3630                                                       "h eader": [
  3631                                                                {
  3632                                                                         "key":  "Content- Type",
  3633                                                                         "value ": "applic ation/json ",
  3634                                                                         "descr iption": " "
  3635                                                                },
  3636                                                                {
  3637                                                                         "key":  "Accept-E ncoding",
  3638                                                                         "value ": "applic ation/json ",
  3639                                                                         "descr iption": " "
  3640                                                                }
  3641                                                       ],
  3642                                                       "b ody": {
  3643                                                                "mod e": "formd ata",
  3644                                                                "for mdata": [
  3645                                                                         {
  3646                                                                                  "key": " email",
  3647                                                                                  "value":  "ge",
  3648                                                                                  "type":  "text"
  3649                                                                         },
  3650                                                                         {
  3651                                                                                  "key": " password",
  3652                                                                                  "value":  "mysupers ecretpassw ord",
  3653                                                                                  "type":  "text"
  3654                                                                         }
  3655                                                                ]
  3656                                                       },
  3657                                                       "d escription ": "retrie ve all fil e attachme nts for th is request "
  3658                                               },
  3659                                               "response" : []
  3660                                      },
  3661                                      {
  3662                                               "name": "A ll Request  Types",
  3663                                               "event": [
  3664                                                       {
  3665                                                                "lis ten": "tes t",
  3666                                                                "scr ipt": {
  3667                                                                         "type" : "text/ja vascript",
  3668                                                                         "exec" : [
  3669                                                                                  "//meta  tests",
  3670                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  3671                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  3672                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  3673                                                                                  "",
  3674                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  3675                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  3676                                                                                  "    ",
  3677                                                                                  "    var  schema =  {",
  3678                                                                                  "     \" items\": { ",
  3679                                                                                  "          \"respon se\": \"ar ray\",",
  3680                                                                                  "          \"succes s\": \"boo lean\",",
  3681                                                                                  "          \"messag e\": \"str ing\"",
  3682                                                                                  "         }",
  3683                                                                                  "    };" ,
  3684                                                                                  "    ",
  3685                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  3686                                                                                  "    ",
  3687                                                                                  "    if  (tv4.error ) {",
  3688                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  3689                                                                                  "    }",
  3690                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  3691                                                                                  "    ",
  3692                                                                                  "    //i f success  is true we  have some  response  data",
  3693                                                                                  "    if  (jsonData. success == = true) {" ,
  3694                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  3695                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  3696                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  3697                                                                                  "      " ,
  3698                                                                                  "      / /single re sult, retu rn just th e object",
  3699                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  3700                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  3701                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  3702                                                                                  "      }  else if ( jsonData.r esponse) { ",
  3703                                                                                  "           //multi ple result s, return  an array o f objects" ,
  3704                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  3705                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  3706                                                                                  "      } ",
  3707                                                                                  "    } e lse {",
  3708                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  3709                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  3710                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  3711                                                                                  "    }",
  3712                                                                                  "} else  {",
  3713                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  3714                                                                                  "}"
  3715                                                                         ]
  3716                                                                }
  3717                                                       }
  3718                                               ],
  3719                                               "request":  {
  3720                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uestTypes" ,
  3721                                                       "m ethod": "G ET",
  3722                                                       "h eader": [
  3723                                                                {
  3724                                                                         "key":  "Content- Type",
  3725                                                                         "value ": "applic ation/json ",
  3726                                                                         "descr iption": " "
  3727                                                                },
  3728                                                                {
  3729                                                                         "key":  "Accept-E ncoding",
  3730                                                                         "value ": "applic ation/json ",
  3731                                                                         "descr iption": " "
  3732                                                                }
  3733                                                       ],
  3734                                                       "b ody": {
  3735                                                                "mod e": "formd ata",
  3736                                                                "for mdata": [
  3737                                                                         {
  3738                                                                                  "key": " email",
  3739                                                                                  "value":  "ge",
  3740                                                                                  "type":  "text"
  3741                                                                         },
  3742                                                                         {
  3743                                                                                  "key": " password",
  3744                                                                                  "value":  "mysupers ecretpassw ord",
  3745                                                                                  "type":  "text"
  3746                                                                         }
  3747                                                                ]
  3748                                                       },
  3749                                                       "d escription ": "retrie ve all fil e attachme nts for th is request "
  3750                                               },
  3751                                               "response" : []
  3752                                      },
  3753                                      {
  3754                                               "name": "A ll Data So urces",
  3755                                               "event": [
  3756                                                       {
  3757                                                                "lis ten": "tes t",
  3758                                                                "scr ipt": {
  3759                                                                         "type" : "text/ja vascript",
  3760                                                                         "exec" : [
  3761                                                                                  "//meta  tests",
  3762                                                                                  "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;",
  3763                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  3764                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  3765                                                                                  "",
  3766                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  3767                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  3768                                                                                  "    ",
  3769                                                                                  "    var  schema =  {",
  3770                                                                                  "     \" items\": { ",
  3771                                                                                  "          \"respon se\": \"ar ray\",",
  3772                                                                                  "          \"succes s\": \"boo lean\",",
  3773                                                                                  "          \"messag e\": \"str ing\"",
  3774                                                                                  "         }",
  3775                                                                                  "    };" ,
  3776                                                                                  "    ",
  3777                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  3778                                                                                  "    ",
  3779                                                                                  "    if  (tv4.error ) {",
  3780                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  3781                                                                                  "    }",
  3782                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  3783                                                                                  "    ",
  3784                                                                                  "    //i f success  is true we  have some  response  data",
  3785                                                                                  "    if  (jsonData. success == = true) {" ,
  3786                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  3787                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  3788                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  3789                                                                                  "      " ,
  3790                                                                                  "      / /single re sult, retu rn just th e object",
  3791                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  3792                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  3793                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  3794                                                                                  "      }  else if ( jsonData.r esponse) { ",
  3795                                                                                  "           //multi ple result s, return  an array o f objects" ,
  3796                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  3797                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  3798                                                                                  "      } ",
  3799                                                                                  "    } e lse {",
  3800                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  3801                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  3802                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  3803                                                                                  "    }",
  3804                                                                                  "} else  {",
  3805                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  3806                                                                                  "}"
  3807                                                                         ]
  3808                                                                }
  3809                                                       }
  3810                                               ],
  3811                                               "request":  {
  3812                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/dat asources",
  3813                                                       "m ethod": "G ET",
  3814                                                       "h eader": [
  3815                                                                {
  3816                                                                         "key":  "Content- Type",
  3817                                                                         "value ": "applic ation/json ",
  3818                                                                         "descr iption": " "
  3819                                                                },
  3820                                                                {
  3821                                                                         "key":  "Accept-E ncoding",
  3822                                                                         "value ": "applic ation/json ",
  3823                                                                         "descr iption": " "
  3824                                                                }
  3825                                                       ],
  3826                                                       "b ody": {
  3827                                                                "mod e": "formd ata",
  3828                                                                "for mdata": [
  3829                                                                         {
  3830                                                                                  "key": " email",
  3831                                                                                  "value":  "ge",
  3832                                                                                  "type":  "text"
  3833                                                                         },
  3834                                                                         {
  3835                                                                                  "key": " password",
  3836                                                                                  "value":  "mysupers ecretpassw ord",
  3837                                                                                  "type":  "text"
  3838                                                                         }
  3839                                                                ]
  3840                                                       },
  3841                                                       "d escription ": "retrie ve all fil e attachme nts for th is request "
  3842                                               },
  3843                                               "response" : []
  3844                                      },
  3845                                      {
  3846                                               "name": "C opytable D omains",
  3847                                               "event": [
  3848                                                       {
  3849                                                                "lis ten": "tes t",
  3850                                                                "scr ipt": {
  3851                                                                         "type" : "text/ja vascript",
  3852                                                                         "exec" : [
  3853                                                                                  "//meta  tests",
  3854                                                                                  "/*tests [\"Status  code is 20 0\"] = res ponseCode. code === 2 00;",
  3855                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  3856                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  3857                                                                                  "",
  3858                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  3859                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  3860                                                                                  "    ",
  3861                                                                                  "    var  schema =  {",
  3862                                                                                  "     \" items\": { ",
  3863                                                                                  "          \"respon se\": \"ar ray\",",
  3864                                                                                  "          \"succes s\": \"boo lean\",",
  3865                                                                                  "          \"messag e\": \"str ing\"",
  3866                                                                                  "         }",
  3867                                                                                  "    };" ,
  3868                                                                                  "    ",
  3869                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  3870                                                                                  "    ",
  3871                                                                                  "    if  (tv4.error ) {",
  3872                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  3873                                                                                  "    }",
  3874                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  3875                                                                                  "    ",
  3876                                                                                  "    //i f success  is true we  have some  response  data",
  3877                                                                                  "    if  (jsonData. success == = true) {" ,
  3878                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  3879                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  3880                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  3881                                                                                  "      " ,
  3882                                                                                  "      / /single re sult, retu rn just th e object",
  3883                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  3884                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  3885                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  3886                                                                                  "      }  else if ( jsonData.r esponse) { ",
  3887                                                                                  "           //multi ple result s, return  an array o f objects" ,
  3888                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  3889                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  3890                                                                                  "      } ",
  3891                                                                                  "    } e lse {",
  3892                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  3893                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  3894                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  3895                                                                                  "    }",
  3896                                                                                  "} else  {",
  3897                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  3898                                                                                  "}*/"
  3899                                                                         ]
  3900                                                                }
  3901                                                       }
  3902                                               ],
  3903                                               "request":  {
  3904                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/cop ytable/dom ains",
  3905                                                       "m ethod": "G ET",
  3906                                                       "h eader": [
  3907                                                                {
  3908                                                                         "key":  "Content- Type",
  3909                                                                         "value ": "applic ation/json ",
  3910                                                                         "descr iption": " "
  3911                                                                },
  3912                                                                {
  3913                                                                         "key":  "Accept-E ncoding",
  3914                                                                         "value ": "applic ation/json ",
  3915                                                                         "descr iption": " "
  3916                                                                }
  3917                                                       ],
  3918                                                       "b ody": {
  3919                                                                "mod e": "formd ata",
  3920                                                                "for mdata": [
  3921                                                                         {
  3922                                                                                  "key": " email",
  3923                                                                                  "value":  "ge",
  3924                                                                                  "type":  "text"
  3925                                                                         },
  3926                                                                         {
  3927                                                                                  "key": " password",
  3928                                                                                  "value":  "mysupers ecretpassw ord",
  3929                                                                                  "type":  "text"
  3930                                                                         }
  3931                                                                ]
  3932                                                       },
  3933                                                       "d escription ": "retrie ve all fil e attachme nts for th is request "
  3934                                               },
  3935                                               "response" : []
  3936                                      },
  3937                                      {
  3938                                               "name": "C opytable D omains cop y",
  3939                                               "event": [
  3940                                                       {
  3941                                                                "lis ten": "tes t",
  3942                                                                "scr ipt": {
  3943                                                                         "type" : "text/ja vascript",
  3944                                                                         "exec" : [
  3945                                                                                  "//meta  tests",
  3946                                                                                  "/*tests [\"Status  code is 20 0\"] = res ponseCode. code === 2 00;",
  3947                                                                                  "tests[\ "Response  time is le ss than 2s \"] = resp onseTime <  2000;",
  3948                                                                                  "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ",
  3949                                                                                  "",
  3950                                                                                  "//don't  run these  json test s if we do n't get js on back :( ",
  3951                                                                                  "if (pos tman.getRe sponseHead er(\"Conte nt-Type\")  === 'appl ication/js on;charset =UTF-8') { ",
  3952                                                                                  "    ",
  3953                                                                                  "    var  schema =  {",
  3954                                                                                  "     \" items\": { ",
  3955                                                                                  "          \"respon se\": \"ar ray\",",
  3956                                                                                  "          \"succes s\": \"boo lean\",",
  3957                                                                                  "          \"messag e\": \"str ing\"",
  3958                                                                                  "         }",
  3959                                                                                  "    };" ,
  3960                                                                                  "    ",
  3961                                                                                  "    tes ts[\"Valid  JSON form at\"] = tv 4.validate (jsonData,  schema);" ,
  3962                                                                                  "    ",
  3963                                                                                  "    if  (tv4.error ) {",
  3964                                                                                  "         console.l og(\"Valid ation fail ed: \", tv 4.error);" ,
  3965                                                                                  "    }",
  3966                                                                                  "    var  jsonData  = JSON.par se(respons eBody);",
  3967                                                                                  "    ",
  3968                                                                                  "    //i f success  is true we  have some  response  data",
  3969                                                                                  "    if  (jsonData. success == = true) {" ,
  3970                                                                                  "      t ests[\"suc cess === t rue\"] = j sonData.su ccess ===  true;",
  3971                                                                                  "      t ests[\"res ponse.leng th > 0\"]  = (jsonDat a.response ) ? jsonDa ta.respons e !== null  : false;" ,
  3972                                                                                  "      t ests[\"mes sage === n ull\"] = j sonData.me ssage ===  null;",
  3973                                                                                  "      " ,
  3974                                                                                  "      / /single re sult, retu rn just th e object",
  3975                                                                                  "      i f (jsonDat a.response  && jsonDa ta.respons e.length = == undefin ed) {",
  3976                                                                                  "          tests[\" response.l ength ===  1 is not a n array\"]  = !Array. isArray(js onData.res ponse);",
  3977                                                                                  "         tests[\"r esponse.le ngth === 1  returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';",
  3978                                                                                  "      }  else if ( jsonData.r esponse) { ",
  3979                                                                                  "           //multi ple result s, return  an array o f objects" ,
  3980                                                                                  "           tests[\ "response. length > 1  - returns  array\"]  = Array.is Array(json Data.respo nse);",
  3981                                                                                  "           tests[\ "response. length > 1  - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';",
  3982                                                                                  "      } ",
  3983                                                                                  "    } e lse {",
  3984                                                                                  "      t ests[\"res ponse ===  null\"] =  jsonData.r esponse == = null;",
  3985                                                                                  "      t ests[\"mes sage === N o records  found.\"]  = jsonData .message = == \"No re cords foun d.\";",
  3986                                                                                  "      t ests[\"suc cess === f alse\"] =  jsonData.s uccess ===  false;",
  3987                                                                                  "    }",
  3988                                                                                  "} else  {",
  3989                                                                                  "    tes ts[\"Inval id API res ponse\"] =  false;",
  3990                                                                                  "}*/"
  3991                                                                         ]
  3992                                                                }
  3993                                                       }
  3994                                               ],
  3995                                               "request":  {
  3996                                                       "u rl": "{{ge nisis2.ser vice.url}} /Genisis2S ervices/se rvices/req uests/1/co pytable",
  3997                                                       "m ethod": "P OST",
  3998                                                       "h eader": [
  3999                                                                {
  4000                                                                         "key":  "Content- Type",
  4001                                                                         "value ": "applic ation/json ",
  4002                                                                         "descr iption": " "
  4003                                                                },
  4004                                                                {
  4005                                                                         "key":  "Accept-E ncoding",
  4006                                                                         "value ": "applic ation/json ",
  4007                                                                         "descr iption": " "
  4008                                                                }
  4009                                                       ],
  4010                                                       "b ody": {
  4011                                                                "mod e": "raw",
  4012                                                                 "raw": "{\ r\n\t\"des tinationDB Name\": \" GENISISDAT ADEST\",\r \n\t\"sour ceDBServer Name\": \" IP           \",\r\n\t\ "destinati onDBServer Name\": \" IP           \",\r\n\t\ "sUsername \": \"data _ops\",\r\ n\t\"dUser name\": \" data_ops\" ,\r\n\t\"s ourceDBNam e\": \"GEN ISISDATASO URCE\",\r\ n\t\"sourc eSchemaNam e\": \"dfl t schema\" ,\r\n\t\"t ableName\" : \"vinci  Table1\",\ r\n\t\"des tinationSc hemaName\" : \"dbo sc hame\",\r\ n\t\"creat edBy\": \" genisisdat amgr2@gmai l.com\"\r\ n}"
  4013                                                       },
  4014                                                       "d escription ": "retrie ve all fil e attachme nts for th is request "
  4015                                               },
  4016                                               "response" : []
  4017                                      }
  4018                             ]
  4019                    },
  4020                    {
  4021                             "name" : "Request s - Create  copy",
  4022                             "event ": [
  4023                                      {
  4024                                               "listen":  "test",
  4025                                               "script":  {
  4026                                                       "t ype": "tex t/javascri pt",
  4027                                                       "e xec": [
  4028                                                                "//m eta tests" ,
  4029                                                                "tes ts[\"Statu s code is  200\"] = r esponseCod e.code ===  200;",
  4030                                                                "tes ts[\"Respo nse time i s less tha n 2s\"] =  responseTi me < 2000; ",
  4031                                                                "tes ts[\"Conte nt-Type is  applicati on/json\"]  = postman .getRespon seHeader(\ "Content-T ype\") ===  'applicat ion/json;c harset=UTF -8';",
  4032                                                                "",
  4033                                                                "//d on't run t hese json  tests if w e don't ge t json bac k :(",
  4034                                                                "if  (postman.g etResponse Header(\"C ontent-Typ e\") === ' applicatio n/json;cha rset=UTF-8 ') {",
  4035                                                                "     ",
  4036                                                                "     var schem a = {",
  4037                                                                "      \"items\ ": {",
  4038                                                                "          \"re sponse\":  \"array\", ",
  4039                                                                "          \"su ccess\": \ "boolean\" ,",
  4040                                                                "          \"me ssage\": \ "string\"" ,
  4041                                                                "         }",
  4042                                                                "     };",
  4043                                                                "     ",
  4044                                                                "     tests[\"V alid JSON  format\"]  = tv4.vali date(jsonD ata, schem a);",
  4045                                                                "     ",
  4046                                                                "     if (tv4.e rror) {",
  4047                                                                "         conso le.log(\"V alidation  failed: \" , tv4.erro r);",
  4048                                                                "     }",
  4049                                                                "     var jsonD ata = JSON .parse(res ponseBody) ;",
  4050                                                                "     ",
  4051                                                                "     //if succ ess is tru e we have  some respo nse data",
  4052                                                                "     if (jsonD ata.succes s === true ) {",
  4053                                                                "       tests[\ "success = == true\"]  = jsonDat a.success  === true;" ,
  4054                                                                "       tests[\ "response. length > 0 \"] = (jso nData.resp onse) ? js onData.res ponse !==  null : fal se;",
  4055                                                                "       tests[\ "message = == null\"]  = jsonDat a.message  === null;" ,
  4056                                                                "       ",
  4057                                                                "       //singl e result,  return jus t the obje ct",
  4058                                                                "       if (jso nData.resp onse && js onData.res ponse.leng th === und efined) {" ,
  4059                                                                "          test s[\"respon se.length  === 1 is n ot an arra y\"] = !Ar ray.isArra y(jsonData .response) ;",
  4060                                                                "         tests [\"respons e.length = == 1 retur ns single  object\"]  = typeof j sonData.re sponse ===  'object'; ",
  4061                                                                "       } else  if (jsonDa ta.respons e) {",
  4062                                                                "           //m ultiple re sults, ret urn an arr ay of obje cts",
  4063                                                                "           tes ts[\"respo nse.length  > 1 - ret urns array \"] = Arra y.isArray( jsonData.r esponse);" ,
  4064                                                                "           tes ts[\"respo nse.length  > 1 - arr ay of obje cts\"] = t ypeof json Data.respo nse[0] ===  'object'; ",
  4065                                                                "       }",
  4066                                                                "     } else {" ,
  4067                                                                "       tests[\ "response  === null\" ] = jsonDa ta.respons e === null ;",
  4068                                                                "       tests[\ "message = == No reco rds found. \"] = json Data.messa ge === \"N o records  found.\";" ,
  4069                                                                "       tests[\ "success = == false\" ] = jsonDa ta.success  === false ;",
  4070                                                                "     }",
  4071                                                                "} e lse {",
  4072                                                                "     tests[\"I nvalid API  response\ "] = false ;",
  4073                                                                "}"
  4074                                                       ]
  4075                                               }
  4076                                      }
  4077                             ],
  4078                             "reque st": {
  4079                                      "url": " {{genisis2 .service.u rl}}/Genis is2Service s/services /requests" ,
  4080                                      "method" : "POST",
  4081                                      "header" : [
  4082                                               {
  4083                                                       "k ey": "Cont ent-Type",
  4084                                                       "v alue": "ap plication/ json",
  4085                                                       "d escription ": ""
  4086                                               },
  4087                                               {
  4088                                                       "k ey": "Acce pt-Encodin g",
  4089                                                       "v alue": "ap plication/ json",
  4090                                                       "d escription ": ""
  4091                                               }
  4092                                      ],
  4093                                      "body":  {
  4094                                               "mode": "r aw",
  4095                                               "raw": "{\ n    \"tit le\": \"Po stman Samp le Request \",\n    \ "descripti on\": \"Th is is a sa mple new r equest for  demo purp oses\",\n     \"reque stTypeId\" : \"1\",\n     \"sour ceId\": \" 2\",\n     \"studyApp rovalId\":  \"177\",\ n    \"cre atedBy\":  \"genisisr esearcher1 @gmail.com \",\n    \ "comments\ ": \"local  test\"\n} \n\n"
  4096                                      },
  4097                                      "descrip tion": "cr eate a new  request"
  4098                             },
  4099                             "respo nse": []
  4100                    }
  4101           ]
  4102   }