Produced by Araxis Merge on 10/27/2017 2:19:27 PM Central 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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | Source Code.zip\Source Code\Client | postman_tests.json | Fri Oct 27 12:17:54 2017 UTC |
| 2 | Source Code.zip\Source Code\Client | postman_tests.json | Fri Oct 27 18:34:26 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 16 | 7460 |
| Changed | 15 | 30 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| 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 |
No regular expressions were active.
| 1 | { | |
| 2 | "v ariables": [], | |
| 3 | "i nfo": { | |
| 4 | "nam e": "Genis is API Upd ated", | |
| 5 | "_po stman_id": "3733ae38 -6d99-895e -1e65-ee02 4f7a425c", | |
| 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" : "Request s", | |
| 12 | "descr iption": " ", | |
| 13 | "item" : [ | |
| 14 | { | |
| 15 | "name": "R equests - All", | |
| 16 | "event": [ | |
| 17 | { | |
| 18 | "lis ten": "tes t", | |
| 19 | "scr ipt": { | |
| 20 | "type" : "text/ja vascript", | |
| 21 | "exec" : [ | |
| 22 | "//meta tests", | |
| 23 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 24 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 25 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 26 | "", | |
| 27 | "//don't run these json test s if we do n't get js on back :( ", | |
| 28 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 29 | " ", | |
| 30 | " var schema = {", | |
| 31 | " \" items\": { ", | |
| 32 | " \"respon se\": \"ar ray\",", | |
| 33 | " \"succes s\": \"boo lean\",", | |
| 34 | " \"messag e\": \"str ing\"", | |
| 35 | " }", | |
| 36 | " };" , | |
| 37 | " ", | |
| 38 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 39 | " ", | |
| 40 | " if (tv4.error ) {", | |
| 41 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 42 | " }", | |
| 43 | " ", | |
| 44 | " var jsonData = JSON.par se(respons eBody);", | |
| 45 | " ", | |
| 46 | " //i f success is true we have some response data", | |
| 47 | " if (jsonData. success == = true) {" , | |
| 48 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 49 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 50 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 51 | " " , | |
| 52 | " / /single re sult, retu rn just th e object", | |
| 53 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 54 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 55 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 56 | " } else if ( jsonData.r esponse) { ", | |
| 57 | " //multi ple result s, return an array o f objects" , | |
| 58 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 59 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 60 | " } ", | |
| 61 | " } e lse {", | |
| 62 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 63 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 64 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 65 | " }", | |
| 66 | " ", | |
| 67 | " //m ake sure t his is an array sinc e it can r eturn just one recor d as an ob ject", | |
| 68 | " if (!Array.is Array(json Data.respo nse)) {", | |
| 69 | " jsonData. response = [jsonData .response] ; ", | |
| 70 | " }", | |
| 71 | " ", | |
| 72 | " //t ests speci fic to thi s API endp oint", | |
| 73 | " for (var i in jsonData. response) {", | |
| 74 | " if (i > 1 0) {", | |
| 75 | " break ;", | |
| 76 | " }", | |
| 77 | " var reque st = jsonD ata.respon se[i];", | |
| 78 | " console.l og(request );", | |
| 79 | " tests[\"r equest \" + i + \" h as an id f ield\"] = (request.i d !== unde fined) ? t rue : fals e;", | |
| 80 | " tests[\"r equest \" + i + \" i d is an in teger\"] = (request. id !== und efined) ? typeof req uest.id == = 'number' : false;" , | |
| 81 | " ", | |
| 82 | " tests[\"r equest \" + i + \" h as a title field\"] = (request .title !== undefined ) ? true : false;", | |
| 83 | " tests[\"r equest \" + i + \" t itle is a string\"] = (request .title !== undefined ) ? typeof request.t itle === ' string' : false;", | |
| 84 | " ", | |
| 85 | " tests[\"r equest \" + i + \" has a desc ription fi eld\"] = ( request.de scription !== undefi ned) ? tru e : false; ", | |
| 86 | " 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;", | |
| 87 | " ", | |
| 88 | " tests[\"r equest \" + i + \" h as a statu sDescripti on field\" ] = (reque st.statusD escription !== undef ined) ? tr ue : false ;", | |
| 89 | " 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;", | |
| 90 | " ", | |
| 91 | " var valid StatusDesc riptions = ['Draft', 'Submitte d', 'Appro ved', 'Sen t', 'Retur ned', 'Den ied'];", | |
| 92 | " 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;", | |
| 93 | " ", | |
| 94 | " tests[\"r equest \" + i + \" h as a sourc e field\"] = (reques t.source ! == undefin ed) ? true : false;" , | |
| 95 | " tests[\"r equest \" + i + \" s ource is a n integer\ "] = (requ est.source !== undef ined) ? ty peof reque st.source === 'numbe r' : false ;", | |
| 96 | " ", | |
| 97 | " tests[\"r equest \" + i + \" h as a study Approval f ield\"] = (request.s tudyApprov al !== und efined) ? true : fal se;", | |
| 98 | " tests[\"r equest \" + i + \" s tudyApprov al is a nu mber\"] = (request.s tudyApprov al !== und efined) ? typeof jso nData.resp onse[0].st udyApprova l === 'num ber' : fal se;", | |
| 99 | " ", | |
| 100 | " tests[\"r equest \" + i + \" h as a creat edOn field \"] = (req uest.creat edOn !== u ndefined) ? true : f alse;", | |
| 101 | " tests[\"r equest \" + i + \" c reatedOn i s a number \"] = (req uest.creat edOn !== u ndefined) ? typeof r equest.cre atedOn === 'number' : false;", | |
| 102 | " ", | |
| 103 | " tests[\"r equest \" + i + \" h as a creat edBy field \"] = (req uest.creat edBy !== u ndefined) ? true : f alse;", | |
| 104 | " tests[\"r equest \" + i + \" c reatedBy i s a string \"] = (req uest.creat edBy !== u ndefined) ? typeof r equest.cre atedBy === 'string' : false;", | |
| 105 | " ", | |
| 106 | " tests[\"r equest \" + i + \" h as a notif y field\"] = (reques t.notify ! == undefin ed) ? true : false;" , | |
| 107 | " tests[\"r equest \" + i + \" n otify is a boolean\" ] = (reque st.notify !== undefi ned) ? typ eof reques t.notify = == 'boolea n' : false ;", | |
| 108 | " ", | |
| 109 | " tests[\"r equest \" + i + \" h as a type field\"] = (request. type !== u ndefined) ? true : f alse;", | |
| 110 | " tests[\"r equest \" + i + \" t ype is a n umber\"] = (request. type !== u ndefined) ? typeof r equest.typ e === 'num ber' : fal se;", | |
| 111 | " ", | |
| 112 | " tests[\"r equest \" + i + \" h as a reaso n field\"] = (reques t.reason ! == undefin ed) ? true : false;" , | |
| 113 | " tests[\"r equest \" + i + \" r eason is a string\"] = (reques t.reason ! == undefin ed) ? (req uest.reaso n ? typeof request.r eason === 'string' : request.r eason === null) : fa lse;", | |
| 114 | " ", | |
| 115 | " tests[\"r equest \" + i + \" h as an asso ciatedRequ ests field \"] = (req uest.assoc iatedReque sts !== un defined) ? true : fa lse;", | |
| 116 | " tests[\"r equest \" + i + \" a ssociatedR equests is an array\ "] = (requ est.associ atedReques ts !== und efined) ? Array.isAr ray(reques t.associat edRequests ) : false; ", | |
| 117 | " }", | |
| 118 | "} else {", | |
| 119 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 120 | "}" | |
| 121 | ] | |
| 122 | } | |
| 123 | } | |
| 124 | ], | |
| 125 | "request": { | |
| 126 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/request s", | |
| 127 | "m ethod": "G ET", | |
| 128 | "h eader": [ | |
| 129 | { | |
| 130 | "key": "Content- Type", | |
| 131 | "value ": "applic ation/json ", | |
| 132 | "descr iption": " " | |
| 133 | }, | |
| 134 | { | |
| 135 | "key": "Accept-E ncoding", | |
| 136 | "value ": "applic ation/json ", | |
| 137 | "descr iption": " " | |
| 138 | } | |
| 139 | ], | |
| 140 | "b ody": { | |
| 141 | "mod e": "formd ata", | |
| 142 | "for mdata": [ | |
| 143 | { | |
| 144 | "key": " email", | |
| 145 | "value": "ge", | |
| 146 | "type": "text", | |
| 147 | "enabled ": true | |
| 148 | }, | |
| 149 | { | |
| 150 | "key": " password", | |
| 151 | "value": " PW ", | |
| 152 | "type": "text", | |
| 153 | "enabled ": true | |
| 154 | } | |
| 155 | ] | |
| 156 | }, | |
| 157 | "d escription ": "retrie ve all req uest data" | |
| 158 | }, | |
| 159 | "response" : [] | |
| 160 | }, | |
| 161 | { | |
| 162 | "name": "R equests - By ID", | |
| 163 | "event": [ | |
| 164 | { | |
| 165 | "lis ten": "tes t", | |
| 166 | "scr ipt": { | |
| 167 | "type" : "text/ja vascript", | |
| 168 | "exec" : [ | |
| 169 | "//meta tests", | |
| 170 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 171 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 172 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 173 | "", | |
| 174 | "//don't run these json test s if we do n't get js on back :( ", | |
| 175 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 176 | " ", | |
| 177 | " var schema = {", | |
| 178 | " \" items\": { ", | |
| 179 | " \"respon se\": \"ar ray\",", | |
| 180 | " \"succes s\": \"boo lean\",", | |
| 181 | " \"messag e\": \"str ing\"", | |
| 182 | " }", | |
| 183 | " };" , | |
| 184 | " ", | |
| 185 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 186 | " ", | |
| 187 | " if (tv4.error ) {", | |
| 188 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 189 | " }", | |
| 190 | " ", | |
| 191 | " var jsonData = JSON.par se(respons eBody);", | |
| 192 | " ", | |
| 193 | " //i f success is true we have some response data", | |
| 194 | " if (jsonData. success == = true) {" , | |
| 195 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 196 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 197 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 198 | " " , | |
| 199 | " / /single re sult, retu rn just th e object", | |
| 200 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 201 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 202 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 203 | " } else if ( jsonData.r esponse) { ", | |
| 204 | " //multi ple result s, return an array o f objects" , | |
| 205 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 206 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 207 | " } ", | |
| 208 | " " , | |
| 209 | " / /specific to this en dpoint", | |
| 210 | " t ests[\"req uest has t his ID\"] = (jsonDat a.response && jsonDa ta.respons e.id !== u ndefined) ? jsonData .response. id === 1 : false;", | |
| 211 | " " , | |
| 212 | " } e lse {", | |
| 213 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 214 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 215 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 216 | " }", | |
| 217 | "} else {", | |
| 218 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 219 | "}" | |
| 220 | ] | |
| 221 | } | |
| 222 | } | |
| 223 | ], | |
| 224 | "request": { | |
| 225 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/request s/1", | |
| 226 | "m ethod": "G ET", | |
| 227 | "h eader": [ | |
| 228 | { | |
| 229 | "key": "Content- Type", | |
| 230 | "value ": "applic ation/json ", | |
| 231 | "descr iption": " " | |
| 232 | }, | |
| 233 | { | |
| 234 | "key": "Accept-E ncoding", | |
| 235 | "value ": "applic ation/json ", | |
| 236 | "descr iption": " " | |
| 237 | } | |
| 238 | ], | |
| 239 | "b ody": { | |
| 240 | "mod e": "formd ata", | |
| 241 | "for mdata": [ | |
| 242 | { | |
| 243 | "key": " email", | |
| 244 | "value": "ge", | |
| 245 | "type": "text", | |
| 246 | "enabled ": true | |
| 247 | }, | |
| 248 | { | |
| 249 | "key": " password", | |
| 250 | "value": " PW ", | |
| 251 | "type": "text", | |
| 252 | "enabled ": true | |
| 253 | } | |
| 254 | ] | |
| 255 | }, | |
| 256 | "d escription ": "retrie ve a singl e request by the ID number" | |
| 257 | }, | |
| 258 | "response" : [] | |
| 259 | }, | |
| 260 | { | |
| 261 | "name": "R equests - By User", | |
| 262 | "event": [ | |
| 263 | { | |
| 264 | "lis ten": "tes t", | |
| 265 | "scr ipt": { | |
| 266 | "type" : "text/ja vascript", | |
| 267 | "exec" : [ | |
| 268 | "//meta tests", | |
| 269 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 270 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 271 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 272 | "", | |
| 273 | "//don't run these json test s if we do n't get js on back :( ", | |
| 274 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 275 | " ", | |
| 276 | " var schema = {", | |
| 277 | " \" items\": { ", | |
| 278 | " \"respon se\": \"ar ray\",", | |
| 279 | " \"succes s\": \"boo lean\",", | |
| 280 | " \"messag e\": \"str ing\"", | |
| 281 | " }", | |
| 282 | " };" , | |
| 283 | " ", | |
| 284 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 285 | " ", | |
| 286 | " if (tv4.error ) {", | |
| 287 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 288 | " }", | |
| 289 | " var jsonData = JSON.par se(respons eBody);", | |
| 290 | " ", | |
| 291 | " //i f success is true we have some response data", | |
| 292 | " if (jsonData. success == = true) {" , | |
| 293 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 294 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 295 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 296 | " " , | |
| 297 | " / /single re sult, retu rn just th e object", | |
| 298 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 299 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 300 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 301 | " } else if ( jsonData.r esponse) { ", | |
| 302 | " //multi ple result s, return an array o f objects" , | |
| 303 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 304 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 305 | " } ", | |
| 306 | " " , | |
| 307 | " / /make sure this is a n array si nce it can return ju st one rec ord as an object", | |
| 308 | " i f (!Array. isArray(js onData.res ponse)) {" , | |
| 309 | " jsonData. response = [jsonData .response] ; ", | |
| 310 | " } ", | |
| 311 | " " , | |
| 312 | " / /tests spe cific to t his API ca ll", | |
| 313 | " f or (var i in jsonDat a.response ) {", | |
| 314 | " if (i > 1 0) { break ; }", | |
| 315 | " var reque st = jsonD ata.respon se[i];", | |
| 316 | " tests[\"r equest \" + i + \" c reatedBy = researche r1\"] = re quest.crea tedBy === 'researche r1';", | |
| 317 | " } ", | |
| 318 | " " , | |
| 319 | " } e lse {", | |
| 320 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 321 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 322 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 323 | " }", | |
| 324 | "} else {", | |
| 325 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 326 | "}" | |
| 327 | ] | |
| 328 | } | |
| 329 | } | |
| 330 | ], | |
| 331 | "request": { | |
| 332 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/request s/research er1/create dBy", | |
| 333 | "m ethod": "G ET", | |
| 334 | "h eader": [ | |
| 335 | { | |
| 336 | "key": "Content- Type", | |
| 337 | "value ": "applic ation/json ", | |
| 338 | "descr iption": " " | |
| 339 | }, | |
| 340 | { | |
| 341 | "key": "Accept-E ncoding", | |
| 342 | "value ": "applic ation/json ", | |
| 343 | "descr iption": " " | |
| 344 | } | |
| 345 | ], | |
| 346 | "b ody": { | |
| 347 | "mod e": "formd ata", | |
| 348 | "for mdata": [ | |
| 349 | { | |
| 350 | "key": " email", | |
| 351 | "value": "ge", | |
| 352 | "type": "text", | |
| 353 | "enabled ": true | |
| 354 | }, | |
| 355 | { | |
| 356 | "key": " password", | |
| 357 | "value": " PW ", | |
| 358 | "type": "text", | |
| 359 | "enabled ": true | |
| 360 | } | |
| 361 | ] | |
| 362 | }, | |
| 363 | "d escription ": "retrie ve all req uests by c reated by a specific user" | |
| 364 | }, | |
| 365 | "response" : [] | |
| 366 | }, | |
| 367 | { | |
| 368 | "name": "R equests - By DataMan ager", | |
| 369 | "event": [ | |
| 370 | { | |
| 371 | "lis ten": "tes t", | |
| 372 | "scr ipt": { | |
| 373 | "type" : "text/ja vascript", | |
| 374 | "exec" : [ | |
| 375 | "//meta tests", | |
| 376 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 377 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 378 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 379 | "", | |
| 380 | "//don't run these json test s if we do n't get js on back :( ", | |
| 381 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 382 | " ", | |
| 383 | " var schema = {", | |
| 384 | " \" items\": { ", | |
| 385 | " \"respon se\": \"ar ray\",", | |
| 386 | " \"succes s\": \"boo lean\",", | |
| 387 | " \"messag e\": \"str ing\"", | |
| 388 | " }", | |
| 389 | " };" , | |
| 390 | " ", | |
| 391 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 392 | " ", | |
| 393 | " if (tv4.error ) {", | |
| 394 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 395 | " }", | |
| 396 | " var jsonData = JSON.par se(respons eBody);", | |
| 397 | " ", | |
| 398 | " //i f success is true we have some response data", | |
| 399 | " if (jsonData. success == = true) {" , | |
| 400 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 401 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 402 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 403 | " " , | |
| 404 | " / /single re sult, retu rn just th e object", | |
| 405 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 406 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 407 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 408 | " } else if ( jsonData.r esponse) { ", | |
| 409 | " //multi ple result s, return an array o f objects" , | |
| 410 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 411 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 412 | " } ", | |
| 413 | " } e lse {", | |
| 414 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 415 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 416 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 417 | " }", | |
| 418 | "} else {", | |
| 419 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 420 | "}" | |
| 421 | ] | |
| 422 | } | |
| 423 | } | |
| 424 | ], | |
| 425 | "request": { | |
| 426 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/request s/datamana ger1/dataM anager", | |
| 427 | "m ethod": "G ET", | |
| 428 | "h eader": [ | |
| 429 | { | |
| 430 | "key": "Content- Type", | |
| 431 | "value ": "applic ation/json ", | |
| 432 | "descr iption": " " | |
| 433 | }, | |
| 434 | { | |
| 435 | "key": "Accept-E ncoding", | |
| 436 | "value ": "applic ation/json ", | |
| 437 | "descr iption": " " | |
| 438 | } | |
| 439 | ], | |
| 440 | "b ody": { | |
| 441 | "mod e": "formd ata", | |
| 442 | "for mdata": [ | |
| 443 | { | |
| 444 | "key": " email", | |
| 445 | "value": "ge", | |
| 446 | "type": "text", | |
| 447 | "enabled ": true | |
| 448 | }, | |
| 449 | { | |
| 450 | "key": " password", | |
| 451 | "value": " PW ", | |
| 452 | "type": "text", | |
| 453 | "enabled ": true | |
| 454 | } | |
| 455 | ] | |
| 456 | }, | |
| 457 | "d escription ": "retrie ve all req uests that were crea ted by use rs assigne d to this data manag er" | |
| 458 | }, | |
| 459 | "response" : [] | |
| 460 | }, | |
| 461 | { | |
| 462 | "name": "R equests - By StudyAp proval", | |
| 463 | "event": [ | |
| 464 | { | |
| 465 | "lis ten": "tes t", | |
| 466 | "scr ipt": { | |
| 467 | "type" : "text/ja vascript", | |
| 468 | "exec" : [ | |
| 469 | "//meta tests", | |
| 470 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 471 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 472 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 473 | "", | |
| 474 | "//don't run these json test s if we do n't get js on back :( ", | |
| 475 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 476 | " ", | |
| 477 | " var schema = {", | |
| 478 | " \" items\": { ", | |
| 479 | " \"respon se\": \"ar ray\",", | |
| 480 | " \"succes s\": \"boo lean\",", | |
| 481 | " \"messag e\": \"str ing\"", | |
| 482 | " }", | |
| 483 | " };" , | |
| 484 | " ", | |
| 485 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 486 | " ", | |
| 487 | " if (tv4.error ) {", | |
| 488 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 489 | " }", | |
| 490 | " var jsonData = JSON.par se(respons eBody);", | |
| 491 | " ", | |
| 492 | " //i f success is true we have some response data", | |
| 493 | " if (jsonData. success == = true) {" , | |
| 494 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 495 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 496 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 497 | " " , | |
| 498 | " / /single re sult, retu rn just th e object", | |
| 499 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 500 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 501 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 502 | " } else if ( jsonData.r esponse) { ", | |
| 503 | " //multi ple result s, return an array o f objects" , | |
| 504 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 505 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 506 | " } ", | |
| 507 | " " , | |
| 508 | " / /make sure this is a n array si nce it can return ju st one rec ord as an object", | |
| 509 | " i f (!Array. isArray(js onData.res ponse)) {" , | |
| 510 | " jsonData. response = [jsonData .response] ; ", | |
| 511 | " } ", | |
| 512 | " " , | |
| 513 | " / /tests spe cific to t his API ca ll", | |
| 514 | " f or (var i in jsonDat a.response ) {", | |
| 515 | " if (i > 1 0) { break ; }", | |
| 516 | " var reque st = jsonD ata.respon se[i];", | |
| 517 | " tests[\"r equest \" + i + \" s tudyApprov al = 1\"] = request. studyAppro val === 1; ", | |
| 518 | " } ", | |
| 519 | " " , | |
| 520 | " } e lse {", | |
| 521 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 522 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 523 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 524 | " }", | |
| 525 | "} else {", | |
| 526 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 527 | "}" | |
| 528 | ] | |
| 529 | } | |
| 530 | } | |
| 531 | ], | |
| 532 | "request": { | |
| 533 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/request s/1/studyA pproval", | |
| 534 | "m ethod": "G ET", | |
| 535 | "h eader": [ | |
| 536 | { | |
| 537 | "key": "Content- Type", | |
| 538 | "value ": "applic ation/json ", | |
| 539 | "descr iption": " " | |
| 540 | }, | |
| 541 | { | |
| 542 | "key": "Accept-E ncoding", | |
| 543 | "value ": "applic ation/json ", | |
| 544 | "descr iption": " " | |
| 545 | } | |
| 546 | ], | |
| 547 | "b ody": { | |
| 548 | "mod e": "formd ata", | |
| 549 | "for mdata": [ | |
| 550 | { | |
| 551 | "key": " email", | |
| 552 | "value": "ge", | |
| 553 | "type": "text", | |
| 554 | "enabled ": true | |
| 555 | }, | |
| 556 | { | |
| 557 | "key": " password", | |
| 558 | "value": " PW ", | |
| 559 | "type": "text", | |
| 560 | "enabled ": true | |
| 561 | } | |
| 562 | ] | |
| 563 | }, | |
| 564 | "d escription ": "retrie ve all req uests that have this same stud y approval id" | |
| 565 | }, | |
| 566 | "response" : [] | |
| 567 | }, | |
| 568 | { | |
| 569 | "name": "R equests - By Status = Sent", | |
| 570 | "event": [ | |
| 571 | { | |
| 572 | "lis ten": "tes t", | |
| 573 | "scr ipt": { | |
| 574 | "type" : "text/ja vascript", | |
| 575 | "exec" : [ | |
| 576 | "//meta tests", | |
| 577 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 578 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 579 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 580 | "", | |
| 581 | "//don't run these json test s if we do n't get js on back :( ", | |
| 582 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 583 | " ", | |
| 584 | " var schema = {", | |
| 585 | " \" items\": { ", | |
| 586 | " \"respon se\": \"ar ray\",", | |
| 587 | " \"succes s\": \"boo lean\",", | |
| 588 | " \"messag e\": \"str ing\"", | |
| 589 | " }", | |
| 590 | " };" , | |
| 591 | " ", | |
| 592 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 593 | " ", | |
| 594 | " if (tv4.error ) {", | |
| 595 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 596 | " }", | |
| 597 | " var jsonData = JSON.par se(respons eBody);", | |
| 598 | " ", | |
| 599 | " //i f success is true we have some response data", | |
| 600 | " if (jsonData. success == = true) {" , | |
| 601 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 602 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 603 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 604 | " " , | |
| 605 | " / /single re sult, retu rn just th e object", | |
| 606 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 607 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 608 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 609 | " } else if ( jsonData.r esponse) { ", | |
| 610 | " //multi ple result s, return an array o f objects" , | |
| 611 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 612 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 613 | " } ", | |
| 614 | " " , | |
| 615 | " / /make sure this is a n array si nce it can return ju st one rec ord as an object", | |
| 616 | " i f (!Array. isArray(js onData.res ponse)) {" , | |
| 617 | " jsonData. response = [jsonData .response] ; ", | |
| 618 | " } ", | |
| 619 | " " , | |
| 620 | " / /tests spe cific to t his API ca ll", | |
| 621 | " f or (var i in jsonDat a.response ) {", | |
| 622 | " if (i > 1 0) { break ; }", | |
| 623 | " var reque st = jsonD ata.respon se[i];", | |
| 624 | " tests[\"r equest \" + i + \" s tatusDescr iption = s ent\"] = r equest.sta tusDescrip tion === ' Sent';", | |
| 625 | " } ", | |
| 626 | " " , | |
| 627 | " } e lse {", | |
| 628 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 629 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 630 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 631 | " }", | |
| 632 | "} else {", | |
| 633 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 634 | "}" | |
| 635 | ] | |
| 636 | } | |
| 637 | } | |
| 638 | ], | |
| 639 | "request": { | |
| 640 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/request s/sent/sta tus", | |
| 641 | "m ethod": "G ET", | |
| 642 | "h eader": [ | |
| 643 | { | |
| 644 | "key": "Content- Type", | |
| 645 | "value ": "applic ation/json ", | |
| 646 | "descr iption": " " | |
| 647 | }, | |
| 648 | { | |
| 649 | "key": "Accept-E ncoding", | |
| 650 | "value ": "applic ation/json ", | |
| 651 | "descr iption": " " | |
| 652 | } | |
| 653 | ], | |
| 654 | "b ody": { | |
| 655 | "mod e": "formd ata", | |
| 656 | "for mdata": [ | |
| 657 | { | |
| 658 | "key": " email", | |
| 659 | "value": "ge", | |
| 660 | "type": "text", | |
| 661 | "enabled ": true | |
| 662 | }, | |
| 663 | { | |
| 664 | "key": " password", | |
| 665 | "value": " PW ", | |
| 666 | "type": "text", | |
| 667 | "enabled ": true | |
| 668 | } | |
| 669 | ] | |
| 670 | }, | |
| 671 | "d escription ": "retrie ve all app roved requ ests" | |
| 672 | }, | |
| 673 | "response" : [] | |
| 674 | }, | |
| 675 | { | |
| 676 | "name": "R equests - By Status = Denied", | |
| 677 | "event": [ | |
| 678 | { | |
| 679 | "lis ten": "tes t", | |
| 680 | "scr ipt": { | |
| 681 | "type" : "text/ja vascript", | |
| 682 | "exec" : [ | |
| 683 | "//meta tests", | |
| 684 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 685 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 686 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 687 | "", | |
| 688 | "//don't run these json test s if we do n't get js on back :( ", | |
| 689 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 690 | " ", | |
| 691 | " var schema = {", | |
| 692 | " \" items\": { ", | |
| 693 | " \"respon se\": \"ar ray\",", | |
| 694 | " \"succes s\": \"boo lean\",", | |
| 695 | " \"messag e\": \"str ing\"", | |
| 696 | " }", | |
| 697 | " };" , | |
| 698 | " ", | |
| 699 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 700 | " ", | |
| 701 | " if (tv4.error ) {", | |
| 702 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 703 | " }", | |
| 704 | " var jsonData = JSON.par se(respons eBody);", | |
| 705 | " ", | |
| 706 | " //i f success is true we have some response data", | |
| 707 | " if (jsonData. success == = true) {" , | |
| 708 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 709 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 710 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 711 | " " , | |
| 712 | " / /single re sult, retu rn just th e object", | |
| 713 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 714 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 715 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 716 | " } else if ( jsonData.r esponse) { ", | |
| 717 | " //multi ple result s, return an array o f objects" , | |
| 718 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 719 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 720 | " } ", | |
| 721 | " " , | |
| 722 | " / /make sure this is a n array si nce it can return ju st one rec ord as an object", | |
| 723 | " i f (!Array. isArray(js onData.res ponse)) {" , | |
| 724 | " jsonData. response = [jsonData .response] ; ", | |
| 725 | " } ", | |
| 726 | " " , | |
| 727 | " / /tests spe cific to t his API ca ll", | |
| 728 | " f or (var i in jsonDat a.response ) {", | |
| 729 | " if (i > 1 0) { break ; }", | |
| 730 | " var reque st = jsonD ata.respon se[i];", | |
| 731 | " tests[\"r equest \" + i + \" s tatusDescr iption = d enied\"] = request.s tatusDescr iption === 'Denied'; ", | |
| 732 | " } ", | |
| 733 | " " , | |
| 734 | " } e lse {", | |
| 735 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 736 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 737 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 738 | " }", | |
| 739 | "} else {", | |
| 740 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 741 | "}" | |
| 742 | ] | |
| 743 | } | |
| 744 | } | |
| 745 | ], | |
| 746 | "request": { | |
| 747 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/request s/denied/s tatus", | |
| 748 | "m ethod": "G ET", | |
| 749 | "h eader": [ | |
| 750 | { | |
| 751 | "key": "Content- Type", | |
| 752 | "value ": "applic ation/json ", | |
| 753 | "descr iption": " " | |
| 754 | }, | |
| 755 | { | |
| 756 | "key": "Accept-E ncoding", | |
| 757 | "value ": "applic ation/json ", | |
| 758 | "descr iption": " " | |
| 759 | } | |
| 760 | ], | |
| 761 | "b ody": { | |
| 762 | "mod e": "formd ata", | |
| 763 | "for mdata": [ | |
| 764 | { | |
| 765 | "key": " email", | |
| 766 | "value": "ge", | |
| 767 | "type": "text", | |
| 768 | "enabled ": true | |
| 769 | }, | |
| 770 | { | |
| 771 | "key": " password", | |
| 772 | "value": " PW ", | |
| 773 | "type": "text", | |
| 774 | "enabled ": true | |
| 775 | } | |
| 776 | ] | |
| 777 | }, | |
| 778 | "d escription ": "retrie ve all den ied reques ts" | |
| 779 | }, | |
| 780 | "response" : [] | |
| 781 | }, | |
| 782 | { | |
| 783 | "name": "R equests - By Status = Submitte d", | |
| 784 | "event": [ | |
| 785 | { | |
| 786 | "lis ten": "tes t", | |
| 787 | "scr ipt": { | |
| 788 | "type" : "text/ja vascript", | |
| 789 | "exec" : [ | |
| 790 | "//meta tests", | |
| 791 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 792 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 793 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 794 | "", | |
| 795 | "//don't run these json test s if we do n't get js on back :( ", | |
| 796 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 797 | " ", | |
| 798 | " var schema = {", | |
| 799 | " \" items\": { ", | |
| 800 | " \"respon se\": \"ar ray\",", | |
| 801 | " \"succes s\": \"boo lean\",", | |
| 802 | " \"messag e\": \"str ing\"", | |
| 803 | " }", | |
| 804 | " };" , | |
| 805 | " ", | |
| 806 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 807 | " ", | |
| 808 | " if (tv4.error ) {", | |
| 809 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 810 | " }", | |
| 811 | " var jsonData = JSON.par se(respons eBody);", | |
| 812 | " ", | |
| 813 | " //i f success is true we have some response data", | |
| 814 | " if (jsonData. success == = true) {" , | |
| 815 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 816 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 817 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 818 | " " , | |
| 819 | " / /single re sult, retu rn just th e object", | |
| 820 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 821 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 822 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 823 | " } else if ( jsonData.r esponse) { ", | |
| 824 | " //multi ple result s, return an array o f objects" , | |
| 825 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 826 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 827 | " } ", | |
| 828 | " " , | |
| 829 | " / /make sure this is a n array si nce it can return ju st one rec ord as an object", | |
| 830 | " i f (!Array. isArray(js onData.res ponse)) {" , | |
| 831 | " jsonData. response = [jsonData .response] ; ", | |
| 832 | " } ", | |
| 833 | " " , | |
| 834 | " / /tests spe cific to t his API ca ll", | |
| 835 | " f or (var i in jsonDat a.response ) {", | |
| 836 | " if (i > 1 0) { break ; }", | |
| 837 | " var reque st = jsonD ata.respon se[i];", | |
| 838 | " tests[\"r equest \" + i + \" s tatusDescr iption = S ubmitted\" ] = reques t.statusDe scription === 'Submi tted';", | |
| 839 | " } ", | |
| 840 | " " , | |
| 841 | " } e lse {", | |
| 842 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 843 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 844 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 845 | " }", | |
| 846 | "} else {", | |
| 847 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 848 | "}" | |
| 849 | ] | |
| 850 | } | |
| 851 | } | |
| 852 | ], | |
| 853 | "request": { | |
| 854 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/request s/submitte d/status", | |
| 855 | "m ethod": "G ET", | |
| 856 | "h eader": [ | |
| 857 | { | |
| 858 | "key": "Content- Type", | |
| 859 | "value ": "applic ation/json ", | |
| 860 | "descr iption": " " | |
| 861 | }, | |
| 862 | { | |
| 863 | "key": "Accept-E ncoding", | |
| 864 | "value ": "applic ation/json ", | |
| 865 | "descr iption": " " | |
| 866 | } | |
| 867 | ], | |
| 868 | "b ody": { | |
| 869 | "mod e": "formd ata", | |
| 870 | "for mdata": [ | |
| 871 | { | |
| 872 | "key": " email", | |
| 873 | "value": "ge", | |
| 874 | "type": "text", | |
| 875 | "enabled ": true | |
| 876 | }, | |
| 877 | { | |
| 878 | "key": " password", | |
| 879 | "value": " PW ", | |
| 880 | "type": "text", | |
| 881 | "enabled ": true | |
| 882 | } | |
| 883 | ] | |
| 884 | }, | |
| 885 | "d escription ": "retrie ve all sub mitted req uests that the data manager ca n approve or deny" | |
| 886 | }, | |
| 887 | "response" : [] | |
| 888 | }, | |
| 889 | { | |
| 890 | "name": "R equests - Log", | |
| 891 | "event": [ | |
| 892 | { | |
| 893 | "lis ten": "tes t", | |
| 894 | "scr ipt": { | |
| 895 | "type" : "text/ja vascript", | |
| 896 | "exec" : [ | |
| 897 | "//meta tests", | |
| 898 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 899 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 900 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 901 | "", | |
| 902 | "//don't run these json test s if we do n't get js on back :( ", | |
| 903 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 904 | " ", | |
| 905 | " var schema = {", | |
| 906 | " \" items\": { ", | |
| 907 | " \"respon se\": \"ar ray\",", | |
| 908 | " \"succes s\": \"boo lean\",", | |
| 909 | " \"messag e\": \"str ing\"", | |
| 910 | " }", | |
| 911 | " };" , | |
| 912 | " ", | |
| 913 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 914 | " ", | |
| 915 | " if (tv4.error ) {", | |
| 916 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 917 | " }", | |
| 918 | " var jsonData = JSON.par se(respons eBody);", | |
| 919 | " ", | |
| 920 | " //i f success is true we have some response data", | |
| 921 | " if (jsonData. success == = true) {" , | |
| 922 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 923 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 924 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 925 | " " , | |
| 926 | " / /single re sult, retu rn just th e object", | |
| 927 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 928 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 929 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 930 | " } else if ( jsonData.r esponse) { ", | |
| 931 | " //multi ple result s, return an array o f objects" , | |
| 932 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 933 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 934 | " } ", | |
| 935 | " } e lse {", | |
| 936 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 937 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 938 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 939 | " }", | |
| 940 | "} else {", | |
| 941 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 942 | "}" | |
| 943 | ] | |
| 944 | } | |
| 945 | } | |
| 946 | ], | |
| 947 | "request": { | |
| 948 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/request s/1/resear cher/log", | |
| 949 | "m ethod": "G ET", | |
| 950 | "h eader": [ | |
| 951 | { | |
| 952 | "key": "Content- Type", | |
| 953 | "value ": "applic ation/json ", | |
| 954 | "descr iption": " " | |
| 955 | }, | |
| 956 | { | |
| 957 | "key": "Accept-E ncoding", | |
| 958 | "value ": "applic ation/json ", | |
| 959 | "descr iption": " " | |
| 960 | } | |
| 961 | ], | |
| 962 | "b ody": { | |
| 963 | "mod e": "formd ata", | |
| 964 | "for mdata": [ | |
| 965 | { | |
| 966 | "key": " email", | |
| 967 | "value": "ge", | |
| 968 | "type": "text", | |
| 969 | "enabled ": true | |
| 970 | }, | |
| 971 | { | |
| 972 | "key": " password", | |
| 973 | "value": " PW ", | |
| 974 | "type": "text", | |
| 975 | "enabled ": true | |
| 976 | } | |
| 977 | ] | |
| 978 | }, | |
| 979 | "d escription ": "retrie ve the log for this request" | |
| 980 | }, | |
| 981 | "response" : [] | |
| 982 | }, | |
| 983 | { | |
| 984 | "name": "R equests - Attachment s", | |
| 985 | "event": [ | |
| 986 | { | |
| 987 | "lis ten": "tes t", | |
| 988 | "scr ipt": { | |
| 989 | "type" : "text/ja vascript", | |
| 990 | "exec" : [ | |
| 991 | "//meta tests", | |
| 992 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 993 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 994 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 995 | "", | |
| 996 | "//don't run these json test s if we do n't get js on back :( ", | |
| 997 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 998 | " ", | |
| 999 | " var schema = {", | |
| 1000 | " \" items\": { ", | |
| 1001 | " \"respon se\": \"ar ray\",", | |
| 1002 | " \"succes s\": \"boo lean\",", | |
| 1003 | " \"messag e\": \"str ing\"", | |
| 1004 | " }", | |
| 1005 | " };" , | |
| 1006 | " ", | |
| 1007 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 1008 | " ", | |
| 1009 | " if (tv4.error ) {", | |
| 1010 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 1011 | " }", | |
| 1012 | " var jsonData = JSON.par se(respons eBody);", | |
| 1013 | " ", | |
| 1014 | " //i f success is true we have some response data", | |
| 1015 | " if (jsonData. success == = true) {" , | |
| 1016 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 1017 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 1018 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 1019 | " " , | |
| 1020 | " / /single re sult, retu rn just th e object", | |
| 1021 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 1022 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 1023 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 1024 | " } else if ( jsonData.r esponse) { ", | |
| 1025 | " //multi ple result s, return an array o f objects" , | |
| 1026 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 1027 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 1028 | " } ", | |
| 1029 | " } e lse {", | |
| 1030 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 1031 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 1032 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 1033 | " }", | |
| 1034 | "} else {", | |
| 1035 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 1036 | "}" | |
| 1037 | ] | |
| 1038 | } | |
| 1039 | } | |
| 1040 | ], | |
| 1041 | "request": { | |
| 1042 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/request s/1/attach ments", | |
| 1043 | "m ethod": "G ET", | |
| 1044 | "h eader": [ | |
| 1045 | { | |
| 1046 | "key": "Content- Type", | |
| 1047 | "value ": "applic ation/json ", | |
| 1048 | "descr iption": " " | |
| 1049 | }, | |
| 1050 | { | |
| 1051 | "key": "Accept-E ncoding", | |
| 1052 | "value ": "applic ation/json ", | |
| 1053 | "descr iption": " " | |
| 1054 | } | |
| 1055 | ], | |
| 1056 | "b ody": { | |
| 1057 | "mod e": "formd ata", | |
| 1058 | "for mdata": [ | |
| 1059 | { | |
| 1060 | "key": " email", | |
| 1061 | "value": "ge", | |
| 1062 | "type": "text", | |
| 1063 | "enabled ": true | |
| 1064 | }, | |
| 1065 | { | |
| 1066 | "key": " password", | |
| 1067 | "value": " PW ", | |
| 1068 | "type": "text", | |
| 1069 | "enabled ": true | |
| 1070 | } | |
| 1071 | ] | |
| 1072 | }, | |
| 1073 | "d escription ": "retrie ve all fil e attachme nts for th is request " | |
| 1074 | }, | |
| 1075 | "response" : [] | |
| 1076 | }, | |
| 1077 | { | |
| 1078 | "name": "R equests - Create", | |
| 1079 | "event": [ | |
| 1080 | { | |
| 1081 | "lis ten": "tes t", | |
| 1082 | "scr ipt": { | |
| 1083 | "type" : "text/ja vascript", | |
| 1084 | "exec" : [ | |
| 1085 | "//meta tests", | |
| 1086 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 1087 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 1088 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 1089 | "", | |
| 1090 | "//don't run these json test s if we do n't get js on back :( ", | |
| 1091 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 1092 | " ", | |
| 1093 | " var schema = {", | |
| 1094 | " \" items\": { ", | |
| 1095 | " \"respon se\": \"ar ray\",", | |
| 1096 | " \"succes s\": \"boo lean\",", | |
| 1097 | " \"messag e\": \"str ing\"", | |
| 1098 | " }", | |
| 1099 | " };" , | |
| 1100 | " ", | |
| 1101 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 1102 | " ", | |
| 1103 | " if (tv4.error ) {", | |
| 1104 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 1105 | " }", | |
| 1106 | " var jsonData = JSON.par se(respons eBody);", | |
| 1107 | " ", | |
| 1108 | " //i f success is true we have some response data", | |
| 1109 | " if (jsonData. success == = true) {" , | |
| 1110 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 1111 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 1112 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 1113 | " " , | |
| 1114 | " / /single re sult, retu rn just th e object", | |
| 1115 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 1116 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 1117 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 1118 | " } else if ( jsonData.r esponse) { ", | |
| 1119 | " //multi ple result s, return an array o f objects" , | |
| 1120 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 1121 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 1122 | " } ", | |
| 1123 | " } e lse {", | |
| 1124 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 1125 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 1126 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 1127 | " }", | |
| 1128 | "} else {", | |
| 1129 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 1130 | "}" | |
| 1131 | ] | |
| 1132 | } | |
| 1133 | } | |
| 1134 | ], | |
| 1135 | "request": { | |
| 1136 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/request s", | |
| 1137 | "m ethod": "P OST", | |
| 1138 | "h eader": [ | |
| 1139 | { | |
| 1140 | "key": "Content- Type", | |
| 1141 | "value ": "applic ation/json ", | |
| 1142 | "descr iption": " " | |
| 1143 | }, | |
| 1144 | { | |
| 1145 | "key": "Accept-E ncoding", | |
| 1146 | "value ": "applic ation/json ", | |
| 1147 | "descr iption": " " | |
| 1148 | } | |
| 1149 | ], | |
| 1150 | "b ody": { | |
| 1151 | "mod e": "raw", | |
| 1152 | "raw ": "{\r\n \"title \": \"Post man Sample Create Re quest\",\r \n \"de scription\ ": \"This is a sampl e new requ est for de mo purpose s\",\r\n \"type\" : \"1\",\r \n \"so urce\": \" 1\",\r\n \"notify \": false, \r\n \" studyAppro val\": \"1 \",\r\n \"associa tedRequest s\": [],\r \n \"cr eatedBy\": \"researc her1\"\r\n }" | |
| 1153 | }, | |
| 1154 | "d escription ": "create a new req uest" | |
| 1155 | }, | |
| 1156 | "response" : [] | |
| 1157 | }, | |
| 1158 | { | |
| 1159 | "name": "R equests - Add File", | |
| 1160 | "event": [ | |
| 1161 | { | |
| 1162 | "lis ten": "tes t", | |
| 1163 | "scr ipt": { | |
| 1164 | "type" : "text/ja vascript", | |
| 1165 | "exec" : [ | |
| 1166 | "//meta tests", | |
| 1167 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 1168 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 1169 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 1170 | "", | |
| 1171 | "//don't run these json test s if we do n't get js on back :( ", | |
| 1172 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 1173 | " ", | |
| 1174 | " var schema = {", | |
| 1175 | " \" items\": { ", | |
| 1176 | " \"respon se\": \"ar ray\",", | |
| 1177 | " \"succes s\": \"boo lean\",", | |
| 1178 | " \"messag e\": \"str ing\"", | |
| 1179 | " }", | |
| 1180 | " };" , | |
| 1181 | " ", | |
| 1182 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 1183 | " ", | |
| 1184 | " if (tv4.error ) {", | |
| 1185 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 1186 | " }", | |
| 1187 | " var jsonData = JSON.par se(respons eBody);", | |
| 1188 | " ", | |
| 1189 | " //i f success is true we have some response data", | |
| 1190 | " if (jsonData. success == = true) {" , | |
| 1191 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 1192 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 1193 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 1194 | " " , | |
| 1195 | " / /single re sult, retu rn just th e object", | |
| 1196 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 1197 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 1198 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 1199 | " } else if ( jsonData.r esponse) { ", | |
| 1200 | " //multi ple result s, return an array o f objects" , | |
| 1201 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 1202 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 1203 | " } ", | |
| 1204 | " } e lse {", | |
| 1205 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 1206 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 1207 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 1208 | " }", | |
| 1209 | "} else {", | |
| 1210 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 1211 | "}" | |
| 1212 | ] | |
| 1213 | } | |
| 1214 | } | |
| 1215 | ], | |
| 1216 | "request": { | |
| 1217 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/request s/1/attach ment", | |
| 1218 | "m ethod": "P OST", | |
| 1219 | "h eader": [ | |
| 1220 | { | |
| 1221 | "key": "Content- Type", | |
| 1222 | "value ": "applic ation/json ", | |
| 1223 | "descr iption": " " | |
| 1224 | }, | |
| 1225 | { | |
| 1226 | "key": "Accept-E ncoding", | |
| 1227 | "value ": "applic ation/json ", | |
| 1228 | "descr iption": " " | |
| 1229 | } | |
| 1230 | ], | |
| 1231 | "b ody": { | |
| 1232 | "mod e": "raw", | |
| 1233 | "raw ": "{\r\n \"name\ ": \"postm an filenam e.doc\",\r \n \"ex tension\": \"doc\",\ r\n \"d ata\": \"= =multipart file data goes here ==\",\r\n \"creat edBy\": \" researcher 1\"\r\n}" | |
| 1234 | }, | |
| 1235 | "d escription ": "Add a new file f or this re quest" | |
| 1236 | }, | |
| 1237 | "response" : [] | |
| 1238 | }, | |
| 1239 | { | |
| 1240 | "name": "R equests - Update", | |
| 1241 | "event": [ | |
| 1242 | { | |
| 1243 | "lis ten": "tes t", | |
| 1244 | "scr ipt": { | |
| 1245 | "type" : "text/ja vascript", | |
| 1246 | "exec" : [ | |
| 1247 | "//meta tests", | |
| 1248 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 1249 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 1250 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 1251 | "", | |
| 1252 | "//don't run these json test s if we do n't get js on back :( ", | |
| 1253 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 1254 | " ", | |
| 1255 | " var schema = {", | |
| 1256 | " \" items\": { ", | |
| 1257 | " \"respon se\": \"ar ray\",", | |
| 1258 | " \"succes s\": \"boo lean\",", | |
| 1259 | " \"messag e\": \"str ing\"", | |
| 1260 | " }", | |
| 1261 | " };" , | |
| 1262 | " ", | |
| 1263 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 1264 | " ", | |
| 1265 | " if (tv4.error ) {", | |
| 1266 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 1267 | " }", | |
| 1268 | " var jsonData = JSON.par se(respons eBody);", | |
| 1269 | " ", | |
| 1270 | " //i f success is true we have some response data", | |
| 1271 | " if (jsonData. success == = true) {" , | |
| 1272 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 1273 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 1274 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 1275 | " " , | |
| 1276 | " / /single re sult, retu rn just th e object", | |
| 1277 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 1278 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 1279 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 1280 | " } else if ( jsonData.r esponse) { ", | |
| 1281 | " //multi ple result s, return an array o f objects" , | |
| 1282 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 1283 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 1284 | " } ", | |
| 1285 | " } e lse {", | |
| 1286 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 1287 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 1288 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 1289 | " }", | |
| 1290 | "} else {", | |
| 1291 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 1292 | "}" | |
| 1293 | ] | |
| 1294 | } | |
| 1295 | } | |
| 1296 | ], | |
| 1297 | "request": { | |
| 1298 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/request s/1", | |
| 1299 | "m ethod": "P UT", | |
| 1300 | "h eader": [ | |
| 1301 | { | |
| 1302 | "key": "Content- Type", | |
| 1303 | "value ": "applic ation/json ", | |
| 1304 | "descr iption": " " | |
| 1305 | }, | |
| 1306 | { | |
| 1307 | "key": "Accept-E ncoding", | |
| 1308 | "value ": "applic ation/json ", | |
| 1309 | "descr iption": " " | |
| 1310 | } | |
| 1311 | ], | |
| 1312 | "b ody": { | |
| 1313 | "mod e": "raw", | |
| 1314 | "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 \"type\" : \"1\",\r \n \"so urce\": \" 1\",\r\n \"notify \": true,\ r\n \"s tudyApprov al\": \"1\ ",\r\n \"associat edRequests \": [],\r\ n \"cre atedBy\": \"research er1\"\r\n} " | |
| 1315 | }, | |
| 1316 | "d escription ": "update an existi ng request " | |
| 1317 | }, | |
| 1318 | "response" : [] | |
| 1319 | }, | |
| 1320 | { | |
| 1321 | "name": "R equests - Submit", | |
| 1322 | "event": [ | |
| 1323 | { | |
| 1324 | "lis ten": "tes t", | |
| 1325 | "scr ipt": { | |
| 1326 | "type" : "text/ja vascript", | |
| 1327 | "exec" : [ | |
| 1328 | "//meta tests", | |
| 1329 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 1330 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 1331 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 1332 | "", | |
| 1333 | "//don't run these json test s if we do n't get js on back :( ", | |
| 1334 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 1335 | " ", | |
| 1336 | " var schema = {", | |
| 1337 | " \" items\": { ", | |
| 1338 | " \"respon se\": \"ar ray\",", | |
| 1339 | " \"succes s\": \"boo lean\",", | |
| 1340 | " \"messag e\": \"str ing\"", | |
| 1341 | " }", | |
| 1342 | " };" , | |
| 1343 | " ", | |
| 1344 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 1345 | " ", | |
| 1346 | " if (tv4.error ) {", | |
| 1347 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 1348 | " }", | |
| 1349 | " var jsonData = JSON.par se(respons eBody);", | |
| 1350 | " ", | |
| 1351 | " //i f success is true we have some response data", | |
| 1352 | " if (jsonData. success == = true) {" , | |
| 1353 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 1354 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 1355 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 1356 | " " , | |
| 1357 | " / /single re sult, retu rn just th e object", | |
| 1358 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 1359 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 1360 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 1361 | " } else if ( jsonData.r esponse) { ", | |
| 1362 | " //multi ple result s, return an array o f objects" , | |
| 1363 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 1364 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 1365 | " } ", | |
| 1366 | " } e lse {", | |
| 1367 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 1368 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 1369 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 1370 | " }", | |
| 1371 | "} else {", | |
| 1372 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 1373 | "}" | |
| 1374 | ] | |
| 1375 | } | |
| 1376 | } | |
| 1377 | ], | |
| 1378 | "request": { | |
| 1379 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/request s/1/submit ", | |
| 1380 | "m ethod": "P UT", | |
| 1381 | "h eader": [ | |
| 1382 | { | |
| 1383 | "key": "Content- Type", | |
| 1384 | "value ": "applic ation/json ", | |
| 1385 | "descr iption": " " | |
| 1386 | }, | |
| 1387 | { | |
| 1388 | "key": "Accept-E ncoding", | |
| 1389 | "value ": "applic ation/json ", | |
| 1390 | "descr iption": " " | |
| 1391 | } | |
| 1392 | ], | |
| 1393 | "b ody": { | |
| 1394 | "mod e": "raw", | |
| 1395 | "raw ": "{\n\t\ "createdBy \": \"rese archer1\"\ n}" | |
| 1396 | }, | |
| 1397 | "d escription ": "submit a request to a data manager f or approva l" | |
| 1398 | }, | |
| 1399 | "response" : [] | |
| 1400 | }, | |
| 1401 | { | |
| 1402 | "name": "R equests - Approve Re quest", | |
| 1403 | "event": [ | |
| 1404 | { | |
| 1405 | "lis ten": "tes t", | |
| 1406 | "scr ipt": { | |
| 1407 | "type" : "text/ja vascript", | |
| 1408 | "exec" : [ | |
| 1409 | "//meta tests", | |
| 1410 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 1411 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 1412 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 1413 | "", | |
| 1414 | "//don't run these json test s if we do n't get js on back :( ", | |
| 1415 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 1416 | " ", | |
| 1417 | " var schema = {", | |
| 1418 | " \" items\": { ", | |
| 1419 | " \"respon se\": \"ar ray\",", | |
| 1420 | " \"succes s\": \"boo lean\",", | |
| 1421 | " \"messag e\": \"str ing\"", | |
| 1422 | " }", | |
| 1423 | " };" , | |
| 1424 | " ", | |
| 1425 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 1426 | " ", | |
| 1427 | " if (tv4.error ) {", | |
| 1428 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 1429 | " }", | |
| 1430 | " var jsonData = JSON.par se(respons eBody);", | |
| 1431 | " ", | |
| 1432 | " //i f success is true we have some response data", | |
| 1433 | " if (jsonData. success == = true) {" , | |
| 1434 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 1435 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 1436 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 1437 | " " , | |
| 1438 | " / /single re sult, retu rn just th e object", | |
| 1439 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 1440 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 1441 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 1442 | " } else if ( jsonData.r esponse) { ", | |
| 1443 | " //multi ple result s, return an array o f objects" , | |
| 1444 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 1445 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 1446 | " } ", | |
| 1447 | " } e lse {", | |
| 1448 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 1449 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 1450 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 1451 | " }", | |
| 1452 | "} else {", | |
| 1453 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 1454 | "}" | |
| 1455 | ] | |
| 1456 | } | |
| 1457 | } | |
| 1458 | ], | |
| 1459 | "request": { | |
| 1460 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/request s/1/sent", | |
| 1461 | "m ethod": "P UT", | |
| 1462 | "h eader": [ | |
| 1463 | { | |
| 1464 | "key": "Content- Type", | |
| 1465 | "value ": "applic ation/json ", | |
| 1466 | "descr iption": " " | |
| 1467 | }, | |
| 1468 | { | |
| 1469 | "key": "Accept-E ncoding", | |
| 1470 | "value ": "applic ation/json ", | |
| 1471 | "descr iption": " " | |
| 1472 | } | |
| 1473 | ], | |
| 1474 | "b ody": { | |
| 1475 | "mod e": "raw", | |
| 1476 | "raw ": "{\n\t\ "createdBy \": \"data manager1\" \n}" | |
| 1477 | }, | |
| 1478 | "d escription ": "allow a data man ager to ap prove a re quest" | |
| 1479 | }, | |
| 1480 | "response" : [] | |
| 1481 | }, | |
| 1482 | { | |
| 1483 | "name": "R equests - Deny Reque st", | |
| 1484 | "event": [ | |
| 1485 | { | |
| 1486 | "lis ten": "tes t", | |
| 1487 | "scr ipt": { | |
| 1488 | "type" : "text/ja vascript", | |
| 1489 | "exec" : [ | |
| 1490 | "//meta tests", | |
| 1491 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 1492 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 1493 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 1494 | "", | |
| 1495 | "//don't run these json test s if we do n't get js on back :( ", | |
| 1496 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 1497 | " ", | |
| 1498 | " var schema = {", | |
| 1499 | " \" items\": { ", | |
| 1500 | " \"respon se\": \"ar ray\",", | |
| 1501 | " \"succes s\": \"boo lean\",", | |
| 1502 | " \"messag e\": \"str ing\"", | |
| 1503 | " }", | |
| 1504 | " };" , | |
| 1505 | " ", | |
| 1506 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 1507 | " ", | |
| 1508 | " if (tv4.error ) {", | |
| 1509 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 1510 | " }", | |
| 1511 | " var jsonData = JSON.par se(respons eBody);", | |
| 1512 | " ", | |
| 1513 | " //i f success is true we have some response data", | |
| 1514 | " if (jsonData. success == = true) {" , | |
| 1515 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 1516 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 1517 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 1518 | " " , | |
| 1519 | " / /single re sult, retu rn just th e object", | |
| 1520 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 1521 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 1522 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 1523 | " } else if ( jsonData.r esponse) { ", | |
| 1524 | " //multi ple result s, return an array o f objects" , | |
| 1525 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 1526 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 1527 | " } ", | |
| 1528 | " } e lse {", | |
| 1529 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 1530 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 1531 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 1532 | " }", | |
| 1533 | "} else {", | |
| 1534 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 1535 | "}" | |
| 1536 | ] | |
| 1537 | } | |
| 1538 | } | |
| 1539 | ], | |
| 1540 | "request": { | |
| 1541 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/request s/1/deny", | |
| 1542 | "m ethod": "P UT", | |
| 1543 | "h eader": [ | |
| 1544 | { | |
| 1545 | "key": "Content- Type", | |
| 1546 | "value ": "applic ation/json ", | |
| 1547 | "descr iption": " " | |
| 1548 | }, | |
| 1549 | { | |
| 1550 | "key": "Accept-E ncoding", | |
| 1551 | "value ": "applic ation/json ", | |
| 1552 | "descr iption": " " | |
| 1553 | } | |
| 1554 | ], | |
| 1555 | "b ody": { | |
| 1556 | "mod e": "raw", | |
| 1557 | "raw ": "{\n\t\ "reason\": \"This ha s the wron g study ap proval, pl ease chang e to ABCXY Z\",\n\t\" createdBy\ ": \"datam anager1\"\ n}" | |
| 1558 | }, | |
| 1559 | "d escription ": "allow a data man ager to de ny a reque st" | |
| 1560 | }, | |
| 1561 | "response" : [] | |
| 1562 | }, | |
| 1563 | { | |
| 1564 | "name": "R equests - Return Req uest", | |
| 1565 | "event": [ | |
| 1566 | { | |
| 1567 | "lis ten": "tes t", | |
| 1568 | "scr ipt": { | |
| 1569 | "type" : "text/ja vascript", | |
| 1570 | "exec" : [ | |
| 1571 | "//meta tests", | |
| 1572 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 1573 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 1574 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 1575 | "", | |
| 1576 | "//don't run these json test s if we do n't get js on back :( ", | |
| 1577 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 1578 | " ", | |
| 1579 | " var schema = {", | |
| 1580 | " \" items\": { ", | |
| 1581 | " \"respon se\": \"ar ray\",", | |
| 1582 | " \"succes s\": \"boo lean\",", | |
| 1583 | " \"messag e\": \"str ing\"", | |
| 1584 | " }", | |
| 1585 | " };" , | |
| 1586 | " ", | |
| 1587 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 1588 | " ", | |
| 1589 | " if (tv4.error ) {", | |
| 1590 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 1591 | " }", | |
| 1592 | " var jsonData = JSON.par se(respons eBody);", | |
| 1593 | " ", | |
| 1594 | " //i f success is true we have some response data", | |
| 1595 | " if (jsonData. success == = true) {" , | |
| 1596 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 1597 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 1598 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 1599 | " " , | |
| 1600 | " / /single re sult, retu rn just th e object", | |
| 1601 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 1602 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 1603 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 1604 | " } else if ( jsonData.r esponse) { ", | |
| 1605 | " //multi ple result s, return an array o f objects" , | |
| 1606 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 1607 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 1608 | " } ", | |
| 1609 | " } e lse {", | |
| 1610 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 1611 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 1612 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 1613 | " }", | |
| 1614 | "} else {", | |
| 1615 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 1616 | "}" | |
| 1617 | ] | |
| 1618 | } | |
| 1619 | } | |
| 1620 | ], | |
| 1621 | "request": { | |
| 1622 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/request s/1/return ", | |
| 1623 | "m ethod": "P UT", | |
| 1624 | "h eader": [ | |
| 1625 | { | |
| 1626 | "key": "Content- Type", | |
| 1627 | "value ": "applic ation/json ", | |
| 1628 | "descr iption": " " | |
| 1629 | }, | |
| 1630 | { | |
| 1631 | "key": "Accept-E ncoding", | |
| 1632 | "value ": "applic ation/json ", | |
| 1633 | "descr iption": " " | |
| 1634 | } | |
| 1635 | ], | |
| 1636 | "b ody": { | |
| 1637 | "mod e": "raw", | |
| 1638 | "raw ": "{\n\t\ "reason\": \"This is a bad req uest, make it better \",\n\t\"c reatedBy\" : \"datama nager1\"\n }" | |
| 1639 | }, | |
| 1640 | "d escription ": "allow a data man ager to re turn a req uest back to the res earcher fo r more inf o" | |
| 1641 | }, | |
| 1642 | "response" : [] | |
| 1643 | }, | |
| 1644 | { | |
| 1645 | "name": "R equests - Accept Dat a", | |
| 1646 | "event": [ | |
| 1647 | { | |
| 1648 | "lis ten": "tes t", | |
| 1649 | "scr ipt": { | |
| 1650 | "type" : "text/ja vascript", | |
| 1651 | "exec" : [ | |
| 1652 | "//meta tests", | |
| 1653 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 1654 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 1655 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 1656 | "", | |
| 1657 | "//don't run these json test s if we do n't get js on back :( ", | |
| 1658 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 1659 | " ", | |
| 1660 | " var schema = {", | |
| 1661 | " \" items\": { ", | |
| 1662 | " \"respon se\": \"ar ray\",", | |
| 1663 | " \"succes s\": \"boo lean\",", | |
| 1664 | " \"messag e\": \"str ing\"", | |
| 1665 | " }", | |
| 1666 | " };" , | |
| 1667 | " ", | |
| 1668 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 1669 | " ", | |
| 1670 | " if (tv4.error ) {", | |
| 1671 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 1672 | " }", | |
| 1673 | " var jsonData = JSON.par se(respons eBody);", | |
| 1674 | " ", | |
| 1675 | " //i f success is true we have some response data", | |
| 1676 | " if (jsonData. success == = true) {" , | |
| 1677 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 1678 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 1679 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 1680 | " " , | |
| 1681 | " / /single re sult, retu rn just th e object", | |
| 1682 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 1683 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 1684 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 1685 | " } else if ( jsonData.r esponse) { ", | |
| 1686 | " //multi ple result s, return an array o f objects" , | |
| 1687 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 1688 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 1689 | " } ", | |
| 1690 | " } e lse {", | |
| 1691 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 1692 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 1693 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 1694 | " }", | |
| 1695 | "} else {", | |
| 1696 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 1697 | "}" | |
| 1698 | ] | |
| 1699 | } | |
| 1700 | } | |
| 1701 | ], | |
| 1702 | "request": { | |
| 1703 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/request s/1/accept data", | |
| 1704 | "m ethod": "P UT", | |
| 1705 | "h eader": [ | |
| 1706 | { | |
| 1707 | "key": "Content- Type", | |
| 1708 | "value ": "applic ation/json ", | |
| 1709 | "descr iption": " " | |
| 1710 | }, | |
| 1711 | { | |
| 1712 | "key": "Accept-E ncoding", | |
| 1713 | "value ": "applic ation/json ", | |
| 1714 | "descr iption": " " | |
| 1715 | } | |
| 1716 | ], | |
| 1717 | "b ody": { | |
| 1718 | "mod e": "raw", | |
| 1719 | "raw ": "{\n\t\ "createdBy \": \"data manager1\" \n}" | |
| 1720 | }, | |
| 1721 | "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" | |
| 1722 | }, | |
| 1723 | "response" : [] | |
| 1724 | }, | |
| 1725 | { | |
| 1726 | "name": "R equests - Return Dat a to Reque stor", | |
| 1727 | "event": [ | |
| 1728 | { | |
| 1729 | "lis ten": "tes t", | |
| 1730 | "scr ipt": { | |
| 1731 | "type" : "text/ja vascript", | |
| 1732 | "exec" : [ | |
| 1733 | "//meta tests", | |
| 1734 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 1735 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 1736 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 1737 | "", | |
| 1738 | "//don't run these json test s if we do n't get js on back :( ", | |
| 1739 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 1740 | " ", | |
| 1741 | " var schema = {", | |
| 1742 | " \" items\": { ", | |
| 1743 | " \"respon se\": \"ar ray\",", | |
| 1744 | " \"succes s\": \"boo lean\",", | |
| 1745 | " \"messag e\": \"str ing\"", | |
| 1746 | " }", | |
| 1747 | " };" , | |
| 1748 | " ", | |
| 1749 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 1750 | " ", | |
| 1751 | " if (tv4.error ) {", | |
| 1752 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 1753 | " }", | |
| 1754 | " var jsonData = JSON.par se(respons eBody);", | |
| 1755 | " ", | |
| 1756 | " //i f success is true we have some response data", | |
| 1757 | " if (jsonData. success == = true) {" , | |
| 1758 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 1759 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 1760 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 1761 | " " , | |
| 1762 | " / /single re sult, retu rn just th e object", | |
| 1763 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 1764 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 1765 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 1766 | " } else if ( jsonData.r esponse) { ", | |
| 1767 | " //multi ple result s, return an array o f objects" , | |
| 1768 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 1769 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 1770 | " } ", | |
| 1771 | " } e lse {", | |
| 1772 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 1773 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 1774 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 1775 | " }", | |
| 1776 | "} else {", | |
| 1777 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 1778 | "}" | |
| 1779 | ] | |
| 1780 | } | |
| 1781 | } | |
| 1782 | ], | |
| 1783 | "request": { | |
| 1784 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/request s/1/return data", | |
| 1785 | "m ethod": "P UT", | |
| 1786 | "h eader": [ | |
| 1787 | { | |
| 1788 | "key": "Content- Type", | |
| 1789 | "value ": "applic ation/json ", | |
| 1790 | "descr iption": " " | |
| 1791 | }, | |
| 1792 | { | |
| 1793 | "key": "Accept-E ncoding", | |
| 1794 | "value ": "applic ation/json ", | |
| 1795 | "descr iption": " " | |
| 1796 | } | |
| 1797 | ], | |
| 1798 | "b ody": { | |
| 1799 | "mod e": "raw", | |
| 1800 | "raw ": "{\n\t\ "createdBy \": \"data manager1\" \n}" | |
| 1801 | }, | |
| 1802 | "d escription ": "allow a data man ager to th e request creator fo r them to approve or reject th e data fro m VINCI or other dat a source" | |
| 1803 | }, | |
| 1804 | "response" : [] | |
| 1805 | }, | |
| 1806 | { | |
| 1807 | "name": "R equests - Confirm Da ta", | |
| 1808 | "event": [ | |
| 1809 | { | |
| 1810 | "lis ten": "tes t", | |
| 1811 | "scr ipt": { | |
| 1812 | "type" : "text/ja vascript", | |
| 1813 | "exec" : [ | |
| 1814 | "//meta tests", | |
| 1815 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 1816 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 1817 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 1818 | "", | |
| 1819 | "//don't run these json test s if we do n't get js on back :( ", | |
| 1820 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 1821 | " ", | |
| 1822 | " var schema = {", | |
| 1823 | " \" items\": { ", | |
| 1824 | " \"respon se\": \"ar ray\",", | |
| 1825 | " \"succes s\": \"boo lean\",", | |
| 1826 | " \"messag e\": \"str ing\"", | |
| 1827 | " }", | |
| 1828 | " };" , | |
| 1829 | " ", | |
| 1830 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 1831 | " ", | |
| 1832 | " if (tv4.error ) {", | |
| 1833 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 1834 | " }", | |
| 1835 | " var jsonData = JSON.par se(respons eBody);", | |
| 1836 | " ", | |
| 1837 | " //i f success is true we have some response data", | |
| 1838 | " if (jsonData. success == = true) {" , | |
| 1839 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 1840 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 1841 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 1842 | " " , | |
| 1843 | " / /single re sult, retu rn just th e object", | |
| 1844 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 1845 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 1846 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 1847 | " } else if ( jsonData.r esponse) { ", | |
| 1848 | " //multi ple result s, return an array o f objects" , | |
| 1849 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 1850 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 1851 | " } ", | |
| 1852 | " } e lse {", | |
| 1853 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 1854 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 1855 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 1856 | " }", | |
| 1857 | "} else {", | |
| 1858 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 1859 | "}" | |
| 1860 | ] | |
| 1861 | } | |
| 1862 | } | |
| 1863 | ], | |
| 1864 | "request": { | |
| 1865 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/request s/1/confir mdata", | |
| 1866 | "m ethod": "P UT", | |
| 1867 | "h eader": [ | |
| 1868 | { | |
| 1869 | "key": "Content- Type", | |
| 1870 | "value ": "applic ation/json ", | |
| 1871 | "descr iption": " " | |
| 1872 | }, | |
| 1873 | { | |
| 1874 | "key": "Accept-E ncoding", | |
| 1875 | "value ": "applic ation/json ", | |
| 1876 | "descr iption": " " | |
| 1877 | } | |
| 1878 | ], | |
| 1879 | "b ody": { | |
| 1880 | "mod e": "raw", | |
| 1881 | "raw ": "{\n\t\ "createdBy \": \"rese archer1\"\ n}" | |
| 1882 | }, | |
| 1883 | "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" | |
| 1884 | }, | |
| 1885 | "response" : [] | |
| 1886 | }, | |
| 1887 | { | |
| 1888 | "name": "R equests - Reject Dat a", | |
| 1889 | "event": [ | |
| 1890 | { | |
| 1891 | "lis ten": "tes t", | |
| 1892 | "scr ipt": { | |
| 1893 | "type" : "text/ja vascript", | |
| 1894 | "exec" : [ | |
| 1895 | "//meta tests", | |
| 1896 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 1897 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 1898 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 1899 | "", | |
| 1900 | "//don't run these json test s if we do n't get js on back :( ", | |
| 1901 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 1902 | " ", | |
| 1903 | " var schema = {", | |
| 1904 | " \" items\": { ", | |
| 1905 | " \"respon se\": \"ar ray\",", | |
| 1906 | " \"succes s\": \"boo lean\",", | |
| 1907 | " \"messag e\": \"str ing\"", | |
| 1908 | " }", | |
| 1909 | " };" , | |
| 1910 | " ", | |
| 1911 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 1912 | " ", | |
| 1913 | " if (tv4.error ) {", | |
| 1914 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 1915 | " }", | |
| 1916 | " var jsonData = JSON.par se(respons eBody);", | |
| 1917 | " ", | |
| 1918 | " //i f success is true we have some response data", | |
| 1919 | " if (jsonData. success == = true) {" , | |
| 1920 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 1921 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 1922 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 1923 | " " , | |
| 1924 | " / /single re sult, retu rn just th e object", | |
| 1925 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 1926 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 1927 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 1928 | " } else if ( jsonData.r esponse) { ", | |
| 1929 | " //multi ple result s, return an array o f objects" , | |
| 1930 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 1931 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 1932 | " } ", | |
| 1933 | " } e lse {", | |
| 1934 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 1935 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 1936 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 1937 | " }", | |
| 1938 | "} else {", | |
| 1939 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 1940 | "}" | |
| 1941 | ] | |
| 1942 | } | |
| 1943 | } | |
| 1944 | ], | |
| 1945 | "request": { | |
| 1946 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/request s/1/reject data", | |
| 1947 | "m ethod": "P UT", | |
| 1948 | "h eader": [ | |
| 1949 | { | |
| 1950 | "key": "Content- Type", | |
| 1951 | "value ": "applic ation/json ", | |
| 1952 | "descr iption": " " | |
| 1953 | }, | |
| 1954 | { | |
| 1955 | "key": "Accept-E ncoding", | |
| 1956 | "value ": "applic ation/json ", | |
| 1957 | "descr iption": " " | |
| 1958 | } | |
| 1959 | ], | |
| 1960 | "b ody": { | |
| 1961 | "mod e": "raw", | |
| 1962 | "raw ": "{\n\t\ "createdBy \": \"rese archer1\"\ n}" | |
| 1963 | }, | |
| 1964 | "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" | |
| 1965 | }, | |
| 1966 | "response" : [] | |
| 1967 | }, | |
| 1968 | { | |
| 1969 | "name": "R equests - Delete", | |
| 1970 | "event": [ | |
| 1971 | { | |
| 1972 | "lis ten": "tes t", | |
| 1973 | "scr ipt": { | |
| 1974 | "type" : "text/ja vascript", | |
| 1975 | "exec" : [ | |
| 1976 | "//meta tests", | |
| 1977 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 1978 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 1979 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 1980 | "", | |
| 1981 | "//don't run these json test s if we do n't get js on back :( ", | |
| 1982 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 1983 | " ", | |
| 1984 | " var schema = {", | |
| 1985 | " \" items\": { ", | |
| 1986 | " \"respon se\": \"ar ray\",", | |
| 1987 | " \"succes s\": \"boo lean\",", | |
| 1988 | " \"messag e\": \"str ing\"", | |
| 1989 | " }", | |
| 1990 | " };" , | |
| 1991 | " ", | |
| 1992 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 1993 | " ", | |
| 1994 | " if (tv4.error ) {", | |
| 1995 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 1996 | " }", | |
| 1997 | " var jsonData = JSON.par se(respons eBody);", | |
| 1998 | " ", | |
| 1999 | " //i f success is true we have some response data", | |
| 2000 | " if (jsonData. success == = true) {" , | |
| 2001 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 2002 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 2003 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 2004 | " " , | |
| 2005 | " / /single re sult, retu rn just th e object", | |
| 2006 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 2007 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 2008 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 2009 | " } else if ( jsonData.r esponse) { ", | |
| 2010 | " //multi ple result s, return an array o f objects" , | |
| 2011 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 2012 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 2013 | " } ", | |
| 2014 | " } e lse {", | |
| 2015 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 2016 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 2017 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 2018 | " }", | |
| 2019 | "} else {", | |
| 2020 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 2021 | "}" | |
| 2022 | ] | |
| 2023 | } | |
| 2024 | } | |
| 2025 | ], | |
| 2026 | "request": { | |
| 2027 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/request s/1", | |
| 2028 | "m ethod": "D ELETE", | |
| 2029 | "h eader": [ | |
| 2030 | { | |
| 2031 | "key": "Content- Type", | |
| 2032 | "value ": "applic ation/json ", | |
| 2033 | "descr iption": " " | |
| 2034 | }, | |
| 2035 | { | |
| 2036 | "key": "Accept-E ncoding", | |
| 2037 | "value ": "applic ation/json ", | |
| 2038 | "descr iption": " " | |
| 2039 | } | |
| 2040 | ], | |
| 2041 | "b ody": { | |
| 2042 | "mod e": "raw", | |
| 2043 | "raw ": "{\r\n \"creat edBy\": \" researcher 1\"\r\n}" | |
| 2044 | }, | |
| 2045 | "d escription ": "delete a request " | |
| 2046 | }, | |
| 2047 | "response" : [] | |
| 2048 | }, | |
| 2049 | { | |
| 2050 | "name": "R equests - Remove Fil e", | |
| 2051 | "event": [ | |
| 2052 | { | |
| 2053 | "lis ten": "tes t", | |
| 2054 | "scr ipt": { | |
| 2055 | "type" : "text/ja vascript", | |
| 2056 | "exec" : [ | |
| 2057 | "//meta tests", | |
| 2058 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 2059 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 2060 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 2061 | "", | |
| 2062 | "//don't run these json test s if we do n't get js on back :( ", | |
| 2063 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 2064 | " ", | |
| 2065 | " var schema = {", | |
| 2066 | " \" items\": { ", | |
| 2067 | " \"respon se\": \"ar ray\",", | |
| 2068 | " \"succes s\": \"boo lean\",", | |
| 2069 | " \"messag e\": \"str ing\"", | |
| 2070 | " }", | |
| 2071 | " };" , | |
| 2072 | " ", | |
| 2073 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 2074 | " ", | |
| 2075 | " if (tv4.error ) {", | |
| 2076 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 2077 | " }", | |
| 2078 | " var jsonData = JSON.par se(respons eBody);", | |
| 2079 | " ", | |
| 2080 | " //i f success is true we have some response data", | |
| 2081 | " if (jsonData. success == = true) {" , | |
| 2082 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 2083 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 2084 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 2085 | " " , | |
| 2086 | " / /single re sult, retu rn just th e object", | |
| 2087 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 2088 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 2089 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 2090 | " } else if ( jsonData.r esponse) { ", | |
| 2091 | " //multi ple result s, return an array o f objects" , | |
| 2092 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 2093 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 2094 | " } ", | |
| 2095 | " } e lse {", | |
| 2096 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 2097 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 2098 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 2099 | " }", | |
| 2100 | "} else {", | |
| 2101 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 2102 | "}" | |
| 2103 | ] | |
| 2104 | } | |
| 2105 | } | |
| 2106 | ], | |
| 2107 | "request": { | |
| 2108 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/request s/1/attach ment", | |
| 2109 | "m ethod": "D ELETE", | |
| 2110 | "h eader": [ | |
| 2111 | { | |
| 2112 | "key": "Content- Type", | |
| 2113 | "value ": "applic ation/json ", | |
| 2114 | "descr iption": " " | |
| 2115 | }, | |
| 2116 | { | |
| 2117 | "key": "Accept-E ncoding", | |
| 2118 | "value ": "applic ation/json ", | |
| 2119 | "descr iption": " " | |
| 2120 | } | |
| 2121 | ], | |
| 2122 | "b ody": { | |
| 2123 | "mod e": "raw", | |
| 2124 | "raw ": "{\r\n \"creat edBy\": \" researcher 1\"\r\n}" | |
| 2125 | }, | |
| 2126 | "d escription ": "Remove an upload ed file fr om a reque st" | |
| 2127 | }, | |
| 2128 | "response" : [] | |
| 2129 | } | |
| 2130 | ] | |
| 2131 | }, | |
| 2132 | { | |
| 2133 | "name" : "StudyAp provals", | |
| 2134 | "descr iption": " ", | |
| 2135 | "item" : [ | |
| 2136 | { | |
| 2137 | "name": "S tudyApprov als - All" , | |
| 2138 | "event": [ | |
| 2139 | { | |
| 2140 | "lis ten": "tes t", | |
| 2141 | "scr ipt": { | |
| 2142 | "type" : "text/ja vascript", | |
| 2143 | "exec" : [ | |
| 2144 | "//meta tests", | |
| 2145 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 2146 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 2147 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 2148 | "", | |
| 2149 | "//don't run these json test s if we do n't get js on back :( ", | |
| 2150 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 2151 | " ", | |
| 2152 | " var schema = {", | |
| 2153 | " \" items\": { ", | |
| 2154 | " \"respon se\": \"ar ray\",", | |
| 2155 | " \"succes s\": \"boo lean\",", | |
| 2156 | " \"messag e\": \"str ing\"", | |
| 2157 | " }", | |
| 2158 | " };" , | |
| 2159 | " ", | |
| 2160 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 2161 | " ", | |
| 2162 | " if (tv4.error ) {", | |
| 2163 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 2164 | " }", | |
| 2165 | " ", | |
| 2166 | " var jsonData = JSON.par se(respons eBody);", | |
| 2167 | " ", | |
| 2168 | " //i f success is true we have some response data", | |
| 2169 | " if (jsonData. success == = true) {" , | |
| 2170 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 2171 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 2172 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 2173 | " " , | |
| 2174 | " / /single re sult, retu rn just th e object", | |
| 2175 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 2176 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 2177 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 2178 | " } else if ( jsonData.r esponse) { ", | |
| 2179 | " //multi ple result s, return an array o f objects" , | |
| 2180 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 2181 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 2182 | " } ", | |
| 2183 | " " , | |
| 2184 | " / /make sure this is a n array si nce it can return ju st one rec ord as an object", | |
| 2185 | " i f (!Array. isArray(js onData.res ponse)) {" , | |
| 2186 | " jsonData. response = [jsonData .response] ; ", | |
| 2187 | " } ", | |
| 2188 | " " , | |
| 2189 | " / /tests spe cific to t his API en dpoint", | |
| 2190 | " f or (var i in jsonDat a.response ) {", | |
| 2191 | " if (i > 1 0) { break ; }", | |
| 2192 | " console.l og(i, stud yApproval) ;", | |
| 2193 | " var study Approval = jsonData. response[i ];", | |
| 2194 | "", | |
| 2195 | " tests[\"s tudyApprov al \" + i + \" has a n id field \"] = (stu dyApproval .id !== un defined) ? true : fa lse;", | |
| 2196 | " tests[\"s tudyApprov al \" + i + \" id is an intege r\"] = (st udyApprova l.id !== u ndefined) ? typeof s tudyApprov al.id === 'number' : false;", | |
| 2197 | " ", | |
| 2198 | " tests[\"s tudyApprov al \" + i + \" has a title fie ld\"] = (s tudyApprov al.title ! == undefin ed) ? true : false;" , | |
| 2199 | " 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;", | |
| 2200 | " ", | |
| 2201 | " tests[\"s tudyApprov al \" + i + \" has a descript ion field\ "] = (stud yApproval. descriptio n !== unde fined) ? t rue : fals e;", | |
| 2202 | " 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;", | |
| 2203 | " ", | |
| 2204 | " tests[\"s tudyApprov al \" + i + \" has a createdOn field\"] = (studyAp proval.cre atedOn !== undefined ) ? true : false;", | |
| 2205 | " tests[\"s tudyApprov al \" + i + \" creat edOn is a number\"] = (studyAp proval.cre atedOn !== undefined ) ? typeof studyAppr oval.creat edOn === ' number' : false;", | |
| 2206 | " ", | |
| 2207 | " tests[\"s tudyApprov al \" + i + \" has a createdBy field\"] = (studyAp proval.cre atedBy !== undefined ) ? true : false;", | |
| 2208 | " tests[\"s tudyApprov al \" + i + \" creat edBy is a string\"] = (studyAp proval.cre atedBy !== undefined ) ? typeof studyAppr oval.creat edBy === ' string' : false;", | |
| 2209 | " ", | |
| 2210 | " tests[\"s tudyApprov al \" + i + \" has a obtained field\"] = (studyApp roval.obta ined !== u ndefined) ? true : f alse;", | |
| 2211 | " 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;", | |
| 2212 | " ", | |
| 2213 | " tests[\"s tudyApprov al \" + i + \" has a n associat edApproval s field\"] = (studyA pproval.as sociatedAp provals != = undefine d) ? true : false;", | |
| 2214 | " 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 ;", | |
| 2215 | " } ", | |
| 2216 | " } e lse {", | |
| 2217 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 2218 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 2219 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 2220 | " }", | |
| 2221 | "} else {", | |
| 2222 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 2223 | "}" | |
| 2224 | ] | |
| 2225 | } | |
| 2226 | } | |
| 2227 | ], | |
| 2228 | "request": { | |
| 2229 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/studyAp provals", | |
| 2230 | "m ethod": "G ET", | |
| 2231 | "h eader": [ | |
| 2232 | { | |
| 2233 | "key": "Content- Type", | |
| 2234 | "value ": "applic ation/json ", | |
| 2235 | "descr iption": " " | |
| 2236 | }, | |
| 2237 | { | |
| 2238 | "key": "Accept-E ncoding", | |
| 2239 | "value ": "applic ation/json ", | |
| 2240 | "descr iption": " " | |
| 2241 | } | |
| 2242 | ], | |
| 2243 | "b ody": { | |
| 2244 | "mod e": "raw", | |
| 2245 | "raw ": "" | |
| 2246 | }, | |
| 2247 | "d escription ": "retrie ve all stu dy approva ls" | |
| 2248 | }, | |
| 2249 | "response" : [] | |
| 2250 | }, | |
| 2251 | { | |
| 2252 | "name": "S tudyApprov als - By I D", | |
| 2253 | "event": [ | |
| 2254 | { | |
| 2255 | "lis ten": "tes t", | |
| 2256 | "scr ipt": { | |
| 2257 | "type" : "text/ja vascript", | |
| 2258 | "exec" : [ | |
| 2259 | "//meta tests", | |
| 2260 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 2261 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 2262 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 2263 | "", | |
| 2264 | "//don't run these json test s if we do n't get js on back :( ", | |
| 2265 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 2266 | " ", | |
| 2267 | " var schema = {", | |
| 2268 | " \" items\": { ", | |
| 2269 | " \"respon se\": \"ar ray\",", | |
| 2270 | " \"succes s\": \"boo lean\",", | |
| 2271 | " \"messag e\": \"str ing\"", | |
| 2272 | " }", | |
| 2273 | " };" , | |
| 2274 | " ", | |
| 2275 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 2276 | " ", | |
| 2277 | " if (tv4.error ) {", | |
| 2278 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 2279 | " }", | |
| 2280 | " ", | |
| 2281 | " var jsonData = JSON.par se(respons eBody);", | |
| 2282 | " ", | |
| 2283 | " //i f success is true we have some response data", | |
| 2284 | " if (jsonData. success == = true) {" , | |
| 2285 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 2286 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 2287 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 2288 | " " , | |
| 2289 | " / /single re sult, retu rn just th e object", | |
| 2290 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 2291 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 2292 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 2293 | " } else if ( jsonData.r esponse) { ", | |
| 2294 | " //multi ple result s, return an array o f objects" , | |
| 2295 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 2296 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 2297 | " } ", | |
| 2298 | " " , | |
| 2299 | " / /specific to this en dpoint", | |
| 2300 | " 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;", | |
| 2301 | " " , | |
| 2302 | " } e lse {", | |
| 2303 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 2304 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 2305 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 2306 | " }", | |
| 2307 | "} else {", | |
| 2308 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 2309 | "}" | |
| 2310 | ] | |
| 2311 | } | |
| 2312 | } | |
| 2313 | ], | |
| 2314 | "request": { | |
| 2315 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/studyAp provals/1" , | |
| 2316 | "m ethod": "G ET", | |
| 2317 | "h eader": [ | |
| 2318 | { | |
| 2319 | "key": "Content- Type", | |
| 2320 | "value ": "applic ation/json ", | |
| 2321 | "descr iption": " " | |
| 2322 | }, | |
| 2323 | { | |
| 2324 | "key": "Accept-E ncoding", | |
| 2325 | "value ": "applic ation/json ", | |
| 2326 | "descr iption": " " | |
| 2327 | } | |
| 2328 | ], | |
| 2329 | "b ody": { | |
| 2330 | "mod e": "raw", | |
| 2331 | "raw ": "" | |
| 2332 | }, | |
| 2333 | "d escription ": "retrie ve a speci fic study approval" | |
| 2334 | }, | |
| 2335 | "response" : [] | |
| 2336 | }, | |
| 2337 | { | |
| 2338 | "name": "S tudyApprov als - By U ser", | |
| 2339 | "event": [ | |
| 2340 | { | |
| 2341 | "lis ten": "tes t", | |
| 2342 | "scr ipt": { | |
| 2343 | "type" : "text/ja vascript", | |
| 2344 | "exec" : [ | |
| 2345 | "//meta tests", | |
| 2346 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 2347 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 2348 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 2349 | "", | |
| 2350 | "//don't run these json test s if we do n't get js on back :( ", | |
| 2351 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 2352 | " ", | |
| 2353 | " var schema = {", | |
| 2354 | " \" items\": { ", | |
| 2355 | " \"respon se\": \"ar ray\",", | |
| 2356 | " \"succes s\": \"boo lean\",", | |
| 2357 | " \"messag e\": \"str ing\"", | |
| 2358 | " }", | |
| 2359 | " };" , | |
| 2360 | " ", | |
| 2361 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 2362 | " ", | |
| 2363 | " if (tv4.error ) {", | |
| 2364 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 2365 | " }", | |
| 2366 | " var jsonData = JSON.par se(respons eBody);", | |
| 2367 | " ", | |
| 2368 | " //i f success is true we have some response data", | |
| 2369 | " if (jsonData. success == = true) {" , | |
| 2370 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 2371 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 2372 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 2373 | " " , | |
| 2374 | " / /single re sult, retu rn just th e object", | |
| 2375 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 2376 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 2377 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 2378 | " } else if ( jsonData.r esponse) { ", | |
| 2379 | " //multi ple result s, return an array o f objects" , | |
| 2380 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 2381 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 2382 | " } ", | |
| 2383 | " " , | |
| 2384 | " / /make sure this is a n array si nce it can return ju st one rec ord as an object", | |
| 2385 | " i f (!Array. isArray(js onData.res ponse)) {" , | |
| 2386 | " jsonData. response = [jsonData .response] ; ", | |
| 2387 | " } ", | |
| 2388 | " " , | |
| 2389 | " / /tests spe cific to t his API ca ll", | |
| 2390 | " f or (var i in jsonDat a.response ) {", | |
| 2391 | " if (i > 1 0) { break ; }", | |
| 2392 | " var study Approval = jsonData. response[i ];", | |
| 2393 | " tests[\"s tudyApprov al \" + i + \" creat edBy = res earcher1\" ] = studyA pproval.cr eatedBy == = 'researc her1';", | |
| 2394 | " } ", | |
| 2395 | " " , | |
| 2396 | " } e lse {", | |
| 2397 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 2398 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 2399 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 2400 | " }", | |
| 2401 | "} else {", | |
| 2402 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 2403 | "}" | |
| 2404 | ] | |
| 2405 | } | |
| 2406 | } | |
| 2407 | ], | |
| 2408 | "request": { | |
| 2409 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/studyAp provals/re searcher1/ createdBy" , | |
| 2410 | "m ethod": "G ET", | |
| 2411 | "h eader": [ | |
| 2412 | { | |
| 2413 | "key": "Content- Type", | |
| 2414 | "value ": "applic ation/json ", | |
| 2415 | "descr iption": " " | |
| 2416 | }, | |
| 2417 | { | |
| 2418 | "key": "Accept-E ncoding", | |
| 2419 | "value ": "applic ation/json ", | |
| 2420 | "descr iption": " " | |
| 2421 | } | |
| 2422 | ], | |
| 2423 | "b ody": { | |
| 2424 | "mod e": "raw", | |
| 2425 | "raw ": "" | |
| 2426 | }, | |
| 2427 | "d escription ": "retrie ve all stu dy approva ls created by a spec ific user" | |
| 2428 | }, | |
| 2429 | "response" : [] | |
| 2430 | }, | |
| 2431 | { | |
| 2432 | "name": "S tudyApprov als - Crea te", | |
| 2433 | "event": [ | |
| 2434 | { | |
| 2435 | "lis ten": "tes t", | |
| 2436 | "scr ipt": { | |
| 2437 | "type" : "text/ja vascript", | |
| 2438 | "exec" : [ | |
| 2439 | "//meta tests", | |
| 2440 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 2441 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 2442 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 2443 | "", | |
| 2444 | "//don't run these json test s if we do n't get js on back :( ", | |
| 2445 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 2446 | " ", | |
| 2447 | " var schema = {", | |
| 2448 | " \" items\": { ", | |
| 2449 | " \"respon se\": \"ar ray\",", | |
| 2450 | " \"succes s\": \"boo lean\",", | |
| 2451 | " \"messag e\": \"str ing\"", | |
| 2452 | " }", | |
| 2453 | " };" , | |
| 2454 | " ", | |
| 2455 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 2456 | " ", | |
| 2457 | " if (tv4.error ) {", | |
| 2458 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 2459 | " }", | |
| 2460 | " var jsonData = JSON.par se(respons eBody);", | |
| 2461 | " ", | |
| 2462 | " //i f success is true we have some response data", | |
| 2463 | " if (jsonData. success == = true) {" , | |
| 2464 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 2465 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 2466 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 2467 | " " , | |
| 2468 | " / /single re sult, retu rn just th e object", | |
| 2469 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 2470 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 2471 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 2472 | " } else if ( jsonData.r esponse) { ", | |
| 2473 | " //multi ple result s, return an array o f objects" , | |
| 2474 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 2475 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 2476 | " } ", | |
| 2477 | " } e lse {", | |
| 2478 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 2479 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 2480 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 2481 | " }", | |
| 2482 | "} else {", | |
| 2483 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 2484 | "}" | |
| 2485 | ] | |
| 2486 | } | |
| 2487 | } | |
| 2488 | ], | |
| 2489 | "request": { | |
| 2490 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/studyAp provals", | |
| 2491 | "m ethod": "P OST", | |
| 2492 | "h eader": [ | |
| 2493 | { | |
| 2494 | "key": "Content- Type", | |
| 2495 | "value ": "applic ation/json ", | |
| 2496 | "descr iption": " " | |
| 2497 | }, | |
| 2498 | { | |
| 2499 | "key": "Accept-E ncoding", | |
| 2500 | "value ": "applic ation/json ", | |
| 2501 | "descr iption": " " | |
| 2502 | } | |
| 2503 | ], | |
| 2504 | "b ody": { | |
| 2505 | "mod e": "raw", | |
| 2506 | "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\": [],\n\t\"c reatedBy\" : \"resear cher1\"\n} " | |
| 2507 | }, | |
| 2508 | "d escription ": "create a study a pproval" | |
| 2509 | }, | |
| 2510 | "response" : [] | |
| 2511 | }, | |
| 2512 | { | |
| 2513 | "name": "S tudyApprov als - Asso ciate User ", | |
| 2514 | "event": [ | |
| 2515 | { | |
| 2516 | "lis ten": "tes t", | |
| 2517 | "scr ipt": { | |
| 2518 | "type" : "text/ja vascript", | |
| 2519 | "exec" : [ | |
| 2520 | "//meta tests", | |
| 2521 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 2522 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 2523 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 2524 | "", | |
| 2525 | "//don't run these json test s if we do n't get js on back :( ", | |
| 2526 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 2527 | " ", | |
| 2528 | " var schema = {", | |
| 2529 | " \" items\": { ", | |
| 2530 | " \"respon se\": \"ar ray\",", | |
| 2531 | " \"succes s\": \"boo lean\",", | |
| 2532 | " \"messag e\": \"str ing\"", | |
| 2533 | " }", | |
| 2534 | " };" , | |
| 2535 | " ", | |
| 2536 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 2537 | " ", | |
| 2538 | " if (tv4.error ) {", | |
| 2539 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 2540 | " }", | |
| 2541 | " var jsonData = JSON.par se(respons eBody);", | |
| 2542 | " ", | |
| 2543 | " //i f success is true we have some response data", | |
| 2544 | " if (jsonData. success == = true) {" , | |
| 2545 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 2546 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 2547 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 2548 | " " , | |
| 2549 | " / /single re sult, retu rn just th e object", | |
| 2550 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 2551 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 2552 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 2553 | " } else if ( jsonData.r esponse) { ", | |
| 2554 | " //multi ple result s, return an array o f objects" , | |
| 2555 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 2556 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 2557 | " } ", | |
| 2558 | " } e lse {", | |
| 2559 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 2560 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 2561 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 2562 | " }", | |
| 2563 | "} else {", | |
| 2564 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 2565 | "}" | |
| 2566 | ] | |
| 2567 | } | |
| 2568 | } | |
| 2569 | ], | |
| 2570 | "request": { | |
| 2571 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/studyAp provals/1/ associatio n", | |
| 2572 | "m ethod": "P OST", | |
| 2573 | "h eader": [ | |
| 2574 | { | |
| 2575 | "key": "Content- Type", | |
| 2576 | "value ": "applic ation/json ", | |
| 2577 | "descr iption": " " | |
| 2578 | }, | |
| 2579 | { | |
| 2580 | "key": "Accept-E ncoding", | |
| 2581 | "value ": "applic ation/json ", | |
| 2582 | "descr iption": " " | |
| 2583 | } | |
| 2584 | ], | |
| 2585 | "b ody": { | |
| 2586 | "mod e": "raw", | |
| 2587 | "raw ": "{\n\t\ "user\": \ "researche r1\",\n\t\ "createdBy \": \"data manager1\" \n}" | |
| 2588 | }, | |
| 2589 | "d escription ": "associ ate a user to a stud y" | |
| 2590 | }, | |
| 2591 | "response" : [] | |
| 2592 | }, | |
| 2593 | { | |
| 2594 | "name": "S tudyApprov als - Upda te", | |
| 2595 | "event": [ | |
| 2596 | { | |
| 2597 | "lis ten": "tes t", | |
| 2598 | "scr ipt": { | |
| 2599 | "type" : "text/ja vascript", | |
| 2600 | "exec" : [ | |
| 2601 | "//meta tests", | |
| 2602 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 2603 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 2604 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 2605 | "", | |
| 2606 | "//don't run these json test s if we do n't get js on back :( ", | |
| 2607 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 2608 | " ", | |
| 2609 | " var schema = {", | |
| 2610 | " \" items\": { ", | |
| 2611 | " \"respon se\": \"ar ray\",", | |
| 2612 | " \"succes s\": \"boo lean\",", | |
| 2613 | " \"messag e\": \"str ing\"", | |
| 2614 | " }", | |
| 2615 | " };" , | |
| 2616 | " ", | |
| 2617 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 2618 | " ", | |
| 2619 | " if (tv4.error ) {", | |
| 2620 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 2621 | " }", | |
| 2622 | " var jsonData = JSON.par se(respons eBody);", | |
| 2623 | " ", | |
| 2624 | " //i f success is true we have some response data", | |
| 2625 | " if (jsonData. success == = true) {" , | |
| 2626 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 2627 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 2628 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 2629 | " " , | |
| 2630 | " / /single re sult, retu rn just th e object", | |
| 2631 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 2632 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 2633 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 2634 | " } else if ( jsonData.r esponse) { ", | |
| 2635 | " //multi ple result s, return an array o f objects" , | |
| 2636 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 2637 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 2638 | " } ", | |
| 2639 | " } e lse {", | |
| 2640 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 2641 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 2642 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 2643 | " }", | |
| 2644 | "} else {", | |
| 2645 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 2646 | "}" | |
| 2647 | ] | |
| 2648 | } | |
| 2649 | } | |
| 2650 | ], | |
| 2651 | "request": { | |
| 2652 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/studyAp provals/1" , | |
| 2653 | "m ethod": "P UT", | |
| 2654 | "h eader": [ | |
| 2655 | { | |
| 2656 | "key": "Content- Type", | |
| 2657 | "value ": "applic ation/json ", | |
| 2658 | "descr iption": " " | |
| 2659 | }, | |
| 2660 | { | |
| 2661 | "key": "Accept-E ncoding", | |
| 2662 | "value ": "applic ation/json ", | |
| 2663 | "descr iption": " " | |
| 2664 | } | |
| 2665 | ], | |
| 2666 | "b ody": { | |
| 2667 | "mod e": "raw", | |
| 2668 | "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} " | |
| 2669 | }, | |
| 2670 | "d escription ": "create a study a pproval" | |
| 2671 | }, | |
| 2672 | "response" : [] | |
| 2673 | }, | |
| 2674 | { | |
| 2675 | "name": "S tudyApprov als - Dele te", | |
| 2676 | "event": [ | |
| 2677 | { | |
| 2678 | "lis ten": "tes t", | |
| 2679 | "scr ipt": { | |
| 2680 | "type" : "text/ja vascript", | |
| 2681 | "exec" : [ | |
| 2682 | "//meta tests", | |
| 2683 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 2684 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 2685 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 2686 | "", | |
| 2687 | "//don't run these json test s if we do n't get js on back :( ", | |
| 2688 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 2689 | " ", | |
| 2690 | " var schema = {", | |
| 2691 | " \" items\": { ", | |
| 2692 | " \"respon se\": \"ar ray\",", | |
| 2693 | " \"succes s\": \"boo lean\",", | |
| 2694 | " \"messag e\": \"str ing\"", | |
| 2695 | " }", | |
| 2696 | " };" , | |
| 2697 | " ", | |
| 2698 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 2699 | " ", | |
| 2700 | " if (tv4.error ) {", | |
| 2701 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 2702 | " }", | |
| 2703 | " var jsonData = JSON.par se(respons eBody);", | |
| 2704 | " ", | |
| 2705 | " //i f success is true we have some response data", | |
| 2706 | " if (jsonData. success == = true) {" , | |
| 2707 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 2708 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 2709 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 2710 | " " , | |
| 2711 | " / /single re sult, retu rn just th e object", | |
| 2712 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 2713 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 2714 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 2715 | " } else if ( jsonData.r esponse) { ", | |
| 2716 | " //multi ple result s, return an array o f objects" , | |
| 2717 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 2718 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 2719 | " } ", | |
| 2720 | " } e lse {", | |
| 2721 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 2722 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 2723 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 2724 | " }", | |
| 2725 | "} else {", | |
| 2726 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 2727 | "}" | |
| 2728 | ] | |
| 2729 | } | |
| 2730 | } | |
| 2731 | ], | |
| 2732 | "request": { | |
| 2733 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/studyAp provals/1" , | |
| 2734 | "m ethod": "D ELETE", | |
| 2735 | "h eader": [ | |
| 2736 | { | |
| 2737 | "key": "Content- Type", | |
| 2738 | "value ": "applic ation/json ", | |
| 2739 | "descr iption": " " | |
| 2740 | }, | |
| 2741 | { | |
| 2742 | "key": "Accept-E ncoding", | |
| 2743 | "value ": "applic ation/json ", | |
| 2744 | "descr iption": " " | |
| 2745 | } | |
| 2746 | ], | |
| 2747 | "b ody": { | |
| 2748 | "mod e": "raw", | |
| 2749 | "raw ": "" | |
| 2750 | }, | |
| 2751 | "d escription ": "delete a study a pproval" | |
| 2752 | }, | |
| 2753 | "response" : [] | |
| 2754 | }, | |
| 2755 | { | |
| 2756 | "name": "S tudyApprov als - Unas sociate Us er", | |
| 2757 | "event": [ | |
| 2758 | { | |
| 2759 | "lis ten": "tes t", | |
| 2760 | "scr ipt": { | |
| 2761 | "type" : "text/ja vascript", | |
| 2762 | "exec" : [ | |
| 2763 | "//meta tests", | |
| 2764 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 2765 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 2766 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 2767 | "", | |
| 2768 | "//don't run these json test s if we do n't get js on back :( ", | |
| 2769 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 2770 | " ", | |
| 2771 | " var schema = {", | |
| 2772 | " \" items\": { ", | |
| 2773 | " \"respon se\": \"ar ray\",", | |
| 2774 | " \"succes s\": \"boo lean\",", | |
| 2775 | " \"messag e\": \"str ing\"", | |
| 2776 | " }", | |
| 2777 | " };" , | |
| 2778 | " ", | |
| 2779 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 2780 | " ", | |
| 2781 | " if (tv4.error ) {", | |
| 2782 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 2783 | " }", | |
| 2784 | " var jsonData = JSON.par se(respons eBody);", | |
| 2785 | " ", | |
| 2786 | " //i f success is true we have some response data", | |
| 2787 | " if (jsonData. success == = true) {" , | |
| 2788 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 2789 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 2790 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 2791 | " " , | |
| 2792 | " / /single re sult, retu rn just th e object", | |
| 2793 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 2794 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 2795 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 2796 | " } else if ( jsonData.r esponse) { ", | |
| 2797 | " //multi ple result s, return an array o f objects" , | |
| 2798 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 2799 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 2800 | " } ", | |
| 2801 | " } e lse {", | |
| 2802 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 2803 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 2804 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 2805 | " }", | |
| 2806 | "} else {", | |
| 2807 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 2808 | "}" | |
| 2809 | ] | |
| 2810 | } | |
| 2811 | } | |
| 2812 | ], | |
| 2813 | "request": { | |
| 2814 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/studyAp provals/1/ associatio n", | |
| 2815 | "m ethod": "D ELETE", | |
| 2816 | "h eader": [ | |
| 2817 | { | |
| 2818 | "key": "Content- Type", | |
| 2819 | "value ": "applic ation/json ", | |
| 2820 | "descr iption": " " | |
| 2821 | }, | |
| 2822 | { | |
| 2823 | "key": "Accept-E ncoding", | |
| 2824 | "value ": "applic ation/json ", | |
| 2825 | "descr iption": " " | |
| 2826 | } | |
| 2827 | ], | |
| 2828 | "b ody": { | |
| 2829 | "mod e": "raw", | |
| 2830 | "raw ": "{\n\t\ "user\": \ "researche r1\",\n\t\ "createdby \": \"data manager1\" \n}" | |
| 2831 | }, | |
| 2832 | "d escription ": "Remove a user as sociation from a stu dy approva l" | |
| 2833 | }, | |
| 2834 | "response" : [] | |
| 2835 | } | |
| 2836 | ] | |
| 2837 | }, | |
| 2838 | { | |
| 2839 | "name" : "Users", | |
| 2840 | "descr iption": " ", | |
| 2841 | "item" : [ | |
| 2842 | { | |
| 2843 | "name": "U sers - All ", | |
| 2844 | "event": [ | |
| 2845 | { | |
| 2846 | "lis ten": "tes t", | |
| 2847 | "scr ipt": { | |
| 2848 | "type" : "text/ja vascript", | |
| 2849 | "exec" : [ | |
| 2850 | "//meta tests", | |
| 2851 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 2852 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 2853 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 2854 | "", | |
| 2855 | "//don't run these json test s if we do n't get js on back :( ", | |
| 2856 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 2857 | " ", | |
| 2858 | " var schema = {", | |
| 2859 | " \" items\": { ", | |
| 2860 | " \"respon se\": \"ar ray\",", | |
| 2861 | " \"succes s\": \"boo lean\",", | |
| 2862 | " \"messag e\": \"str ing\"", | |
| 2863 | " }", | |
| 2864 | " };" , | |
| 2865 | " ", | |
| 2866 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 2867 | " ", | |
| 2868 | " if (tv4.error ) {", | |
| 2869 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 2870 | " }", | |
| 2871 | " var jsonData = JSON.par se(respons eBody);", | |
| 2872 | " ", | |
| 2873 | " //i f success is true we have some response data", | |
| 2874 | " if (jsonData. success == = true) {" , | |
| 2875 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 2876 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 2877 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 2878 | " " , | |
| 2879 | " / /single re sult, retu rn just th e object", | |
| 2880 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 2881 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 2882 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 2883 | " } else if ( jsonData.r esponse) { ", | |
| 2884 | " //multi ple result s, return an array o f objects" , | |
| 2885 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 2886 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 2887 | " } ", | |
| 2888 | " } e lse {", | |
| 2889 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 2890 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 2891 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 2892 | " }", | |
| 2893 | "} else {", | |
| 2894 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 2895 | "}" | |
| 2896 | ] | |
| 2897 | } | |
| 2898 | } | |
| 2899 | ], | |
| 2900 | "request": { | |
| 2901 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/users", | |
| 2902 | "m ethod": "G ET", | |
| 2903 | "h eader": [ | |
| 2904 | { | |
| 2905 | "key": "Content- Type", | |
| 2906 | "value ": "applic ation/json ", | |
| 2907 | "descr iption": " " | |
| 2908 | }, | |
| 2909 | { | |
| 2910 | "key": "Accept-E ncoding", | |
| 2911 | "value ": "applic ation/json ", | |
| 2912 | "descr iption": " " | |
| 2913 | } | |
| 2914 | ], | |
| 2915 | "b ody": { | |
| 2916 | "mod e": "formd ata", | |
| 2917 | "for mdata": [ | |
| 2918 | { | |
| 2919 | "key": " email", | |
| 2920 | "value": "ge", | |
| 2921 | "type": "text", | |
| 2922 | "enabled ": true | |
| 2923 | }, | |
| 2924 | { | |
| 2925 | "key": " password", | |
| 2926 | "value": " PW ", | |
| 2927 | "type": "text", | |
| 2928 | "enabled ": true | |
| 2929 | } | |
| 2930 | ] | |
| 2931 | }, | |
| 2932 | "d escription ": "retrie ve all use r data" | |
| 2933 | }, | |
| 2934 | "response" : [] | |
| 2935 | }, | |
| 2936 | { | |
| 2937 | "name": "U sers - By ID", | |
| 2938 | "event": [ | |
| 2939 | { | |
| 2940 | "lis ten": "tes t", | |
| 2941 | "scr ipt": { | |
| 2942 | "type" : "text/ja vascript", | |
| 2943 | "exec" : [ | |
| 2944 | "//meta tests", | |
| 2945 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 2946 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 2947 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 2948 | "", | |
| 2949 | "//don't run these json test s if we do n't get js on back :( ", | |
| 2950 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 2951 | " ", | |
| 2952 | " var schema = {", | |
| 2953 | " \" items\": { ", | |
| 2954 | " \"respon se\": \"ar ray\",", | |
| 2955 | " \"succes s\": \"boo lean\",", | |
| 2956 | " \"messag e\": \"str ing\"", | |
| 2957 | " }", | |
| 2958 | " };" , | |
| 2959 | " ", | |
| 2960 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 2961 | " ", | |
| 2962 | " if (tv4.error ) {", | |
| 2963 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 2964 | " }", | |
| 2965 | " var jsonData = JSON.par se(respons eBody);", | |
| 2966 | " ", | |
| 2967 | " //i f success is true we have some response data", | |
| 2968 | " if (jsonData. success == = true) {" , | |
| 2969 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 2970 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 2971 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 2972 | " " , | |
| 2973 | " / /single re sult, retu rn just th e object", | |
| 2974 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 2975 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 2976 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 2977 | " } else if ( jsonData.r esponse) { ", | |
| 2978 | " //multi ple result s, return an array o f objects" , | |
| 2979 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 2980 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 2981 | " } ", | |
| 2982 | " " , | |
| 2983 | " / /specific to this en dpoint", | |
| 2984 | " t ests[\"stu dyApproval has this ID\"] = (j sonData.re sponse[0]. id !== und efined) ? jsonData.r esponse[0] .id === 1 : false;", | |
| 2985 | " " , | |
| 2986 | " } e lse {", | |
| 2987 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 2988 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 2989 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 2990 | " }", | |
| 2991 | "} else {", | |
| 2992 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 2993 | "}" | |
| 2994 | ] | |
| 2995 | } | |
| 2996 | } | |
| 2997 | ], | |
| 2998 | "request": { | |
| 2999 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/users/1 ", | |
| 3000 | "m ethod": "G ET", | |
| 3001 | "h eader": [ | |
| 3002 | { | |
| 3003 | "key": "Content- Type", | |
| 3004 | "value ": "applic ation/json ", | |
| 3005 | "descr iption": " " | |
| 3006 | }, | |
| 3007 | { | |
| 3008 | "key": "Accept-E ncoding", | |
| 3009 | "value ": "applic ation/json ", | |
| 3010 | "descr iption": " " | |
| 3011 | } | |
| 3012 | ], | |
| 3013 | "b ody": { | |
| 3014 | "mod e": "formd ata", | |
| 3015 | "for mdata": [ | |
| 3016 | { | |
| 3017 | "key": " email", | |
| 3018 | "value": "ge", | |
| 3019 | "type": "text", | |
| 3020 | "enabled ": true | |
| 3021 | }, | |
| 3022 | { | |
| 3023 | "key": " password", | |
| 3024 | "value": " PW ", | |
| 3025 | "type": "text", | |
| 3026 | "enabled ": true | |
| 3027 | } | |
| 3028 | ] | |
| 3029 | }, | |
| 3030 | "d escription ": "retrie ve all use r data" | |
| 3031 | }, | |
| 3032 | "response" : [] | |
| 3033 | }, | |
| 3034 | { | |
| 3035 | "name": "U sers - By Email", | |
| 3036 | "event": [ | |
| 3037 | { | |
| 3038 | "lis ten": "tes t", | |
| 3039 | "scr ipt": { | |
| 3040 | "type" : "text/ja vascript", | |
| 3041 | "exec" : [ | |
| 3042 | "//meta tests", | |
| 3043 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 3044 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 3045 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 3046 | "", | |
| 3047 | "//don't run these json test s if we do n't get js on back :( ", | |
| 3048 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 3049 | " ", | |
| 3050 | " var schema = {", | |
| 3051 | " \" items\": { ", | |
| 3052 | " \"respon se\": \"ar ray\",", | |
| 3053 | " \"succes s\": \"boo lean\",", | |
| 3054 | " \"messag e\": \"str ing\"", | |
| 3055 | " }", | |
| 3056 | " };" , | |
| 3057 | " ", | |
| 3058 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 3059 | " ", | |
| 3060 | " if (tv4.error ) {", | |
| 3061 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 3062 | " }", | |
| 3063 | " var jsonData = JSON.par se(respons eBody);", | |
| 3064 | " ", | |
| 3065 | " //i f success is true we have some response data", | |
| 3066 | " if (jsonData. success == = true) {" , | |
| 3067 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 3068 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 3069 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 3070 | " " , | |
| 3071 | " / /single re sult, retu rn just th e object", | |
| 3072 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 3073 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 3074 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 3075 | " } else if ( jsonData.r esponse) { ", | |
| 3076 | " //multi ple result s, return an array o f objects" , | |
| 3077 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 3078 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 3079 | " } ", | |
| 3080 | " " , | |
| 3081 | " / /specific to this en dpoint", | |
| 3082 | " t ests[\"use r has this email\"] = (jsonDat a.response .email !== undefined ) ? jsonDa ta.respons e.email == = \"genisi sresearche r1@gmail.c om\" : fal se;", | |
| 3083 | " } e lse {", | |
| 3084 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 3085 | " t ests[\"mes sage === N o records found.\"] = json.mes sage === \ "No record s found.\" ;", | |
| 3086 | " t ests[\"suc cess === f alse\"] = json.succe ss === fal se;", | |
| 3087 | " }", | |
| 3088 | "} else {", | |
| 3089 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 3090 | "}" | |
| 3091 | ] | |
| 3092 | } | |
| 3093 | } | |
| 3094 | ], | |
| 3095 | "request": { | |
| 3096 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/users/g enisisrese archer1@gm ail.com/em ail", | |
| 3097 | "m ethod": "G ET", | |
| 3098 | "h eader": [ | |
| 3099 | { | |
| 3100 | "key": "Content- Type", | |
| 3101 | "value ": "applic ation/json ", | |
| 3102 | "descr iption": " " | |
| 3103 | }, | |
| 3104 | { | |
| 3105 | "key": "Accept-E ncoding", | |
| 3106 | "value ": "applic ation/json ", | |
| 3107 | "descr iption": " " | |
| 3108 | } | |
| 3109 | ], | |
| 3110 | "b ody": { | |
| 3111 | "mod e": "formd ata", | |
| 3112 | "for mdata": [ | |
| 3113 | { | |
| 3114 | "key": " email", | |
| 3115 | "value": "ge", | |
| 3116 | "type": "text", | |
| 3117 | "enabled ": true | |
| 3118 | }, | |
| 3119 | { | |
| 3120 | "key": " password", | |
| 3121 | "value": " PW ", | |
| 3122 | "type": "text", | |
| 3123 | "enabled ": true | |
| 3124 | } | |
| 3125 | ] | |
| 3126 | }, | |
| 3127 | "d escription ": "retrie ve user da ta for a s ingle user by email address" | |
| 3128 | }, | |
| 3129 | "response" : [] | |
| 3130 | }, | |
| 3131 | { | |
| 3132 | "name": "U sers - Not ifications ", | |
| 3133 | "event": [ | |
| 3134 | { | |
| 3135 | "lis ten": "tes t", | |
| 3136 | "scr ipt": { | |
| 3137 | "type" : "text/ja vascript", | |
| 3138 | "exec" : [ | |
| 3139 | "//meta tests", | |
| 3140 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 3141 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 3142 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 3143 | "", | |
| 3144 | "//don't run these json test s if we do n't get js on back :( ", | |
| 3145 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 3146 | " ", | |
| 3147 | " var schema = {", | |
| 3148 | " \" items\": { ", | |
| 3149 | " \"respon se\": \"ar ray\",", | |
| 3150 | " \"succes s\": \"boo lean\",", | |
| 3151 | " \"messag e\": \"str ing\"", | |
| 3152 | " }", | |
| 3153 | " };" , | |
| 3154 | " ", | |
| 3155 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 3156 | " ", | |
| 3157 | " if (tv4.error ) {", | |
| 3158 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 3159 | " }", | |
| 3160 | " var jsonData = JSON.par se(respons eBody);", | |
| 3161 | " ", | |
| 3162 | " //i f success is true we have some response data", | |
| 3163 | " if (jsonData. success == = true) {" , | |
| 3164 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 3165 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 3166 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 3167 | " " , | |
| 3168 | " / /single re sult, retu rn just th e object", | |
| 3169 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 3170 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 3171 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 3172 | " } else if ( jsonData.r esponse) { ", | |
| 3173 | " //multi ple result s, return an array o f objects" , | |
| 3174 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 3175 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 3176 | " } ", | |
| 3177 | " " , | |
| 3178 | " / /make sure this is a n array si nce it can return ju st one rec ord as an object", | |
| 3179 | " i f (!Array. isArray(js onData.res ponse)) {" , | |
| 3180 | " jsonData. response = [jsonData .response] ; ", | |
| 3181 | " } ", | |
| 3182 | " " , | |
| 3183 | " / /specific to this en dpoint", | |
| 3184 | " t ests[\"not ification has this I D\"] = (js onData.res ponse[0].i d !== unde fined) ? j sonData.re sponse[0]. id === 1 : false;", | |
| 3185 | " " , | |
| 3186 | " } e lse {", | |
| 3187 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 3188 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 3189 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 3190 | " }", | |
| 3191 | "} else {", | |
| 3192 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 3193 | "}" | |
| 3194 | ] | |
| 3195 | } | |
| 3196 | } | |
| 3197 | ], | |
| 3198 | "request": { | |
| 3199 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/users/1 /notificat ions", | |
| 3200 | "m ethod": "G ET", | |
| 3201 | "h eader": [ | |
| 3202 | { | |
| 3203 | "key": "Content- Type", | |
| 3204 | "value ": "applic ation/json ", | |
| 3205 | "descr iption": " " | |
| 3206 | }, | |
| 3207 | { | |
| 3208 | "key": "Accept-E ncoding", | |
| 3209 | "value ": "applic ation/json ", | |
| 3210 | "descr iption": " " | |
| 3211 | } | |
| 3212 | ], | |
| 3213 | "b ody": { | |
| 3214 | "mod e": "formd ata", | |
| 3215 | "for mdata": [ | |
| 3216 | { | |
| 3217 | "key": " email", | |
| 3218 | "value": "ge", | |
| 3219 | "type": "text", | |
| 3220 | "enabled ": true | |
| 3221 | }, | |
| 3222 | { | |
| 3223 | "key": " password", | |
| 3224 | "value": " PW ", | |
| 3225 | "type": "text", | |
| 3226 | "enabled ": true | |
| 3227 | } | |
| 3228 | ] | |
| 3229 | }, | |
| 3230 | "d escription ": "retrie ve all use r notifica tions give n the user 's ID numb er" | |
| 3231 | }, | |
| 3232 | "response" : [] | |
| 3233 | }, | |
| 3234 | { | |
| 3235 | "name": "U sers - Act ion Items" , | |
| 3236 | "event": [ | |
| 3237 | { | |
| 3238 | "lis ten": "tes t", | |
| 3239 | "scr ipt": { | |
| 3240 | "type" : "text/ja vascript", | |
| 3241 | "exec" : [ | |
| 3242 | "//meta tests", | |
| 3243 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 3244 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 3245 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 3246 | "", | |
| 3247 | "//don't run these json test s if we do n't get js on back :( ", | |
| 3248 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 3249 | " ", | |
| 3250 | " var schema = {", | |
| 3251 | " \" items\": { ", | |
| 3252 | " \"respon se\": \"ar ray\",", | |
| 3253 | " \"succes s\": \"boo lean\",", | |
| 3254 | " \"messag e\": \"str ing\"", | |
| 3255 | " }", | |
| 3256 | " };" , | |
| 3257 | " ", | |
| 3258 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 3259 | " ", | |
| 3260 | " if (tv4.error ) {", | |
| 3261 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 3262 | " }", | |
| 3263 | " var jsonData = JSON.par se(respons eBody);", | |
| 3264 | " ", | |
| 3265 | " //i f success is true we have some response data", | |
| 3266 | " if (jsonData. success == = true) {" , | |
| 3267 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 3268 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 3269 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 3270 | " " , | |
| 3271 | " / /single re sult, retu rn just th e object", | |
| 3272 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 3273 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 3274 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 3275 | " } else if ( jsonData.r esponse) { ", | |
| 3276 | " //multi ple result s, return an array o f objects" , | |
| 3277 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 3278 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 3279 | " } ", | |
| 3280 | " " , | |
| 3281 | " / /make sure this is a n array si nce it can return ju st one rec ord as an object", | |
| 3282 | " i f (!Array. isArray(js onData.res ponse)) {" , | |
| 3283 | " jsonData. response = [jsonData .response] ; ", | |
| 3284 | " } ", | |
| 3285 | " " , | |
| 3286 | " / /specific to this en dpoint", | |
| 3287 | " t ests[\"act ion item h as this ID \"] = (jso nData.resp onse[0].id !== undef ined) ? js onData.res ponse[0].i d === 1 : false;", | |
| 3288 | " " , | |
| 3289 | " } e lse {", | |
| 3290 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 3291 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 3292 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 3293 | " }", | |
| 3294 | "} else {", | |
| 3295 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 3296 | "}" | |
| 3297 | ] | |
| 3298 | } | |
| 3299 | } | |
| 3300 | ], | |
| 3301 | "request": { | |
| 3302 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/users/1 /actionIte ms", | |
| 3303 | "m ethod": "G ET", | |
| 3304 | "h eader": [ | |
| 3305 | { | |
| 3306 | "key": "Content- Type", | |
| 3307 | "value ": "applic ation/json ", | |
| 3308 | "descr iption": " " | |
| 3309 | }, | |
| 3310 | { | |
| 3311 | "key": "Accept-E ncoding", | |
| 3312 | "value ": "applic ation/json ", | |
| 3313 | "descr iption": " " | |
| 3314 | } | |
| 3315 | ], | |
| 3316 | "b ody": { | |
| 3317 | "mod e": "formd ata", | |
| 3318 | "for mdata": [ | |
| 3319 | { | |
| 3320 | "key": " email", | |
| 3321 | "value": "ge", | |
| 3322 | "type": "text", | |
| 3323 | "enabled ": true | |
| 3324 | }, | |
| 3325 | { | |
| 3326 | "key": " password", | |
| 3327 | "value": " PW ", | |
| 3328 | "type": "text", | |
| 3329 | "enabled ": true | |
| 3330 | } | |
| 3331 | ] | |
| 3332 | }, | |
| 3333 | "d escription ": "retrie ve all use r action i tems given the user' s ID numbe r" | |
| 3334 | }, | |
| 3335 | "response" : [] | |
| 3336 | }, | |
| 3337 | { | |
| 3338 | "name": "U sers - Cre ate", | |
| 3339 | "event": [ | |
| 3340 | { | |
| 3341 | "lis ten": "tes t", | |
| 3342 | "scr ipt": { | |
| 3343 | "type" : "text/ja vascript", | |
| 3344 | "exec" : [ | |
| 3345 | "//meta tests", | |
| 3346 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 3347 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 3348 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 3349 | "", | |
| 3350 | "//don't run these json test s if we do n't get js on back :( ", | |
| 3351 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 3352 | " ", | |
| 3353 | " var schema = {", | |
| 3354 | " \" items\": { ", | |
| 3355 | " \"respon se\": \"ar ray\",", | |
| 3356 | " \"succes s\": \"boo lean\",", | |
| 3357 | " \"messag e\": \"str ing\"", | |
| 3358 | " }", | |
| 3359 | " };" , | |
| 3360 | " ", | |
| 3361 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 3362 | " ", | |
| 3363 | " if (tv4.error ) {", | |
| 3364 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 3365 | " }", | |
| 3366 | " var jsonData = JSON.par se(respons eBody);", | |
| 3367 | " ", | |
| 3368 | " //i f success is true we have some response data", | |
| 3369 | " if (jsonData. success == = true) {" , | |
| 3370 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 3371 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 3372 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 3373 | " " , | |
| 3374 | " / /single re sult, retu rn just th e object", | |
| 3375 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 3376 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 3377 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 3378 | " } else if ( jsonData.r esponse) { ", | |
| 3379 | " //multi ple result s, return an array o f objects" , | |
| 3380 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 3381 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 3382 | " } ", | |
| 3383 | " } e lse {", | |
| 3384 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 3385 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 3386 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 3387 | " }", | |
| 3388 | "} else {", | |
| 3389 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 3390 | "}" | |
| 3391 | ] | |
| 3392 | } | |
| 3393 | } | |
| 3394 | ], | |
| 3395 | "request": { | |
| 3396 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/users", | |
| 3397 | "m ethod": "P OST", | |
| 3398 | "h eader": [ | |
| 3399 | { | |
| 3400 | "key": "Content- Type", | |
| 3401 | "value ": "applic ation/json ", | |
| 3402 | "descr iption": " " | |
| 3403 | }, | |
| 3404 | { | |
| 3405 | "key": "Accept-E ncoding", | |
| 3406 | "value ": "applic ation/json ", | |
| 3407 | "descr iption": " " | |
| 3408 | } | |
| 3409 | ], | |
| 3410 | "b ody": { | |
| 3411 | "mod e": "raw", | |
| 3412 | "raw ": "{\n\t\ "email\": \"myemail@ gmail.com\ ",\n\t\"fi rstName\": \"Test\", \n\t\"last Name\": \" Testerly\" ,\n\t\"rol e\": \"res earcher\", \n\t\"data manager\": \"dataman ager1\"\n} " | |
| 3413 | }, | |
| 3414 | "d escription ": "Create a new use r" | |
| 3415 | }, | |
| 3416 | "response" : [] | |
| 3417 | }, | |
| 3418 | { | |
| 3419 | "name": "U sers - Upd ate", | |
| 3420 | "event": [ | |
| 3421 | { | |
| 3422 | "lis ten": "tes t", | |
| 3423 | "scr ipt": { | |
| 3424 | "type" : "text/ja vascript", | |
| 3425 | "exec" : [ | |
| 3426 | "//meta tests", | |
| 3427 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 3428 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 3429 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 3430 | "", | |
| 3431 | "//don't run these json test s if we do n't get js on back :( ", | |
| 3432 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 3433 | " ", | |
| 3434 | " var schema = {", | |
| 3435 | " \" items\": { ", | |
| 3436 | " \"respon se\": \"ar ray\",", | |
| 3437 | " \"succes s\": \"boo lean\",", | |
| 3438 | " \"messag e\": \"str ing\"", | |
| 3439 | " }", | |
| 3440 | " };" , | |
| 3441 | " ", | |
| 3442 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 3443 | " ", | |
| 3444 | " if (tv4.error ) {", | |
| 3445 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 3446 | " }", | |
| 3447 | " var jsonData = JSON.par se(respons eBody);", | |
| 3448 | " ", | |
| 3449 | " //i f success is true we have some response data", | |
| 3450 | " if (jsonData. success == = true) {" , | |
| 3451 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 3452 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 3453 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 3454 | " " , | |
| 3455 | " / /single re sult, retu rn just th e object", | |
| 3456 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 3457 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 3458 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 3459 | " } else if ( jsonData.r esponse) { ", | |
| 3460 | " //multi ple result s, return an array o f objects" , | |
| 3461 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 3462 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 3463 | " } ", | |
| 3464 | " } e lse {", | |
| 3465 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 3466 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 3467 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 3468 | " }", | |
| 3469 | "} else {", | |
| 3470 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 3471 | "}" | |
| 3472 | ] | |
| 3473 | } | |
| 3474 | } | |
| 3475 | ], | |
| 3476 | "request": { | |
| 3477 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/users/r esearcher1 ", | |
| 3478 | "m ethod": "P UT", | |
| 3479 | "h eader": [ | |
| 3480 | { | |
| 3481 | "key": "Content- Type", | |
| 3482 | "value ": "applic ation/json ", | |
| 3483 | "descr iption": " " | |
| 3484 | }, | |
| 3485 | { | |
| 3486 | "key": "Accept-E ncoding", | |
| 3487 | "value ": "applic ation/json ", | |
| 3488 | "descr iption": " " | |
| 3489 | } | |
| 3490 | ], | |
| 3491 | "b ody": { | |
| 3492 | "mod e": "raw", | |
| 3493 | "raw ": "{\n\t\ "email\": \"myemail2 @gmail.com \",\n\t\"f irstName\" : \"Test2\ ",\n\t\"la stName\": \"Testerly 2\",\n\t\" role\": \" researcher \",\n\t\"d atamanager \": \"data manager2\" \n}" | |
| 3494 | }, | |
| 3495 | "d escription ": "Update a user" | |
| 3496 | }, | |
| 3497 | "response" : [] | |
| 3498 | }, | |
| 3499 | { | |
| 3500 | "name": "U sers - Del ete", | |
| 3501 | "event": [ | |
| 3502 | { | |
| 3503 | "lis ten": "tes t", | |
| 3504 | "scr ipt": { | |
| 3505 | "type" : "text/ja vascript", | |
| 3506 | "exec" : [ | |
| 3507 | "//meta tests", | |
| 3508 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 3509 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 3510 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 3511 | "", | |
| 3512 | "//don't run these json test s if we do n't get js on back :( ", | |
| 3513 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 3514 | " ", | |
| 3515 | " var schema = {", | |
| 3516 | " \" items\": { ", | |
| 3517 | " \"respon se\": \"ar ray\",", | |
| 3518 | " \"succes s\": \"boo lean\",", | |
| 3519 | " \"messag e\": \"str ing\"", | |
| 3520 | " }", | |
| 3521 | " };" , | |
| 3522 | " ", | |
| 3523 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 3524 | " ", | |
| 3525 | " if (tv4.error ) {", | |
| 3526 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 3527 | " }", | |
| 3528 | " var jsonData = JSON.par se(respons eBody);", | |
| 3529 | " ", | |
| 3530 | " //i f success is true we have some response data", | |
| 3531 | " if (jsonData. success == = true) {" , | |
| 3532 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 3533 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 3534 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 3535 | " " , | |
| 3536 | " / /single re sult, retu rn just th e object", | |
| 3537 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 3538 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 3539 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 3540 | " } else if ( jsonData.r esponse) { ", | |
| 3541 | " //multi ple result s, return an array o f objects" , | |
| 3542 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 3543 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 3544 | " } ", | |
| 3545 | " } e lse {", | |
| 3546 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 3547 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 3548 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 3549 | " }", | |
| 3550 | "} else {", | |
| 3551 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 3552 | "}" | |
| 3553 | ] | |
| 3554 | } | |
| 3555 | } | |
| 3556 | ], | |
| 3557 | "request": { | |
| 3558 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/users/1 ", | |
| 3559 | "m ethod": "D ELETE", | |
| 3560 | "h eader": [ | |
| 3561 | { | |
| 3562 | "key": "Content- Type", | |
| 3563 | "value ": "applic ation/json ", | |
| 3564 | "descr iption": " " | |
| 3565 | }, | |
| 3566 | { | |
| 3567 | "key": "Accept-E ncoding", | |
| 3568 | "value ": "applic ation/json ", | |
| 3569 | "descr iption": " " | |
| 3570 | } | |
| 3571 | ], | |
| 3572 | "b ody": { | |
| 3573 | "mod e": "raw", | |
| 3574 | "raw ": "" | |
| 3575 | }, | |
| 3576 | "d escription ": "delete a user" | |
| 3577 | }, | |
| 3578 | "response" : [] | |
| 3579 | }, | |
| 3580 | { | |
| 3581 | "name": "U sers - Del ete Notifi cation", | |
| 3582 | "event": [ | |
| 3583 | { | |
| 3584 | "lis ten": "tes t", | |
| 3585 | "scr ipt": { | |
| 3586 | "type" : "text/ja vascript", | |
| 3587 | "exec" : [ | |
| 3588 | "//meta tests", | |
| 3589 | "tests[\ "Status co de is 200\ "] = respo nseCode.co de === 200 ;", | |
| 3590 | "tests[\ "Response time is le ss than 2s \"] = resp onseTime < 2000;", | |
| 3591 | "tests[\ "Content-T ype is app lication/j son\"] = p ostman.get ResponseHe ader(\"Con tent-Type\ ") === 'ap plication/ json;chars et=UTF-8'; ", | |
| 3592 | "", | |
| 3593 | "//don't run these json test s if we do n't get js on back :( ", | |
| 3594 | "if (pos tman.getRe sponseHead er(\"Conte nt-Type\") === 'appl ication/js on;charset =UTF-8') { ", | |
| 3595 | " ", | |
| 3596 | " var schema = {", | |
| 3597 | " \" items\": { ", | |
| 3598 | " \"respon se\": \"ar ray\",", | |
| 3599 | " \"succes s\": \"boo lean\",", | |
| 3600 | " \"messag e\": \"str ing\"", | |
| 3601 | " }", | |
| 3602 | " };" , | |
| 3603 | " ", | |
| 3604 | " tes ts[\"Valid JSON form at\"] = tv 4.validate (jsonData, schema);" , | |
| 3605 | " ", | |
| 3606 | " if (tv4.error ) {", | |
| 3607 | " console.l og(\"Valid ation fail ed: \", tv 4.error);" , | |
| 3608 | " }", | |
| 3609 | " var jsonData = JSON.par se(respons eBody);", | |
| 3610 | " ", | |
| 3611 | " //i f success is true we have some response data", | |
| 3612 | " if (jsonData. success == = true) {" , | |
| 3613 | " t ests[\"suc cess === t rue\"] = j sonData.su ccess === true;", | |
| 3614 | " t ests[\"res ponse.leng th > 0\"] = (jsonDat a.response ) ? jsonDa ta.respons e !== null : false;" , | |
| 3615 | " t ests[\"mes sage === n ull\"] = j sonData.me ssage === null;", | |
| 3616 | " " , | |
| 3617 | " / /single re sult, retu rn just th e object", | |
| 3618 | " i f (jsonDat a.response && jsonDa ta.respons e.length = == undefin ed) {", | |
| 3619 | " tests[\" response.l ength === 1 is not a n array\"] = !Array. isArray(js onData.res ponse);", | |
| 3620 | " tests[\"r esponse.le ngth === 1 returns s ingle obje ct\"] = ty peof jsonD ata.respon se === 'ob ject';", | |
| 3621 | " } else if ( jsonData.r esponse) { ", | |
| 3622 | " //multi ple result s, return an array o f objects" , | |
| 3623 | " tests[\ "response. length > 1 - returns array\"] = Array.is Array(json Data.respo nse);", | |
| 3624 | " tests[\ "response. length > 1 - array o f objects\ "] = typeo f jsonData .response[ 0] === 'ob ject';", | |
| 3625 | " } ", | |
| 3626 | " } e lse {", | |
| 3627 | " t ests[\"res ponse === null\"] = jsonData.r esponse == = null;", | |
| 3628 | " t ests[\"mes sage === N o records found.\"] = jsonData .message = == \"No re cords foun d.\";", | |
| 3629 | " t ests[\"suc cess === f alse\"] = jsonData.s uccess === false;", | |
| 3630 | " }", | |
| 3631 | "} else {", | |
| 3632 | " tes ts[\"Inval id API res ponse\"] = false;", | |
| 3633 | "}" | |
| 3634 | ] | |
| 3635 | } | |
| 3636 | } | |
| 3637 | ], | |
| 3638 | "request": { | |
| 3639 | "u rl": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/users/1 /notificat ion", | |
| 3640 | "m ethod": "D ELETE", | |
| 3641 | "h eader": [ | |
| 3642 | { | |
| 3643 | "key": "Content- Type", | |
| 3644 | "value ": "applic ation/json ", | |
| 3645 | "descr iption": " " | |
| 3646 | }, | |
| 3647 | { | |
| 3648 | "key": "Accept-E ncoding", | |
| 3649 | "value ": "applic ation/json ", | |
| 3650 | "descr iption": " " | |
| 3651 | } | |
| 3652 | ], | |
| 3653 | "b ody": { | |
| 3654 | "mod e": "raw", | |
| 3655 | "raw ": "" | |
| 3656 | }, | |
| 3657 | "d escription ": "delete a user's notificati on" | |
| 3658 | }, | |
| 3659 | "response" : [] | |
| 3660 | }, | |
| 3661 | { | |
| 3662 | "name": "U sers - Del ete Action Item", | |
| 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": "http ://genisis 20win-api. boozallenc sn.com/Gen isis2Servi ces/servic es/users/1 /actionIte ms", | |
| 3721 | "m ethod": "D ELETE", | |
| 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": "raw", | |
| 3736 | "raw ": "" | |
| 3737 | }, | |
| 3738 | "d escription ": "delete a user's action ite m" | |
| 3739 | }, | |
| 3740 | "response" : [] | |
| 3741 | } | |
| 3742 | ] | |
| 3743 | } | |
| 3744 | ] | |
| 3745 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.