├── .gitignore ├── Chapter02 ├── E-Commerce_API-Design.raml └── Github API Requests.postman_collection.json ├── Chapter03 └── petstore_openapi.yaml ├── Chapter04 └── Star Wars API_Chapter4_initial.postman_collection.json ├── Chapter06 ├── SWAPI Env.postman_environment.json ├── Star Wars API.TryItOutSolutions.postman_collection.json ├── Star Wars API_Chapter6_initial.postman_collection.json ├── swapi-test-script-get-people-request.js ├── swapi-test-script-homeworld-request.js └── swapi_pre-request_script.js ├── Chapter07 ├── test-scripts-users-request.js ├── timestampInputs.csv ├── userInputs.csv └── userInputs_noOutputs.csv ├── Chapter08 ├── DataDrivenInputs.csv ├── JSON API Env.postman_environment.json ├── MyReporter │ ├── index.js │ ├── myreporter-1.0.0.tgz │ ├── newman-reporter-myreporter-1.0.0.tgz │ └── package.json ├── NewmanTestEnvironment.json ├── SWAPI Env.postman_environment.json ├── SWAPI.postman_collection.json ├── TestCollection.json ├── myOwnTests ├── newman │ ├── Newman Test-2020-11-10-15-25-27-500-0.html │ ├── Newman Test-2020-11-10-15-30-06-960-0.html │ ├── newman-run-report-2020-11-09-14-33-37-630-0.xml │ └── newman-run-report-2020-11-09-14-59-42-276-0.json └── package-lock.json ├── Chapter09 ├── test-scripts-films-request.js └── tests-scripts-people-request.js ├── Chapter10 ├── ExampleBlogAPI_withTests.postman_collection.json ├── README.md ├── application_server.js ├── initial_local_db.json ├── local_db.json ├── package-lock.json ├── package.json ├── pre-request-scripts-GetBlogpostWithEmbeddedComments.js ├── pre-reuest-scripts-UpdateBlogpost.js ├── reset_db.js ├── test-scripts-GetBlogpostList-request.js ├── test-scripts-GetBlogpostWithEmbeddedComments.js ├── test-scripts-GetSingleBlogPosts.js ├── test-scripts-PostAndDeleteBlogpost.js └── test-scripts-UpdateBlogpost.-request.js ├── Chapter11 └── TodoList.yaml ├── Chapter12 └── TodoList.yaml ├── Chapter14 ├── ecommerce.yaml └── test-scripts-GetListOfProducts.js ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | -------------------------------------------------------------------------------- /Chapter02/E-Commerce_API-Design.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 2 | --- 3 | title: E-Commerce API 4 | baseUri: http://api.ecommerce.com/{version} 5 | version: v1 6 | 7 | /products: 8 | get: 9 | /{productId}: 10 | get: 11 | /users: 12 | post: 13 | get: 14 | /{username}: 15 | get: 16 | put: 17 | /carts: 18 | post: 19 | get: 20 | queryParameter: 21 | username: 22 | /{cartId}: 23 | get: 24 | put: 25 | -------------------------------------------------------------------------------- /Chapter03/petstore_openapi.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: Swagger Petstore 4 | description: 'This is a sample server Petstore server. You can find out more about Swagger 5 | at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For 6 | this sample, you can use the api key `special-key` to test the authorization filters.' 7 | termsOfService: http://swagger.io/terms/ 8 | contact: 9 | email: apiteam@swagger.io 10 | license: 11 | name: Apache 2.0 12 | url: http://www.apache.org/licenses/LICENSE-2.0.html 13 | version: 1.0.0 14 | externalDocs: 15 | description: Find out more about Swagger 16 | url: http://swagger.io 17 | servers: 18 | - url: https://petstore.swagger.io/v2 19 | - url: http://petstore.swagger.io/v2 20 | tags: 21 | - name: pet 22 | description: Everything about your Pets 23 | externalDocs: 24 | description: Find out more 25 | url: http://swagger.io 26 | - name: store 27 | description: Access to Petstore orders 28 | - name: user 29 | description: Operations about user 30 | externalDocs: 31 | description: Find out more about our store 32 | url: http://swagger.io 33 | paths: 34 | /pet: 35 | put: 36 | tags: 37 | - pet 38 | summary: Update an existing pet 39 | operationId: updatePet 40 | requestBody: 41 | description: Pet object that needs to be added to the store 42 | content: 43 | application/json: 44 | schema: 45 | $ref: '#/components/schemas/Pet' 46 | application/xml: 47 | schema: 48 | $ref: '#/components/schemas/Pet' 49 | required: true 50 | responses: 51 | 400: 52 | description: Invalid ID supplied 53 | content: {} 54 | 404: 55 | description: Pet not found 56 | content: {} 57 | 405: 58 | description: Validation exception 59 | content: {} 60 | security: 61 | - petstore_auth: 62 | - write:pets 63 | - read:pets 64 | x-codegen-request-body-name: body 65 | post: 66 | tags: 67 | - pet 68 | summary: Add a new pet to the store 69 | operationId: addPet 70 | requestBody: 71 | description: Pet object that needs to be added to the store 72 | content: 73 | application/json: 74 | schema: 75 | $ref: '#/components/schemas/Pet' 76 | application/xml: 77 | schema: 78 | $ref: '#/components/schemas/Pet' 79 | required: true 80 | responses: 81 | 405: 82 | description: Invalid input 83 | content: {} 84 | security: 85 | - petstore_auth: 86 | - write:pets 87 | - read:pets 88 | x-codegen-request-body-name: body 89 | /pet/findByStatus: 90 | get: 91 | tags: 92 | - pet 93 | summary: Finds Pets by status 94 | description: Multiple status values can be provided with comma separated strings 95 | operationId: findPetsByStatus 96 | parameters: 97 | - name: status 98 | in: query 99 | description: Status values that need to be considered for filter 100 | required: true 101 | style: form 102 | explode: true 103 | schema: 104 | type: array 105 | items: 106 | type: string 107 | default: available 108 | enum: 109 | - available 110 | - pending 111 | - sold 112 | responses: 113 | 200: 114 | description: successful operation 115 | content: 116 | application/xml: 117 | schema: 118 | type: array 119 | items: 120 | $ref: '#/components/schemas/Pet' 121 | application/json: 122 | schema: 123 | type: array 124 | items: 125 | $ref: '#/components/schemas/Pet' 126 | 400: 127 | description: Invalid status value 128 | content: {} 129 | security: 130 | - petstore_auth: 131 | - write:pets 132 | - read:pets 133 | /pet/findByTags: 134 | get: 135 | tags: 136 | - pet 137 | summary: Finds Pets by tags 138 | description: Muliple tags can be provided with comma separated strings. Use tag1, 139 | tag2, tag3 for testing. 140 | operationId: findPetsByTags 141 | parameters: 142 | - name: tags 143 | in: query 144 | description: Tags to filter by 145 | required: true 146 | style: form 147 | explode: true 148 | schema: 149 | type: array 150 | items: 151 | type: string 152 | responses: 153 | 200: 154 | description: successful operation 155 | content: 156 | application/xml: 157 | schema: 158 | type: array 159 | items: 160 | $ref: '#/components/schemas/Pet' 161 | application/json: 162 | schema: 163 | type: array 164 | items: 165 | $ref: '#/components/schemas/Pet' 166 | 400: 167 | description: Invalid tag value 168 | content: {} 169 | deprecated: true 170 | security: 171 | - petstore_auth: 172 | - write:pets 173 | - read:pets 174 | /pet/{petId}: 175 | get: 176 | tags: 177 | - pet 178 | summary: Find pet by ID 179 | description: Returns a single pet 180 | operationId: getPetById 181 | parameters: 182 | - name: petId 183 | in: path 184 | description: ID of pet to return 185 | required: true 186 | schema: 187 | type: integer 188 | format: int64 189 | responses: 190 | 200: 191 | description: successful operation 192 | content: 193 | application/xml: 194 | schema: 195 | $ref: '#/components/schemas/Pet' 196 | application/json: 197 | schema: 198 | $ref: '#/components/schemas/Pet' 199 | 400: 200 | description: Invalid ID supplied 201 | content: {} 202 | 404: 203 | description: Pet not found 204 | content: {} 205 | security: 206 | - api_key: [] 207 | post: 208 | tags: 209 | - pet 210 | summary: Updates a pet in the store with form data 211 | operationId: updatePetWithForm 212 | parameters: 213 | - name: petId 214 | in: path 215 | description: ID of pet that needs to be updated 216 | required: true 217 | schema: 218 | type: integer 219 | format: int64 220 | requestBody: 221 | content: 222 | application/x-www-form-urlencoded: 223 | schema: 224 | properties: 225 | name: 226 | type: string 227 | description: Updated name of the pet 228 | status: 229 | type: string 230 | description: Updated status of the pet 231 | responses: 232 | 405: 233 | description: Invalid input 234 | content: {} 235 | security: 236 | - petstore_auth: 237 | - write:pets 238 | - read:pets 239 | delete: 240 | tags: 241 | - pet 242 | summary: Deletes a pet 243 | operationId: deletePet 244 | parameters: 245 | - name: api_key 246 | in: header 247 | schema: 248 | type: string 249 | - name: petId 250 | in: path 251 | description: Pet id to delete 252 | required: true 253 | schema: 254 | type: integer 255 | format: int64 256 | responses: 257 | 400: 258 | description: Invalid ID supplied 259 | content: {} 260 | 404: 261 | description: Pet not found 262 | content: {} 263 | security: 264 | - petstore_auth: 265 | - write:pets 266 | - read:pets 267 | /pet/{petId}/uploadImage: 268 | post: 269 | tags: 270 | - pet 271 | summary: uploads an image 272 | operationId: uploadFile 273 | parameters: 274 | - name: petId 275 | in: path 276 | description: ID of pet to update 277 | required: true 278 | schema: 279 | type: integer 280 | format: int64 281 | requestBody: 282 | content: 283 | multipart/form-data: 284 | schema: 285 | properties: 286 | additionalMetadata: 287 | type: string 288 | description: Additional data to pass to server 289 | file: 290 | type: string 291 | description: file to upload 292 | format: binary 293 | responses: 294 | 200: 295 | description: successful operation 296 | content: 297 | application/json: 298 | schema: 299 | $ref: '#/components/schemas/ApiResponse' 300 | security: 301 | - petstore_auth: 302 | - write:pets 303 | - read:pets 304 | /store/inventory: 305 | get: 306 | tags: 307 | - store 308 | summary: Returns pet inventories by status 309 | description: Returns a map of status codes to quantities 310 | operationId: getInventory 311 | responses: 312 | 200: 313 | description: successful operation 314 | content: 315 | application/json: 316 | schema: 317 | type: object 318 | additionalProperties: 319 | type: integer 320 | format: int32 321 | security: 322 | - api_key: [] 323 | /store/order: 324 | post: 325 | tags: 326 | - store 327 | summary: Place an order for a pet 328 | operationId: placeOrder 329 | requestBody: 330 | description: order placed for purchasing the pet 331 | content: 332 | '*/*': 333 | schema: 334 | $ref: '#/components/schemas/Order' 335 | required: true 336 | responses: 337 | 200: 338 | description: successful operation 339 | content: 340 | application/xml: 341 | schema: 342 | $ref: '#/components/schemas/Order' 343 | application/json: 344 | schema: 345 | $ref: '#/components/schemas/Order' 346 | 400: 347 | description: Invalid Order 348 | content: {} 349 | x-codegen-request-body-name: body 350 | /store/order/{orderId}: 351 | get: 352 | tags: 353 | - store 354 | summary: Find purchase order by ID 355 | description: For valid response try integer IDs with value >= 1 and <= 10. Other 356 | values will generated exceptions 357 | operationId: getOrderById 358 | parameters: 359 | - name: orderId 360 | in: path 361 | description: ID of pet that needs to be fetched 362 | required: true 363 | schema: 364 | maximum: 10.0 365 | minimum: 1.0 366 | type: integer 367 | format: int64 368 | responses: 369 | 200: 370 | description: successful operation 371 | content: 372 | application/xml: 373 | schema: 374 | $ref: '#/components/schemas/Order' 375 | application/json: 376 | schema: 377 | $ref: '#/components/schemas/Order' 378 | 400: 379 | description: Invalid ID supplied 380 | content: {} 381 | 404: 382 | description: Order not found 383 | content: {} 384 | delete: 385 | tags: 386 | - store 387 | summary: Delete purchase order by ID 388 | description: For valid response try integer IDs with positive integer value. Negative 389 | or non-integer values will generate API errors 390 | operationId: deleteOrder 391 | parameters: 392 | - name: orderId 393 | in: path 394 | description: ID of the order that needs to be deleted 395 | required: true 396 | schema: 397 | minimum: 1.0 398 | type: integer 399 | format: int64 400 | responses: 401 | 400: 402 | description: Invalid ID supplied 403 | content: {} 404 | 404: 405 | description: Order not found 406 | content: {} 407 | /user: 408 | post: 409 | tags: 410 | - user 411 | summary: Create user 412 | description: This can only be done by the logged in user. 413 | operationId: createUser 414 | requestBody: 415 | description: Created user object 416 | content: 417 | '*/*': 418 | schema: 419 | $ref: '#/components/schemas/User' 420 | required: true 421 | responses: 422 | default: 423 | description: successful operation 424 | content: {} 425 | x-codegen-request-body-name: body 426 | /user/createWithArray: 427 | post: 428 | tags: 429 | - user 430 | summary: Creates list of users with given input array 431 | operationId: createUsersWithArrayInput 432 | requestBody: 433 | description: List of user object 434 | content: 435 | '*/*': 436 | schema: 437 | type: array 438 | items: 439 | $ref: '#/components/schemas/User' 440 | required: true 441 | responses: 442 | default: 443 | description: successful operation 444 | content: {} 445 | x-codegen-request-body-name: body 446 | /user/createWithList: 447 | post: 448 | tags: 449 | - user 450 | summary: Creates list of users with given input array 451 | operationId: createUsersWithListInput 452 | requestBody: 453 | description: List of user object 454 | content: 455 | '*/*': 456 | schema: 457 | type: array 458 | items: 459 | $ref: '#/components/schemas/User' 460 | required: true 461 | responses: 462 | default: 463 | description: successful operation 464 | content: {} 465 | x-codegen-request-body-name: body 466 | /user/login: 467 | get: 468 | tags: 469 | - user 470 | summary: Logs user into the system 471 | operationId: loginUser 472 | parameters: 473 | - name: username 474 | in: query 475 | description: The user name for login 476 | required: true 477 | schema: 478 | type: string 479 | - name: password 480 | in: query 481 | description: The password for login in clear text 482 | required: true 483 | schema: 484 | type: string 485 | responses: 486 | 200: 487 | description: successful operation 488 | headers: 489 | X-Rate-Limit: 490 | description: calls per hour allowed by the user 491 | schema: 492 | type: integer 493 | format: int32 494 | X-Expires-After: 495 | description: date in UTC when token expires 496 | schema: 497 | type: string 498 | format: date-time 499 | content: 500 | application/xml: 501 | schema: 502 | type: string 503 | application/json: 504 | schema: 505 | type: string 506 | 400: 507 | description: Invalid username/password supplied 508 | content: {} 509 | /user/logout: 510 | get: 511 | tags: 512 | - user 513 | summary: Logs out current logged in user session 514 | operationId: logoutUser 515 | responses: 516 | default: 517 | description: successful operation 518 | content: {} 519 | /user/{username}: 520 | get: 521 | tags: 522 | - user 523 | summary: Get user by user name 524 | operationId: getUserByName 525 | parameters: 526 | - name: username 527 | in: path 528 | description: 'The name that needs to be fetched. Use user1 for testing. ' 529 | required: true 530 | schema: 531 | type: string 532 | responses: 533 | 200: 534 | description: successful operation 535 | content: 536 | application/xml: 537 | schema: 538 | $ref: '#/components/schemas/User' 539 | application/json: 540 | schema: 541 | $ref: '#/components/schemas/User' 542 | 400: 543 | description: Invalid username supplied 544 | content: {} 545 | 404: 546 | description: User not found 547 | content: {} 548 | put: 549 | tags: 550 | - user 551 | summary: Updated user 552 | description: This can only be done by the logged in user. 553 | operationId: updateUser 554 | parameters: 555 | - name: username 556 | in: path 557 | description: name that need to be updated 558 | required: true 559 | schema: 560 | type: string 561 | requestBody: 562 | description: Updated user object 563 | content: 564 | '*/*': 565 | schema: 566 | $ref: '#/components/schemas/User' 567 | required: true 568 | responses: 569 | 400: 570 | description: Invalid user supplied 571 | content: {} 572 | 404: 573 | description: User not found 574 | content: {} 575 | x-codegen-request-body-name: body 576 | delete: 577 | tags: 578 | - user 579 | summary: Delete user 580 | description: This can only be done by the logged in user. 581 | operationId: deleteUser 582 | parameters: 583 | - name: username 584 | in: path 585 | description: The name that needs to be deleted 586 | required: true 587 | schema: 588 | type: string 589 | responses: 590 | 400: 591 | description: Invalid username supplied 592 | content: {} 593 | 404: 594 | description: User not found 595 | content: {} 596 | components: 597 | schemas: 598 | Order: 599 | type: object 600 | properties: 601 | id: 602 | type: integer 603 | format: int64 604 | petId: 605 | type: integer 606 | format: int64 607 | quantity: 608 | type: integer 609 | format: int32 610 | shipDate: 611 | type: string 612 | format: date-time 613 | status: 614 | type: string 615 | description: Order Status 616 | enum: 617 | - placed 618 | - approved 619 | - delivered 620 | complete: 621 | type: boolean 622 | default: false 623 | xml: 624 | name: Order 625 | Category: 626 | type: object 627 | properties: 628 | id: 629 | type: integer 630 | format: int64 631 | name: 632 | type: string 633 | xml: 634 | name: Category 635 | User: 636 | type: object 637 | properties: 638 | id: 639 | type: integer 640 | format: int64 641 | username: 642 | type: string 643 | firstName: 644 | type: string 645 | lastName: 646 | type: string 647 | email: 648 | type: string 649 | password: 650 | type: string 651 | phone: 652 | type: string 653 | userStatus: 654 | type: integer 655 | description: User Status 656 | format: int32 657 | xml: 658 | name: User 659 | Tag: 660 | type: object 661 | properties: 662 | id: 663 | type: integer 664 | format: int64 665 | name: 666 | type: string 667 | xml: 668 | name: Tag 669 | Pet: 670 | required: 671 | - name 672 | - photoUrls 673 | type: object 674 | properties: 675 | id: 676 | type: integer 677 | format: int64 678 | category: 679 | $ref: '#/components/schemas/Category' 680 | name: 681 | type: string 682 | example: doggie 683 | photoUrls: 684 | type: array 685 | xml: 686 | name: photoUrl 687 | wrapped: true 688 | items: 689 | type: string 690 | tags: 691 | type: array 692 | xml: 693 | name: tag 694 | wrapped: true 695 | items: 696 | $ref: '#/components/schemas/Tag' 697 | status: 698 | type: string 699 | description: pet status in the store 700 | enum: 701 | - available 702 | - pending 703 | - sold 704 | xml: 705 | name: Pet 706 | ApiResponse: 707 | type: object 708 | properties: 709 | code: 710 | type: integer 711 | format: int32 712 | type: 713 | type: string 714 | message: 715 | type: string 716 | securitySchemes: 717 | petstore_auth: 718 | type: oauth2 719 | flows: 720 | implicit: 721 | authorizationUrl: http://petstore.swagger.io/oauth/dialog 722 | scopes: 723 | write:pets: modify pets in your account 724 | read:pets: read your pets 725 | api_key: 726 | type: apiKey 727 | name: api_key 728 | in: header 729 | -------------------------------------------------------------------------------- /Chapter04/Star Wars API_Chapter4_initial.postman_collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "_postman_id": "e172c7d8-7f63-491f-aa0b-d1c691408972", 4 | "name": "Star Wars API", 5 | "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" 6 | }, 7 | "item": [ 8 | { 9 | "name": "Get People", 10 | "request": { 11 | "method": "GET", 12 | "header": [], 13 | "url": { 14 | "raw": "https://swapi.dev/api/people/1", 15 | "protocol": "https", 16 | "host": [ 17 | "swapi", 18 | "dev" 19 | ], 20 | "path": [ 21 | "api", 22 | "people", 23 | "1" 24 | ] 25 | } 26 | }, 27 | "response": [] 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /Chapter06/SWAPI Env.postman_environment.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "70754c73-3780-4033-aadd-e6181e251a1e", 3 | "name": "SWAPI Env", 4 | "values": [ 5 | { 6 | "key": "base_url", 7 | "value": "https://swapi.dev/api", 8 | "enabled": true 9 | } 10 | ], 11 | "_postman_variable_scope": "environment", 12 | "_postman_exported_at": "2021-02-22T14:00:59.738Z", 13 | "_postman_exported_using": "Postman/8.0.4" 14 | } -------------------------------------------------------------------------------- /Chapter06/Star Wars API.TryItOutSolutions.postman_collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "_postman_id": "870d9057-0676-4d15-950f-b68ad7611d7c", 4 | "name": "Star Wars API", 5 | "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" 6 | }, 7 | "item": [ 8 | { 9 | "name": "Luke", 10 | "item": [ 11 | { 12 | "name": "Get People", 13 | "event": [ 14 | { 15 | "listen": "test", 16 | "script": { 17 | "exec": [ 18 | "pm.test(\"Status code is 200\", function () {\r", 19 | " pm.response.to.have.status(200);\r", 20 | "});\r", 21 | "\r", 22 | "pm.test(\"Check that the response body contains Luke\", function () {\r", 23 | " pm.expect(pm.response.text()).to.include(\"Luke\");\r", 24 | "});\r", 25 | "\r", 26 | "pm.test(\"Check Luke's Height\", function () {\r", 27 | " var jsonData = pm.response.json();\r", 28 | " pm.expect(jsonData.height).to.eql(\"172\");\r", 29 | "});\r", 30 | "\r", 31 | "pm.test(\"Check Luke's eye color\", function () {\r", 32 | " var jsonData = pm.response.json();\r", 33 | " pm.expect(jsonData.eye_color).to.eql(\"blue\");\r", 34 | "});\r", 35 | "\r", 36 | "pm.test(\"Check the homeworld URL\", function () {\r", 37 | " var jsonData = pm.response.json();\r", 38 | " pm.expect(jsonData.homeworld).to.eql(\"http://swapi.dev/api/planets/1/\");\r", 39 | "});\r", 40 | "\r", 41 | "pm.test(\"Content-Type is present\", function () {\r", 42 | " pm.response.to.have.header(\"Content-Type\");\r", 43 | "});\r", 44 | "\r", 45 | "pm.test(\"Server is nginx\", function () {\r", 46 | " pm.response.to.have.header(\"Server\",'nginx/1.16.1');\r", 47 | "});\r", 48 | "\r", 49 | "pm.test(\"Response time is less than 500ms\", function () {\r", 50 | " pm.expect(pm.response.responseTime).to.be.below(500);\r", 51 | "});\r", 52 | "\r", 53 | "pm.test(\"Luke is in 4 films\", function () {\r", 54 | " pm.expect(pm.response.json().films.length).to.eql(4)\r", 55 | "});" 56 | ], 57 | "type": "text/javascript" 58 | } 59 | } 60 | ], 61 | "request": { 62 | "method": "GET", 63 | "header": [], 64 | "url": { 65 | "raw": "https://swapi.dev/api/people/1", 66 | "protocol": "https", 67 | "host": [ 68 | "swapi", 69 | "dev" 70 | ], 71 | "path": [ 72 | "api", 73 | "people", 74 | "1" 75 | ] 76 | } 77 | }, 78 | "response": [] 79 | }, 80 | { 81 | "name": "Luke's Home world", 82 | "request": { 83 | "method": "GET", 84 | "header": [], 85 | "url": null 86 | }, 87 | "response": [] 88 | } 89 | ] 90 | } 91 | ] 92 | } -------------------------------------------------------------------------------- /Chapter06/Star Wars API_Chapter6_initial.postman_collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "_postman_id": "f6cac2da-eb1c-4b51-9859-8e7ee78a4ef6", 4 | "name": "Star Wars API - Chapter 6", 5 | "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" 6 | }, 7 | "item": [ 8 | { 9 | "name": "Get People", 10 | "request": { 11 | "method": "GET", 12 | "header": [], 13 | "url": { 14 | "raw": "https://swapi.dev/api/people/1", 15 | "protocol": "https", 16 | "host": [ 17 | "swapi", 18 | "dev" 19 | ], 20 | "path": [ 21 | "api", 22 | "people", 23 | "1" 24 | ] 25 | } 26 | }, 27 | "response": [] 28 | } 29 | ], 30 | "event": [ 31 | { 32 | "listen": "prerequest", 33 | "script": { 34 | "type": "text/javascript", 35 | "exec": [ 36 | "" 37 | ] 38 | } 39 | }, 40 | { 41 | "listen": "test", 42 | "script": { 43 | "type": "text/javascript", 44 | "exec": [ 45 | "" 46 | ] 47 | } 48 | } 49 | ], 50 | "variable": [ 51 | { 52 | "key": "base_url", 53 | "value": "https://swapi.dev/api" 54 | } 55 | ] 56 | } -------------------------------------------------------------------------------- /Chapter06/swapi-test-script-get-people-request.js: -------------------------------------------------------------------------------- 1 | pm.test("Status code is 200", function () { 2 | pm.response.to.have.status(200); 3 | }); 4 | 5 | pm.test("Check that the response body contains Luke", function () { 6 | pm.expect(pm.response.text()).to.include("Luke"); 7 | }); 8 | 9 | pm.test("Check Luke's Height", function () { 10 | var jsonData = pm.response.json(); 11 | pm.expect(jsonData.height).to.eql("172"); 12 | }); 13 | 14 | pm.test("Check Luke's eye color", function () { 15 | var jsonData = pm.response.json(); 16 | pm.expect(jsonData.eye_color).to.eql("blue"); 17 | }); 18 | 19 | pm.test("Check the homeworld URL", function () { 20 | var jsonData = pm.response.json(); 21 | pm.expect(jsonData.homeworld).to.eql("http://swapi.dev/api/planets/1/"); 22 | }); 23 | 24 | pm.test("Content-Type is present", function () { 25 | pm.response.to.have.header("Content-Type"); 26 | }); 27 | 28 | pm.test("Server is nginx", function () { 29 | pm.response.to.have.header("Server",'nginx/1.16.1'); 30 | }); 31 | 32 | pm.test("Response time is less than 500ms", function () { 33 | pm.expect(pm.response.responseTime).to.be.below(500); 34 | }); 35 | 36 | pm.test("Luke is in 4 films", function () { 37 | pm.expect(pm.response.json().films.length).to.eql(4) 38 | }); -------------------------------------------------------------------------------- /Chapter06/swapi-test-script-homeworld-request.js: -------------------------------------------------------------------------------- 1 | var jsonData = pm.response.json(); 2 | var planetResidents = jsonData.residents; 3 | pm.collectionVariables.set("residentList", planetResidents); 4 | pm.environment.set("counter", 0); -------------------------------------------------------------------------------- /Chapter06/swapi_pre-request_script.js: -------------------------------------------------------------------------------- 1 | var residentList = pm.collectionVariables.get("residentList"); 2 | // var randomResident = residentList[Math.floor(Math.random() * residentList.length)]; 3 | // var splitResidentStr = randomResident.split('/'); 4 | // var personId = splitResidentStr[splitResidentStr.length - 2]; 5 | // pm.environment.set("person_id", personId); 6 | 7 | var currentCount = pm.environment.get("counter"); 8 | if (currentCount < residentList.length) { 9 | randomResident = residentList[currentCount]; 10 | var splitResidentStr = randomResident.split('/'); 11 | var personId = splitResidentStr[splitResidentStr.length - 2]; 12 | pm.environment.set("person_id", personId); 13 | pm.environment.set("counter",currentCount+1); 14 | postman.setNextRequest("Get a Person"); 15 | }; -------------------------------------------------------------------------------- /Chapter07/test-scripts-users-request.js: -------------------------------------------------------------------------------- 1 | pm.test("Validate Email Address From File", function () { 2 | var jsonData = pm.response.json(); 3 | var expectedEmail = pm.variables.replaceIn("{{expectedEmail}}"); 4 | pm.expect(jsonData.email).to.eql(expectedEmail); 5 | }); -------------------------------------------------------------------------------- /Chapter07/timestampInputs.csv: -------------------------------------------------------------------------------- 1 | inputTimestamp,changeUnit,changeAmount 2 | Mon Oct 12 2020 00:00:00 GMT+0000,days,1 -------------------------------------------------------------------------------- /Chapter07/userInputs.csv: -------------------------------------------------------------------------------- 1 | userId, expectedEmail 2 | 1, Sincere@april.biz 3 | 2, Shanna@melissa.tv 4 | 3, Nathan@yesenia.net 5 | 4, IncorrectEmail@kory.org 6 | 5, Lucio_Hettinger@annie.ca -------------------------------------------------------------------------------- /Chapter07/userInputs_noOutputs.csv: -------------------------------------------------------------------------------- 1 | userId 2 | 1 3 | 2 4 | 3 5 | 4 6 | 5 -------------------------------------------------------------------------------- /Chapter08/DataDrivenInputs.csv: -------------------------------------------------------------------------------- 1 | queryParam,queryParamVal 2 | test,true 3 | query,1 -------------------------------------------------------------------------------- /Chapter08/JSON API Env.postman_environment.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "b9751d09-796c-4be5-836d-a1931ef17ac5", 3 | "name": "JSON API Env", 4 | "values": [ 5 | { 6 | "key": "userId", 7 | "value": "1", 8 | "enabled": true 9 | } 10 | ], 11 | "_postman_variable_scope": "environment", 12 | "_postman_exported_at": "2020-11-05T14:11:12.188Z", 13 | "_postman_exported_using": "Postman/7.34.0" 14 | } -------------------------------------------------------------------------------- /Chapter08/MyReporter/index.js: -------------------------------------------------------------------------------- 1 | function MyCustomNewmanReporter (newman, reporterOptions, collectionRunOptions) { 2 | 3 | newman.on('start', function (err) { 4 | if (err) { return; } 5 | console.log('Collection run starting') 6 | console.log(collectionRunOptions) 7 | }); 8 | 9 | newman.on('item', function (err,args) { 10 | console.log('Running: '+args.item.name) 11 | console.log('test complete') 12 | }); 13 | 14 | newman.on('done', function () { 15 | console.log('all done!') 16 | }); 17 | }; 18 | module.exports = MyCustomNewmanReporter -------------------------------------------------------------------------------- /Chapter08/MyReporter/myreporter-1.0.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/API-Testing-and-Development-with-Postman/080f68f781dec97f2f2be9efea15d10a3cecc7ae/Chapter08/MyReporter/myreporter-1.0.0.tgz -------------------------------------------------------------------------------- /Chapter08/MyReporter/newman-reporter-myreporter-1.0.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/API-Testing-and-Development-with-Postman/080f68f781dec97f2f2be9efea15d10a3cecc7ae/Chapter08/MyReporter/newman-reporter-myreporter-1.0.0.tgz -------------------------------------------------------------------------------- /Chapter08/MyReporter/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "newman-reporter-myreporter", 3 | "version": "1.0.0", 4 | "description": "example reporter", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "Dave W", 10 | "license": "ISC" 11 | } 12 | -------------------------------------------------------------------------------- /Chapter08/NewmanTestEnvironment.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "2e789e4d-d79d-48a4-af89-ecd8b4292546", 3 | "name": "Newman Test Env", 4 | "values": [ 5 | { 6 | "key": "baseUrl", 7 | "value": "https://postman-echo.com", 8 | "enabled": true 9 | } 10 | ], 11 | "_postman_variable_scope": "environment", 12 | "_postman_exported_at": "2020-11-04T14:28:26.372Z", 13 | "_postman_exported_using": "Postman/7.34.0" 14 | } -------------------------------------------------------------------------------- /Chapter08/SWAPI Env.postman_environment.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "70754c73-3780-4033-aadd-e6181e251a1e", 3 | "name": "SWAPI Env", 4 | "values": [ 5 | { 6 | "key": "person_id", 7 | "value": "1", 8 | "enabled": true 9 | }, 10 | { 11 | "key": "residentList", 12 | "value": "[]", 13 | "enabled": true 14 | }, 15 | { 16 | "key": "counter", 17 | "value": "", 18 | "enabled": true 19 | } 20 | ], 21 | "_postman_variable_scope": "environment", 22 | "_postman_exported_at": "2020-11-05T14:11:21.906Z", 23 | "_postman_exported_using": "Postman/7.34.0" 24 | } -------------------------------------------------------------------------------- /Chapter08/SWAPI.postman_collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "_postman_id": "f22ae7ab-60f4-41b8-a0ea-d781b3ebc78c", 4 | "name": "SWAPI", 5 | "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" 6 | }, 7 | "item": [ 8 | { 9 | "name": "Luke", 10 | "item": [ 11 | { 12 | "name": "Get First Person", 13 | "event": [ 14 | { 15 | "listen": "test", 16 | "script": { 17 | "id": "6e34c10a-6d65-43f5-9d9b-ae511c54f94c", 18 | "exec": [ 19 | "pm.test(\"Status code is 200\", function () {\r", 20 | " pm.response.to.have.status('OK');\r", 21 | "});\r", 22 | "pm.test(\"Check that the response body contains Luke\", function () {\r", 23 | " pm.expect(pm.response.text()).to.include(\"Luke\");\r", 24 | "});\r", 25 | "pm.test(\"Check that the height is 172\", function () {\r", 26 | " var jsonData = pm.response.json();\r", 27 | " pm.expect(jsonData.height).to.eql(\"172\");\r", 28 | "});\r", 29 | "pm.test(\"Content-Type is present\", function () {\r", 30 | " pm.response.to.have.header(\"Content-Type\",\"application/json\");\r", 31 | "});" 32 | ], 33 | "type": "text/javascript" 34 | } 35 | } 36 | ], 37 | "request": { 38 | "method": "GET", 39 | "header": [], 40 | "url": { 41 | "raw": "{{base_url}}/people/1", 42 | "host": [ 43 | "{{base_url}}" 44 | ], 45 | "path": [ 46 | "people", 47 | "1" 48 | ] 49 | } 50 | }, 51 | "response": [] 52 | }, 53 | { 54 | "name": "Luke's home world", 55 | "event": [ 56 | { 57 | "listen": "prerequest", 58 | "script": { 59 | "id": "5e4bcf6a-9520-4821-b8ec-6340ca314005", 60 | "exec": [ 61 | "" 62 | ], 63 | "type": "text/javascript" 64 | } 65 | }, 66 | { 67 | "listen": "test", 68 | "script": { 69 | "id": "d0225399-e4c2-4a86-a753-be8df21390aa", 70 | "exec": [ 71 | "console.log('test')" 72 | ], 73 | "type": "text/javascript" 74 | } 75 | } 76 | ], 77 | "request": { 78 | "method": "GET", 79 | "header": [], 80 | "url": { 81 | "raw": "{{base_url}}/planets/1", 82 | "host": [ 83 | "{{base_url}}" 84 | ], 85 | "path": [ 86 | "planets", 87 | "1" 88 | ] 89 | } 90 | }, 91 | "response": [] 92 | } 93 | ], 94 | "event": [ 95 | { 96 | "listen": "prerequest", 97 | "script": { 98 | "id": "016f10eb-2309-4855-ae05-9d0573211ee2", 99 | "type": "text/javascript", 100 | "exec": [ 101 | "" 102 | ] 103 | } 104 | }, 105 | { 106 | "listen": "test", 107 | "script": { 108 | "id": "7d9d45ea-f8ba-4709-9d61-73eaaf028e29", 109 | "type": "text/javascript", 110 | "exec": [ 111 | "pm.test(\"Check that they are in film 1\", function () {", 112 | " var jsonData = pm.response.json();", 113 | " pm.expect(jsonData.films).to.contain(\"http://swapi.dev/api/films/1/\");", 114 | "});", 115 | "", 116 | "console.log('folder')" 117 | ] 118 | } 119 | } 120 | ], 121 | "protocolProfileBehavior": {} 122 | }, 123 | { 124 | "name": "Get Homeworld", 125 | "event": [ 126 | { 127 | "listen": "test", 128 | "script": { 129 | "id": "a763a0c5-6a7c-412d-a63b-f6396212e167", 130 | "exec": [ 131 | "var jsonData = pm.response.json();\r", 132 | "var planetResidents = jsonData.residents;\r", 133 | "pm.environment.set(\"residentList\", planetResidents);\r", 134 | "pm.environment.set(\"counter\", 0);\r", 135 | "console.log(planetResidents.length);" 136 | ], 137 | "type": "text/javascript" 138 | } 139 | } 140 | ], 141 | "request": { 142 | "method": "GET", 143 | "header": [], 144 | "url": { 145 | "raw": "{{base_url}}/planets/1", 146 | "host": [ 147 | "{{base_url}}" 148 | ], 149 | "path": [ 150 | "planets", 151 | "1" 152 | ] 153 | } 154 | }, 155 | "response": [] 156 | }, 157 | { 158 | "name": "Get a Person", 159 | "event": [ 160 | { 161 | "listen": "prerequest", 162 | "script": { 163 | "id": "5710dfb2-52b7-4ecc-8c97-882df93a641d", 164 | "exec": [ 165 | "var residentList = pm.environment.get(\"residentList\");\r", 166 | "var currentCount = pm.environment.get(\"counter\");\r", 167 | "if (currentCount < residentList.length) {\r", 168 | " randomResident = residentList[currentCount];\r", 169 | " //var randomResident = residentList[Math.floor(Math.random() * residentList.length)];\r", 170 | " var splitResidentStr = randomResident.split('/');\r", 171 | " var personId = splitResidentStr[splitResidentStr.length - 2];\r", 172 | " pm.environment.set(\"person_id\", personId);\r", 173 | " pm.environment.set(\"counter\",currentCount+1);\r", 174 | " postman.setNextRequest(\"Get a Person\");\r", 175 | "};" 176 | ], 177 | "type": "text/javascript" 178 | } 179 | }, 180 | { 181 | "listen": "test", 182 | "script": { 183 | "id": "89037970-7db1-47f9-bb4a-20c3a6beb673", 184 | "exec": [ 185 | "var jsonData = pm.response.json();\r", 186 | "var homeworldLink = jsonData.homeworld;\r", 187 | "pm.collectionVariables.set(\"homeworld\", homeworldLink);\r", 188 | "console.log('test')" 189 | ], 190 | "type": "text/javascript" 191 | } 192 | } 193 | ], 194 | "request": { 195 | "method": "GET", 196 | "header": [], 197 | "url": { 198 | "raw": "{{base_url}}/people/{{person_id}}", 199 | "host": [ 200 | "{{base_url}}" 201 | ], 202 | "path": [ 203 | "people", 204 | "{{person_id}}" 205 | ] 206 | } 207 | }, 208 | "response": [] 209 | } 210 | ], 211 | "event": [ 212 | { 213 | "listen": "prerequest", 214 | "script": { 215 | "id": "0df09c54-f6f1-4c5a-92da-a5a0d151498d", 216 | "type": "text/javascript", 217 | "exec": [ 218 | "" 219 | ] 220 | } 221 | }, 222 | { 223 | "listen": "test", 224 | "script": { 225 | "id": "88ac683a-83e9-4763-b30f-cb25afd421cb", 226 | "type": "text/javascript", 227 | "exec": [ 228 | "" 229 | ] 230 | } 231 | } 232 | ], 233 | "variable": [ 234 | { 235 | "id": "53e37061-a89b-47c9-a653-561f3b359c16", 236 | "key": "base_url", 237 | "value": "https://swapi.dev/api" 238 | }, 239 | { 240 | "id": "74f97a1c-b625-4590-af50-da8789521b93", 241 | "key": "id", 242 | "value": "" 243 | }, 244 | { 245 | "id": "f91c945f-6182-49ce-a358-9c579a15e66e", 246 | "key": "homeworld", 247 | "value": "" 248 | }, 249 | { 250 | "id": "9b429063-7dbb-4d19-b327-6a7fbe3db3ee", 251 | "key": "residentList", 252 | "value": "" 253 | } 254 | ], 255 | "protocolProfileBehavior": {} 256 | } -------------------------------------------------------------------------------- /Chapter08/TestCollection.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "_postman_id": "57169cda-7442-4f7c-883a-f07e61dbfe36", 4 | "name": "Newman Test", 5 | "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" 6 | }, 7 | "item": [ 8 | { 9 | "name": "Test GET", 10 | "request": { 11 | "method": "GET", 12 | "header": [], 13 | "url": { 14 | "raw": "{{baseUrl}}/get?{{queryParam}}={{queryParamVal}}", 15 | "host": [ 16 | "{{baseUrl}}" 17 | ], 18 | "path": [ 19 | "get" 20 | ], 21 | "query": [ 22 | { 23 | "key": "{{queryParam}}", 24 | "value": "{{queryParamVal}}" 25 | } 26 | ] 27 | } 28 | }, 29 | "response": [] 30 | } 31 | ], 32 | "protocolProfileBehavior": {} 33 | } -------------------------------------------------------------------------------- /Chapter08/myOwnTests: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "_postman_id": "57169cda-7442-4f7c-883a-f07e61dbfe36", 4 | "name": "Newman Test", 5 | "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" 6 | }, 7 | "item": [ 8 | { 9 | "name": "TestFolder1", 10 | "item": [ 11 | { 12 | "name": "Test GET Copy", 13 | "request": { 14 | "method": "GET", 15 | "header": [], 16 | "url": { 17 | "raw": "{{baseUrl}}/get?{{queryParam}}={{queryParamVal}}", 18 | "host": [ 19 | "{{baseUrl}}" 20 | ], 21 | "path": [ 22 | "get" 23 | ], 24 | "query": [ 25 | { 26 | "key": "{{queryParam}}", 27 | "value": "{{queryParamVal}}" 28 | } 29 | ] 30 | } 31 | }, 32 | "response": [] 33 | } 34 | ] 35 | }, 36 | { 37 | "name": "TestFolder2", 38 | "item": [ 39 | { 40 | "name": "Test GET Copy", 41 | "request": { 42 | "method": "GET", 43 | "header": [], 44 | "url": { 45 | "raw": "{{baseUrl}}/get?{{queryParam}}={{queryParamVal}}", 46 | "host": [ 47 | "{{baseUrl}}" 48 | ], 49 | "path": [ 50 | "get" 51 | ], 52 | "query": [ 53 | { 54 | "key": "{{queryParam}}", 55 | "value": "{{queryParamVal}}" 56 | } 57 | ] 58 | } 59 | }, 60 | "response": [] 61 | } 62 | ] 63 | }, 64 | { 65 | "name": "Test GET", 66 | "request": { 67 | "method": "GET", 68 | "header": [], 69 | "url": { 70 | "raw": "{{baseUrl}}/get?{{queryParam}}={{queryParamVal}}", 71 | "host": [ 72 | "{{baseUrl}}" 73 | ], 74 | "path": [ 75 | "get" 76 | ], 77 | "query": [ 78 | { 79 | "key": "{{queryParam}}", 80 | "value": "{{queryParamVal}}" 81 | } 82 | ] 83 | } 84 | }, 85 | "response": [] 86 | } 87 | ] 88 | } -------------------------------------------------------------------------------- /Chapter08/newman/Newman Test-2020-11-10-15-25-27-500-0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Newman Summary Report 6 | 7 | 8 | 9 | 10 | 11 | 419 | 420 | 421 |
422 |
423 | 424 | 428 | 429 |
430 |
431 |
432 | 446 |
447 |
448 |
449 |
450 |

Newman Run Dashboard

451 |
Tuesday, 10 November 2020 10:25:27
452 |
453 |
454 |
455 |
456 |
457 | 458 |
459 |
Total Iterations
460 |

1

461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 | 469 |
470 |
Total Assertions
471 |

0

472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 | 480 |
481 |
Total Failed Tests
482 |

0

483 |
484 |
485 |
486 |
487 |
488 |
489 |
490 | 491 |
492 |
Total Skipped Tests
493 |

0

494 |
495 |
496 |
497 |
498 |
499 |
500 |
501 |
502 |
503 |
504 |
505 |
File Information
506 | Collection: Newman Test
507 | 508 | Environment: Newman Test Env
509 |
510 |
511 |
512 |
513 |
514 |
515 |
516 |
517 |
Timings and Data
518 | Total run duration: 576ms
519 | Total data received: 441B
520 | Average response time: 476ms
521 |
522 |
523 |
524 |
525 |
526 |
527 |
528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 |
Summary ItemTotalFailed
Requests10
Prerequest Scripts00
Test Scripts00
Assertions00
Skipped Tests0-
564 |
565 |
566 |
567 |
568 |
569 |
570 |
571 |
572 |
573 |
574 | 575 | 576 |
577 |

There are no failed tests



578 |
579 |
580 | 581 |
582 | 583 | 584 |
585 |

There are no skipped tests



586 |
587 |
588 |
589 | 590 | 591 | 592 |
593 | 594 | 595 |
596 | 597 |
598 |
1 Iteration available to view
599 | 600 | 604 |
605 |
606 |
607 |
608 |
609 |
610 |
611 | 616 |
617 |
618 |
619 |
620 |
621 |
622 |
623 |
Request Information
624 | Request Method: GET
625 | Request URL: https://postman-echo.com/get?{{queryParam}}={{queryParamVal}}
626 |
627 |
628 |
629 |
630 |
Response Information
631 | Response Code: 200 - OK
632 | Mean time per request: 476ms
633 | Mean size per request: 441B
634 |
635 |
Test Pass Percentage
636 |
637 |
638 |
639 |
No Tests for this request
640 |
641 |
642 |
643 |
644 |
645 |
646 |
647 |
648 |
649 |
650 |
651 |
652 |
653 |
Request Headers
654 |
655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 |
Header NameHeader Value
User-AgentPostmanRuntime/7.26.8
Accept*/*
Cache-Controlno-cache
Postman-Tokenf12edfa0-dc60-485c-a944-bf1b796e15b5
Hostpostman-echo.com
Accept-Encodinggzip, deflate, br
Connectionkeep-alive
688 |
689 |
690 |
691 |
692 |
693 |
694 |
695 |
696 |
697 |
698 |
699 |
Response Headers
700 |
701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 |
Header NameHeader Value
DateTue, 10 Nov 2020 15:25:27 GMT
Content-Typeapplication/json; charset=utf-8
Content-Length441
Connectionkeep-alive
ETagW/"1b9-qW8S0lg04+NdDcCVHOxqqTCCT7U"
VaryAccept-Encoding
set-cookiesails.sid=s%3AfSHb2L5KMo4VCIB40gHxpOeFY73OqOZw.Z%2BCRqx3sLN3W7F1AMyzTeXlo1VffjppSyUl0De64hHg; Path=/; HttpOnly
734 |
735 |
736 |
737 |
738 |
739 |
740 |
741 |
742 |
743 |
744 |
745 |
Response Body
746 |
747 |
{"args":{"{{queryParam}}":"{{queryParamVal}}"},"headers":{"x-forwarded-proto":"https","x-forwarded-port":"443","host":"postman-echo.com","x-amzn-trace-id":"Root=1-5faab0e7-6f8676e4268113f84450b87b","user-agent":"PostmanRuntime/7.26.8","accept":"*/*","cache-control":"no-cache","postman-token":"f12edfa0-dc60-485c-a944-bf1b796e15b5","accept-encoding":"gzip, deflate, br"},"url":"https://postman-echo.com/get?{{queryParam}}={{queryParamVal}}"}
748 |
749 | 752 |
753 |
754 |
755 |
756 |
757 |
758 |
759 |
760 |
Test Information
761 |
No Tests for this request
762 |
763 |
764 |
765 |
766 |
767 |
768 |
769 |
770 |
771 |
772 |
773 |
774 |
775 |
776 |
777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | 790 | 791 | 803 | 804 | 805 | 806 | 813 | 814 | 815 | 816 | 835 | 836 | 837 | 838 | 861 | 862 | 863 | 864 | 887 | 888 | 889 | 890 | 913 | 914 | 915 | 916 | 971 | 972 | 973 | 974 | 975 | 998 | 999 | 1000 | 1001 | 1015 | 1016 | 1017 | 1018 | 1045 | 1046 | 1047 | 1048 | 1101 | 1102 | 1103 | 1104 | 1113 | 1114 | 1115 | 1116 | 1127 | 1128 | 1129 | 1130 | 1156 | 1157 | 1158 | 1159 | -------------------------------------------------------------------------------- /Chapter08/newman/newman-run-report-2020-11-09-14-33-37-630-0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | -------------------------------------------------------------------------------- /Chapter08/newman/newman-run-report-2020-11-09-14-59-42-276-0.json: -------------------------------------------------------------------------------- 1 | { 2 | "collection": { 3 | "_": { 4 | "postman_id": "57169cda-7442-4f7c-883a-f07e61dbfe36" 5 | }, 6 | "item": [ 7 | { 8 | "id": "a602fb94-8929-4738-b5b5-131fb7f74120", 9 | "name": "Test GET", 10 | "request": { 11 | "url": { 12 | "path": [ 13 | "get" 14 | ], 15 | "host": [ 16 | "{{baseUrl}}" 17 | ], 18 | "query": [ 19 | { 20 | "key": "{{queryParam}}", 21 | "value": "{{queryParamVal}}" 22 | } 23 | ], 24 | "variable": [] 25 | }, 26 | "method": "GET" 27 | }, 28 | "response": [], 29 | "event": [] 30 | } 31 | ], 32 | "event": [], 33 | "protocolProfileBehavior": {}, 34 | "variable": [], 35 | "info": { 36 | "_postman_id": "57169cda-7442-4f7c-883a-f07e61dbfe36", 37 | "name": "Newman Test", 38 | "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" 39 | } 40 | }, 41 | "environment": { 42 | "id": "0ed2940a-5ddb-4f6b-883d-e4b279ae5b66", 43 | "values": [ 44 | { 45 | "type": "any", 46 | "value": "https://postman-echo.com", 47 | "key": "baseUrl" 48 | } 49 | ] 50 | }, 51 | "globals": { 52 | "id": "385e7d25-1106-4e34-82eb-4062fd2c4369", 53 | "values": [] 54 | }, 55 | "run": { 56 | "stats": { 57 | "iterations": { 58 | "total": 1, 59 | "pending": 0, 60 | "failed": 0 61 | }, 62 | "items": { 63 | "total": 1, 64 | "pending": 0, 65 | "failed": 0 66 | }, 67 | "scripts": { 68 | "total": 0, 69 | "pending": 0, 70 | "failed": 0 71 | }, 72 | "prerequests": { 73 | "total": 1, 74 | "pending": 0, 75 | "failed": 0 76 | }, 77 | "requests": { 78 | "total": 1, 79 | "pending": 0, 80 | "failed": 0 81 | }, 82 | "tests": { 83 | "total": 1, 84 | "pending": 0, 85 | "failed": 0 86 | }, 87 | "assertions": { 88 | "total": 0, 89 | "pending": 0, 90 | "failed": 0 91 | }, 92 | "testScripts": { 93 | "total": 0, 94 | "pending": 0, 95 | "failed": 0 96 | }, 97 | "prerequestScripts": { 98 | "total": 0, 99 | "pending": 0, 100 | "failed": 0 101 | } 102 | }, 103 | "timings": { 104 | "responseAverage": 436, 105 | "responseMin": 436, 106 | "responseMax": 436, 107 | "responseSd": 0, 108 | "dnsAverage": 0, 109 | "dnsMin": 0, 110 | "dnsMax": 0, 111 | "dnsSd": 0, 112 | "firstByteAverage": 0, 113 | "firstByteMin": 0, 114 | "firstByteMax": 0, 115 | "firstByteSd": 0, 116 | "started": 1604933981813, 117 | "completed": 1604933982274 118 | }, 119 | "executions": [ 120 | { 121 | "cursor": { 122 | "position": 0, 123 | "iteration": 0, 124 | "length": 1, 125 | "cycles": 1, 126 | "empty": false, 127 | "eof": false, 128 | "bof": true, 129 | "cr": false, 130 | "ref": "55dc18a6-0f6e-4605-8797-3a2b6b401375", 131 | "httpRequestId": "bf034543-2942-405f-ad64-0b0b58b5d705" 132 | }, 133 | "item": { 134 | "id": "a602fb94-8929-4738-b5b5-131fb7f74120", 135 | "name": "Test GET", 136 | "request": { 137 | "url": { 138 | "path": [ 139 | "get" 140 | ], 141 | "host": [ 142 | "{{baseUrl}}" 143 | ], 144 | "query": [ 145 | { 146 | "key": "{{queryParam}}", 147 | "value": "{{queryParamVal}}" 148 | } 149 | ], 150 | "variable": [] 151 | }, 152 | "method": "GET" 153 | }, 154 | "response": [], 155 | "event": [] 156 | }, 157 | "request": { 158 | "url": { 159 | "protocol": "https", 160 | "path": [ 161 | "get" 162 | ], 163 | "host": [ 164 | "postman-echo", 165 | "com" 166 | ], 167 | "query": [ 168 | { 169 | "key": "{{queryParam}}", 170 | "value": "{{queryParamVal}}" 171 | } 172 | ], 173 | "variable": [] 174 | }, 175 | "header": [ 176 | { 177 | "key": "User-Agent", 178 | "value": "PostmanRuntime/7.26.8", 179 | "system": true 180 | }, 181 | { 182 | "key": "Accept", 183 | "value": "*/*", 184 | "system": true 185 | }, 186 | { 187 | "key": "Cache-Control", 188 | "value": "no-cache", 189 | "system": true 190 | }, 191 | { 192 | "key": "Postman-Token", 193 | "value": "4fa4dd0b-df7d-4d67-a4df-c0f5a316b8c2", 194 | "system": true 195 | }, 196 | { 197 | "key": "Host", 198 | "value": "postman-echo.com", 199 | "system": true 200 | }, 201 | { 202 | "key": "Accept-Encoding", 203 | "value": "gzip, deflate, br", 204 | "system": true 205 | }, 206 | { 207 | "key": "Connection", 208 | "value": "keep-alive", 209 | "system": true 210 | } 211 | ], 212 | "method": "GET" 213 | }, 214 | "response": { 215 | "id": "293f0a01-d16d-4f08-aa23-53b69a5e2c33", 216 | "status": "OK", 217 | "code": 200, 218 | "header": [ 219 | { 220 | "key": "Date", 221 | "value": "Mon, 09 Nov 2020 14:59:42 GMT" 222 | }, 223 | { 224 | "key": "Content-Type", 225 | "value": "application/json; charset=utf-8" 226 | }, 227 | { 228 | "key": "Content-Length", 229 | "value": "441" 230 | }, 231 | { 232 | "key": "Connection", 233 | "value": "keep-alive" 234 | }, 235 | { 236 | "key": "ETag", 237 | "value": "W/\"1b9-iG3fsLT2OoX2Ts53QbFzniE/Wec\"" 238 | }, 239 | { 240 | "key": "Vary", 241 | "value": "Accept-Encoding" 242 | }, 243 | { 244 | "key": "set-cookie", 245 | "value": "sails.sid=s%3AMnE3nUS04-m1yDEZHmfpfbcRCH6HbjuT.%2FuKaUEtL0F9V3TDm67KdACof3Qbec0uoKeWTOi7KPoA; Path=/; HttpOnly" 246 | } 247 | ], 248 | "stream": { 249 | "type": "Buffer", 250 | "data": [ 251 | 123, 252 | 34, 253 | 97, 254 | 114, 255 | 103, 256 | 115, 257 | 34, 258 | 58, 259 | 123, 260 | 34, 261 | 123, 262 | 123, 263 | 113, 264 | 117, 265 | 101, 266 | 114, 267 | 121, 268 | 80, 269 | 97, 270 | 114, 271 | 97, 272 | 109, 273 | 125, 274 | 125, 275 | 34, 276 | 58, 277 | 34, 278 | 123, 279 | 123, 280 | 113, 281 | 117, 282 | 101, 283 | 114, 284 | 121, 285 | 80, 286 | 97, 287 | 114, 288 | 97, 289 | 109, 290 | 86, 291 | 97, 292 | 108, 293 | 125, 294 | 125, 295 | 34, 296 | 125, 297 | 44, 298 | 34, 299 | 104, 300 | 101, 301 | 97, 302 | 100, 303 | 101, 304 | 114, 305 | 115, 306 | 34, 307 | 58, 308 | 123, 309 | 34, 310 | 120, 311 | 45, 312 | 102, 313 | 111, 314 | 114, 315 | 119, 316 | 97, 317 | 114, 318 | 100, 319 | 101, 320 | 100, 321 | 45, 322 | 112, 323 | 114, 324 | 111, 325 | 116, 326 | 111, 327 | 34, 328 | 58, 329 | 34, 330 | 104, 331 | 116, 332 | 116, 333 | 112, 334 | 115, 335 | 34, 336 | 44, 337 | 34, 338 | 120, 339 | 45, 340 | 102, 341 | 111, 342 | 114, 343 | 119, 344 | 97, 345 | 114, 346 | 100, 347 | 101, 348 | 100, 349 | 45, 350 | 112, 351 | 111, 352 | 114, 353 | 116, 354 | 34, 355 | 58, 356 | 34, 357 | 52, 358 | 52, 359 | 51, 360 | 34, 361 | 44, 362 | 34, 363 | 104, 364 | 111, 365 | 115, 366 | 116, 367 | 34, 368 | 58, 369 | 34, 370 | 112, 371 | 111, 372 | 115, 373 | 116, 374 | 109, 375 | 97, 376 | 110, 377 | 45, 378 | 101, 379 | 99, 380 | 104, 381 | 111, 382 | 46, 383 | 99, 384 | 111, 385 | 109, 386 | 34, 387 | 44, 388 | 34, 389 | 120, 390 | 45, 391 | 97, 392 | 109, 393 | 122, 394 | 110, 395 | 45, 396 | 116, 397 | 114, 398 | 97, 399 | 99, 400 | 101, 401 | 45, 402 | 105, 403 | 100, 404 | 34, 405 | 58, 406 | 34, 407 | 82, 408 | 111, 409 | 111, 410 | 116, 411 | 61, 412 | 49, 413 | 45, 414 | 53, 415 | 102, 416 | 97, 417 | 57, 418 | 53, 419 | 57, 420 | 53, 421 | 101, 422 | 45, 423 | 50, 424 | 55, 425 | 52, 426 | 53, 427 | 101, 428 | 53, 429 | 56, 430 | 54, 431 | 48, 432 | 48, 433 | 97, 434 | 53, 435 | 53, 436 | 99, 437 | 100, 438 | 51, 439 | 48, 440 | 98, 441 | 48, 442 | 55, 443 | 99, 444 | 55, 445 | 55, 446 | 51, 447 | 34, 448 | 44, 449 | 34, 450 | 117, 451 | 115, 452 | 101, 453 | 114, 454 | 45, 455 | 97, 456 | 103, 457 | 101, 458 | 110, 459 | 116, 460 | 34, 461 | 58, 462 | 34, 463 | 80, 464 | 111, 465 | 115, 466 | 116, 467 | 109, 468 | 97, 469 | 110, 470 | 82, 471 | 117, 472 | 110, 473 | 116, 474 | 105, 475 | 109, 476 | 101, 477 | 47, 478 | 55, 479 | 46, 480 | 50, 481 | 54, 482 | 46, 483 | 56, 484 | 34, 485 | 44, 486 | 34, 487 | 97, 488 | 99, 489 | 99, 490 | 101, 491 | 112, 492 | 116, 493 | 34, 494 | 58, 495 | 34, 496 | 42, 497 | 47, 498 | 42, 499 | 34, 500 | 44, 501 | 34, 502 | 99, 503 | 97, 504 | 99, 505 | 104, 506 | 101, 507 | 45, 508 | 99, 509 | 111, 510 | 110, 511 | 116, 512 | 114, 513 | 111, 514 | 108, 515 | 34, 516 | 58, 517 | 34, 518 | 110, 519 | 111, 520 | 45, 521 | 99, 522 | 97, 523 | 99, 524 | 104, 525 | 101, 526 | 34, 527 | 44, 528 | 34, 529 | 112, 530 | 111, 531 | 115, 532 | 116, 533 | 109, 534 | 97, 535 | 110, 536 | 45, 537 | 116, 538 | 111, 539 | 107, 540 | 101, 541 | 110, 542 | 34, 543 | 58, 544 | 34, 545 | 52, 546 | 102, 547 | 97, 548 | 52, 549 | 100, 550 | 100, 551 | 48, 552 | 98, 553 | 45, 554 | 100, 555 | 102, 556 | 55, 557 | 100, 558 | 45, 559 | 52, 560 | 100, 561 | 54, 562 | 55, 563 | 45, 564 | 97, 565 | 52, 566 | 100, 567 | 102, 568 | 45, 569 | 99, 570 | 48, 571 | 102, 572 | 53, 573 | 97, 574 | 51, 575 | 49, 576 | 54, 577 | 98, 578 | 56, 579 | 99, 580 | 50, 581 | 34, 582 | 44, 583 | 34, 584 | 97, 585 | 99, 586 | 99, 587 | 101, 588 | 112, 589 | 116, 590 | 45, 591 | 101, 592 | 110, 593 | 99, 594 | 111, 595 | 100, 596 | 105, 597 | 110, 598 | 103, 599 | 34, 600 | 58, 601 | 34, 602 | 103, 603 | 122, 604 | 105, 605 | 112, 606 | 44, 607 | 32, 608 | 100, 609 | 101, 610 | 102, 611 | 108, 612 | 97, 613 | 116, 614 | 101, 615 | 44, 616 | 32, 617 | 98, 618 | 114, 619 | 34, 620 | 125, 621 | 44, 622 | 34, 623 | 117, 624 | 114, 625 | 108, 626 | 34, 627 | 58, 628 | 34, 629 | 104, 630 | 116, 631 | 116, 632 | 112, 633 | 115, 634 | 58, 635 | 47, 636 | 47, 637 | 112, 638 | 111, 639 | 115, 640 | 116, 641 | 109, 642 | 97, 643 | 110, 644 | 45, 645 | 101, 646 | 99, 647 | 104, 648 | 111, 649 | 46, 650 | 99, 651 | 111, 652 | 109, 653 | 47, 654 | 103, 655 | 101, 656 | 116, 657 | 63, 658 | 123, 659 | 123, 660 | 113, 661 | 117, 662 | 101, 663 | 114, 664 | 121, 665 | 80, 666 | 97, 667 | 114, 668 | 97, 669 | 109, 670 | 125, 671 | 125, 672 | 61, 673 | 123, 674 | 123, 675 | 113, 676 | 117, 677 | 101, 678 | 114, 679 | 121, 680 | 80, 681 | 97, 682 | 114, 683 | 97, 684 | 109, 685 | 86, 686 | 97, 687 | 108, 688 | 125, 689 | 125, 690 | 34, 691 | 125 692 | ] 693 | }, 694 | "cookie": [], 695 | "responseTime": 436, 696 | "responseSize": 441 697 | }, 698 | "id": "a602fb94-8929-4738-b5b5-131fb7f74120" 699 | } 700 | ], 701 | "transfers": { 702 | "responseTotal": 441 703 | }, 704 | "failures": [], 705 | "error": null 706 | } 707 | } -------------------------------------------------------------------------------- /Chapter08/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "requires": true, 3 | "lockfileVersion": 1, 4 | "dependencies": { 5 | "@postman/form-data": { 6 | "version": "3.1.1", 7 | "resolved": "https://registry.npmjs.org/@postman/form-data/-/form-data-3.1.1.tgz", 8 | "integrity": "sha512-vjh8Q2a8S6UCm/KKs31XFJqEEgmbjBmpPNVV2eVav6905wyFAwaUOBGA1NPBI4ERH9MMZc6w0umFgM6WbEPMdg==", 9 | "requires": { 10 | "asynckit": "^0.4.0", 11 | "combined-stream": "^1.0.8", 12 | "mime-types": "^2.1.12" 13 | } 14 | }, 15 | "@postman/tunnel-agent": { 16 | "version": "0.6.3", 17 | "resolved": "https://registry.npmjs.org/@postman/tunnel-agent/-/tunnel-agent-0.6.3.tgz", 18 | "integrity": "sha512-k57fzmAZ2PJGxfOA4SGR05ejorHbVAa/84Hxh/2nAztjNXc4ZjOm9NUIk6/Z6LCrBvJZqjRZbN8e/nROVUPVdg==", 19 | "requires": { 20 | "safe-buffer": "^5.0.1" 21 | } 22 | }, 23 | "ajv": { 24 | "version": "6.12.6", 25 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", 26 | "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", 27 | "requires": { 28 | "fast-deep-equal": "^3.1.1", 29 | "fast-json-stable-stringify": "^2.0.0", 30 | "json-schema-traverse": "^0.4.1", 31 | "uri-js": "^4.2.2" 32 | } 33 | }, 34 | "ansi-regex": { 35 | "version": "5.0.0", 36 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 37 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" 38 | }, 39 | "ansi-styles": { 40 | "version": "3.2.1", 41 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 42 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 43 | "requires": { 44 | "color-convert": "^1.9.0" 45 | } 46 | }, 47 | "array-uniq": { 48 | "version": "1.0.3", 49 | "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", 50 | "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" 51 | }, 52 | "asn1": { 53 | "version": "0.2.4", 54 | "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", 55 | "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", 56 | "requires": { 57 | "safer-buffer": "~2.1.0" 58 | } 59 | }, 60 | "assert-plus": { 61 | "version": "1.0.0", 62 | "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", 63 | "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" 64 | }, 65 | "async": { 66 | "version": "3.2.0", 67 | "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", 68 | "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==" 69 | }, 70 | "asynckit": { 71 | "version": "0.4.0", 72 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 73 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" 74 | }, 75 | "aws-sign2": { 76 | "version": "0.7.0", 77 | "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", 78 | "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" 79 | }, 80 | "aws4": { 81 | "version": "1.11.0", 82 | "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", 83 | "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" 84 | }, 85 | "base64-js": { 86 | "version": "1.5.1", 87 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", 88 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" 89 | }, 90 | "bcrypt-pbkdf": { 91 | "version": "1.0.2", 92 | "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", 93 | "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", 94 | "requires": { 95 | "tweetnacl": "^0.14.3" 96 | } 97 | }, 98 | "bluebird": { 99 | "version": "2.11.0", 100 | "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", 101 | "integrity": "sha1-U0uQM8AiyVecVro7Plpcqvu2UOE=" 102 | }, 103 | "brotli": { 104 | "version": "1.3.2", 105 | "resolved": "https://registry.npmjs.org/brotli/-/brotli-1.3.2.tgz", 106 | "integrity": "sha1-UlqcrU/LqWR119OI9q7LE+7VL0Y=", 107 | "requires": { 108 | "base64-js": "^1.1.2" 109 | } 110 | }, 111 | "caseless": { 112 | "version": "0.12.0", 113 | "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", 114 | "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" 115 | }, 116 | "chalk": { 117 | "version": "2.4.2", 118 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 119 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 120 | "requires": { 121 | "ansi-styles": "^3.2.1", 122 | "escape-string-regexp": "^1.0.5", 123 | "supports-color": "^5.3.0" 124 | } 125 | }, 126 | "chardet": { 127 | "version": "1.3.0", 128 | "resolved": "https://registry.npmjs.org/chardet/-/chardet-1.3.0.tgz", 129 | "integrity": "sha512-cyTQGGptIjIT+CMGT5J/0l9c6Fb+565GCFjjeUTKxUO7w3oR+FcNCMEKTn5xtVKaLFmladN7QF68IiQsv5Fbdw==" 130 | }, 131 | "charset": { 132 | "version": "1.0.1", 133 | "resolved": "https://registry.npmjs.org/charset/-/charset-1.0.1.tgz", 134 | "integrity": "sha512-6dVyOOYjpfFcL1Y4qChrAoQLRHvj2ziyhcm0QJlhOcAhykL/k1kTUPbeo+87MNRTRdk2OIIsIXbuF3x2wi5EXg==" 135 | }, 136 | "cli-progress": { 137 | "version": "3.8.2", 138 | "resolved": "https://registry.npmjs.org/cli-progress/-/cli-progress-3.8.2.tgz", 139 | "integrity": "sha512-qRwBxLldMSfxB+YGFgNRaj5vyyHe1yMpVeDL79c+7puGujdKJHQHydgqXDcrkvQgJ5U/d3lpf6vffSoVVUftVQ==", 140 | "requires": { 141 | "colors": "^1.1.2", 142 | "string-width": "^4.2.0" 143 | } 144 | }, 145 | "cli-table3": { 146 | "version": "0.6.0", 147 | "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.0.tgz", 148 | "integrity": "sha512-gnB85c3MGC7Nm9I/FkiasNBOKjOiO1RNuXXarQms37q4QMpWdlbBgD/VnOStA2faG1dpXMv31RFApjX1/QdgWQ==", 149 | "requires": { 150 | "colors": "^1.1.2", 151 | "object-assign": "^4.1.0", 152 | "string-width": "^4.2.0" 153 | } 154 | }, 155 | "color-convert": { 156 | "version": "1.9.3", 157 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 158 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 159 | "requires": { 160 | "color-name": "1.1.3" 161 | } 162 | }, 163 | "color-name": { 164 | "version": "1.1.3", 165 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 166 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" 167 | }, 168 | "colors": { 169 | "version": "1.4.0", 170 | "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", 171 | "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" 172 | }, 173 | "combined-stream": { 174 | "version": "1.0.8", 175 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 176 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 177 | "requires": { 178 | "delayed-stream": "~1.0.0" 179 | } 180 | }, 181 | "commander": { 182 | "version": "6.2.0", 183 | "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.0.tgz", 184 | "integrity": "sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q==" 185 | }, 186 | "core-util-is": { 187 | "version": "1.0.2", 188 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 189 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" 190 | }, 191 | "csv-parse": { 192 | "version": "4.12.0", 193 | "resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-4.12.0.tgz", 194 | "integrity": "sha512-wPQl3H79vWLPI8cgKFcQXl0NBgYYEqVnT1i6/So7OjMpsI540oD7p93r3w6fDSyPvwkTepG05F69/7AViX2lXg==" 195 | }, 196 | "dashdash": { 197 | "version": "1.14.1", 198 | "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", 199 | "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", 200 | "requires": { 201 | "assert-plus": "^1.0.0" 202 | } 203 | }, 204 | "dbug": { 205 | "version": "0.4.2", 206 | "resolved": "https://registry.npmjs.org/dbug/-/dbug-0.4.2.tgz", 207 | "integrity": "sha1-MrSzEF6IYQQ6b5rHVdgOVC02WzE=" 208 | }, 209 | "delayed-stream": { 210 | "version": "1.0.0", 211 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 212 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" 213 | }, 214 | "dom-serializer": { 215 | "version": "0.2.2", 216 | "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", 217 | "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", 218 | "requires": { 219 | "domelementtype": "^2.0.1", 220 | "entities": "^2.0.0" 221 | }, 222 | "dependencies": { 223 | "domelementtype": { 224 | "version": "2.0.2", 225 | "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.2.tgz", 226 | "integrity": "sha512-wFwTwCVebUrMgGeAwRL/NhZtHAUyT9n9yg4IMDwf10+6iCMxSkVq9MGCVEH+QZWo1nNidy8kNvwmv4zWHDTqvA==" 227 | }, 228 | "entities": { 229 | "version": "2.1.0", 230 | "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", 231 | "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==" 232 | } 233 | } 234 | }, 235 | "domelementtype": { 236 | "version": "1.3.1", 237 | "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", 238 | "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" 239 | }, 240 | "domhandler": { 241 | "version": "2.4.2", 242 | "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", 243 | "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", 244 | "requires": { 245 | "domelementtype": "1" 246 | } 247 | }, 248 | "domutils": { 249 | "version": "1.7.0", 250 | "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", 251 | "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", 252 | "requires": { 253 | "dom-serializer": "0", 254 | "domelementtype": "1" 255 | } 256 | }, 257 | "ecc-jsbn": { 258 | "version": "0.1.2", 259 | "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", 260 | "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", 261 | "requires": { 262 | "jsbn": "~0.1.0", 263 | "safer-buffer": "^2.1.0" 264 | } 265 | }, 266 | "emoji-regex": { 267 | "version": "8.0.0", 268 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 269 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" 270 | }, 271 | "entities": { 272 | "version": "1.1.2", 273 | "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", 274 | "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" 275 | }, 276 | "escape-html": { 277 | "version": "1.0.3", 278 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 279 | "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" 280 | }, 281 | "escape-string-regexp": { 282 | "version": "1.0.5", 283 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 284 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" 285 | }, 286 | "eventemitter3": { 287 | "version": "4.0.7", 288 | "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", 289 | "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" 290 | }, 291 | "extend": { 292 | "version": "3.0.2", 293 | "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", 294 | "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" 295 | }, 296 | "extsprintf": { 297 | "version": "1.3.0", 298 | "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", 299 | "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" 300 | }, 301 | "faker": { 302 | "version": "5.1.0", 303 | "resolved": "https://registry.npmjs.org/faker/-/faker-5.1.0.tgz", 304 | "integrity": "sha512-RrWKFSSA/aNLP0g3o2WW1Zez7/MnMr7xkiZmoCfAGZmdkDQZ6l2KtuXHN5XjdvpRjDl8+3vf+Rrtl06Z352+Mw==" 305 | }, 306 | "fast-deep-equal": { 307 | "version": "3.1.3", 308 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", 309 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" 310 | }, 311 | "fast-json-stable-stringify": { 312 | "version": "2.1.0", 313 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", 314 | "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" 315 | }, 316 | "file-type": { 317 | "version": "3.9.0", 318 | "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", 319 | "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=" 320 | }, 321 | "filesize": { 322 | "version": "6.1.0", 323 | "resolved": "https://registry.npmjs.org/filesize/-/filesize-6.1.0.tgz", 324 | "integrity": "sha512-LpCHtPQ3sFx67z+uh2HnSyWSLLu5Jxo21795uRDuar/EOuYWXib5EmPaGIBuSnRqH2IODiKA2k5re/K9OnN/Yg==" 325 | }, 326 | "flatted": { 327 | "version": "3.1.0", 328 | "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.0.tgz", 329 | "integrity": "sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA==" 330 | }, 331 | "forever-agent": { 332 | "version": "0.6.1", 333 | "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", 334 | "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" 335 | }, 336 | "getpass": { 337 | "version": "0.1.7", 338 | "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", 339 | "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", 340 | "requires": { 341 | "assert-plus": "^1.0.0" 342 | } 343 | }, 344 | "handlebars": { 345 | "version": "4.7.6", 346 | "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", 347 | "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", 348 | "requires": { 349 | "minimist": "^1.2.5", 350 | "neo-async": "^2.6.0", 351 | "source-map": "^0.6.1", 352 | "uglify-js": "^3.1.4", 353 | "wordwrap": "^1.0.0" 354 | } 355 | }, 356 | "har-schema": { 357 | "version": "2.0.0", 358 | "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", 359 | "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" 360 | }, 361 | "har-validator": { 362 | "version": "5.1.5", 363 | "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", 364 | "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", 365 | "requires": { 366 | "ajv": "^6.12.3", 367 | "har-schema": "^2.0.0" 368 | } 369 | }, 370 | "has-ansi": { 371 | "version": "2.0.0", 372 | "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", 373 | "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", 374 | "requires": { 375 | "ansi-regex": "^2.0.0" 376 | }, 377 | "dependencies": { 378 | "ansi-regex": { 379 | "version": "2.1.1", 380 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", 381 | "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" 382 | } 383 | } 384 | }, 385 | "has-flag": { 386 | "version": "3.0.0", 387 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 388 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" 389 | }, 390 | "htmlparser2": { 391 | "version": "3.10.1", 392 | "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", 393 | "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", 394 | "requires": { 395 | "domelementtype": "^1.3.1", 396 | "domhandler": "^2.3.0", 397 | "domutils": "^1.5.1", 398 | "entities": "^1.1.1", 399 | "inherits": "^2.0.1", 400 | "readable-stream": "^3.1.1" 401 | } 402 | }, 403 | "http-reasons": { 404 | "version": "0.1.0", 405 | "resolved": "https://registry.npmjs.org/http-reasons/-/http-reasons-0.1.0.tgz", 406 | "integrity": "sha1-qVPKZwB4Zp3eFCzomUAbnW6F07Q=" 407 | }, 408 | "http-signature": { 409 | "version": "1.3.5", 410 | "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.5.tgz", 411 | "integrity": "sha512-NwoTQYSJoFt34jSBbwzDHDofoA61NGXzu6wXh95o1Ry62EnmKjXb/nR/RknLeZ3G/uGwrlKNY2z7uPt+Cdl7Tw==", 412 | "requires": { 413 | "assert-plus": "^1.0.0", 414 | "jsprim": "^1.2.2", 415 | "sshpk": "^1.14.1" 416 | } 417 | }, 418 | "httpntlm": { 419 | "version": "1.7.6", 420 | "resolved": "https://registry.npmjs.org/httpntlm/-/httpntlm-1.7.6.tgz", 421 | "integrity": "sha1-aZHoNSg2AH1nEBuD247Q+RX5BtA=", 422 | "requires": { 423 | "httpreq": ">=0.4.22", 424 | "underscore": "~1.7.0" 425 | } 426 | }, 427 | "httpreq": { 428 | "version": "0.4.24", 429 | "resolved": "https://registry.npmjs.org/httpreq/-/httpreq-0.4.24.tgz", 430 | "integrity": "sha1-QzX/2CzZaWaKOUZckprGHWOTYn8=" 431 | }, 432 | "iconv-lite": { 433 | "version": "0.6.2", 434 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz", 435 | "integrity": "sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==", 436 | "requires": { 437 | "safer-buffer": ">= 2.1.2 < 3.0.0" 438 | } 439 | }, 440 | "inherits": { 441 | "version": "2.0.4", 442 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 443 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 444 | }, 445 | "intel": { 446 | "version": "1.2.0", 447 | "resolved": "https://registry.npmjs.org/intel/-/intel-1.2.0.tgz", 448 | "integrity": "sha1-EdEUfraz9Fgr31M3s31UFYTp5B4=", 449 | "requires": { 450 | "chalk": "^1.1.0", 451 | "dbug": "~0.4.2", 452 | "stack-trace": "~0.0.9", 453 | "strftime": "~0.10.0", 454 | "symbol": "~0.3.1", 455 | "utcstring": "~0.1.0" 456 | }, 457 | "dependencies": { 458 | "ansi-regex": { 459 | "version": "2.1.1", 460 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", 461 | "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" 462 | }, 463 | "ansi-styles": { 464 | "version": "2.2.1", 465 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", 466 | "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" 467 | }, 468 | "chalk": { 469 | "version": "1.1.3", 470 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", 471 | "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", 472 | "requires": { 473 | "ansi-styles": "^2.2.1", 474 | "escape-string-regexp": "^1.0.2", 475 | "has-ansi": "^2.0.0", 476 | "strip-ansi": "^3.0.0", 477 | "supports-color": "^2.0.0" 478 | } 479 | }, 480 | "strip-ansi": { 481 | "version": "3.0.1", 482 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", 483 | "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", 484 | "requires": { 485 | "ansi-regex": "^2.0.0" 486 | } 487 | }, 488 | "supports-color": { 489 | "version": "2.0.0", 490 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", 491 | "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" 492 | } 493 | } 494 | }, 495 | "ip-regex": { 496 | "version": "2.1.0", 497 | "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", 498 | "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=" 499 | }, 500 | "is-fullwidth-code-point": { 501 | "version": "3.0.0", 502 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 503 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" 504 | }, 505 | "is-typedarray": { 506 | "version": "1.0.0", 507 | "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", 508 | "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" 509 | }, 510 | "isstream": { 511 | "version": "0.1.2", 512 | "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", 513 | "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" 514 | }, 515 | "js-sha512": { 516 | "version": "0.8.0", 517 | "resolved": "https://registry.npmjs.org/js-sha512/-/js-sha512-0.8.0.tgz", 518 | "integrity": "sha512-PWsmefG6Jkodqt+ePTvBZCSMFgN7Clckjd0O7su3I0+BW2QWUTJNzjktHsztGLhncP2h8mcF9V9Y2Ha59pAViQ==" 519 | }, 520 | "jsbn": { 521 | "version": "0.1.1", 522 | "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", 523 | "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" 524 | }, 525 | "json-schema": { 526 | "version": "0.2.3", 527 | "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", 528 | "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" 529 | }, 530 | "json-schema-traverse": { 531 | "version": "0.4.1", 532 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 533 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" 534 | }, 535 | "json-stringify-safe": { 536 | "version": "5.0.1", 537 | "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", 538 | "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" 539 | }, 540 | "jsprim": { 541 | "version": "1.4.1", 542 | "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", 543 | "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", 544 | "requires": { 545 | "assert-plus": "1.0.0", 546 | "extsprintf": "1.3.0", 547 | "json-schema": "0.2.3", 548 | "verror": "1.10.0" 549 | } 550 | }, 551 | "liquid-json": { 552 | "version": "0.3.1", 553 | "resolved": "https://registry.npmjs.org/liquid-json/-/liquid-json-0.3.1.tgz", 554 | "integrity": "sha1-kVWhgTbYprJhXl8W+aJEira1Duo=" 555 | }, 556 | "lodash": { 557 | "version": "4.17.20", 558 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", 559 | "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" 560 | }, 561 | "lodash.clonedeep": { 562 | "version": "4.5.0", 563 | "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", 564 | "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" 565 | }, 566 | "lodash.escaperegexp": { 567 | "version": "4.1.2", 568 | "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz", 569 | "integrity": "sha1-ZHYsSGGAglGKw99Mz11YhtriA0c=" 570 | }, 571 | "lodash.isplainobject": { 572 | "version": "4.0.6", 573 | "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", 574 | "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" 575 | }, 576 | "lodash.isstring": { 577 | "version": "4.0.1", 578 | "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", 579 | "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" 580 | }, 581 | "lodash.mergewith": { 582 | "version": "4.6.2", 583 | "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz", 584 | "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==" 585 | }, 586 | "marked": { 587 | "version": "1.2.0", 588 | "resolved": "https://registry.npmjs.org/marked/-/marked-1.2.0.tgz", 589 | "integrity": "sha512-tiRxakgbNPBr301ihe/785NntvYyhxlqcL3YaC8CaxJQh7kiaEtrN9B/eK2I2943Yjkh5gw25chYFDQhOMCwMA==" 590 | }, 591 | "mime-db": { 592 | "version": "1.44.0", 593 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", 594 | "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" 595 | }, 596 | "mime-format": { 597 | "version": "2.0.0", 598 | "resolved": "https://registry.npmjs.org/mime-format/-/mime-format-2.0.0.tgz", 599 | "integrity": "sha1-4p+IkeKE14JwJG8AUNaDS9u+EzI=", 600 | "requires": { 601 | "charset": "^1.0.0" 602 | } 603 | }, 604 | "mime-types": { 605 | "version": "2.1.27", 606 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", 607 | "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", 608 | "requires": { 609 | "mime-db": "1.44.0" 610 | } 611 | }, 612 | "minimist": { 613 | "version": "1.2.5", 614 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", 615 | "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" 616 | }, 617 | "mkdirp": { 618 | "version": "1.0.4", 619 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", 620 | "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" 621 | }, 622 | "neo-async": { 623 | "version": "2.6.2", 624 | "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", 625 | "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" 626 | }, 627 | "newman": { 628 | "version": "5.2.1", 629 | "resolved": "https://registry.npmjs.org/newman/-/newman-5.2.1.tgz", 630 | "integrity": "sha512-kEuTMQCiORHZFx92sPVih8RHsJ40JxgxvlsrUe6MFXLQg2/UrO1KaUQCDabTy41tOu0a+dx6Mtg+x+uK1rCPcA==", 631 | "requires": { 632 | "async": "3.2.0", 633 | "chardet": "1.3.0", 634 | "cli-progress": "3.8.2", 635 | "cli-table3": "0.6.0", 636 | "colors": "1.4.0", 637 | "commander": "6.2.0", 638 | "csv-parse": "4.12.0", 639 | "eventemitter3": "4.0.7", 640 | "filesize": "6.1.0", 641 | "lodash": "4.17.20", 642 | "mkdirp": "1.0.4", 643 | "postman-collection": "3.6.8", 644 | "postman-collection-transformer": "3.3.3", 645 | "postman-request": "2.88.1-postman.27", 646 | "postman-runtime": "7.26.8", 647 | "pretty-ms": "7.0.1", 648 | "semver": "7.3.2", 649 | "serialised-error": "1.1.3", 650 | "tough-cookie": "3.0.1", 651 | "word-wrap": "1.2.3", 652 | "xmlbuilder": "15.1.1" 653 | } 654 | }, 655 | "node-oauth1": { 656 | "version": "1.3.0", 657 | "resolved": "https://registry.npmjs.org/node-oauth1/-/node-oauth1-1.3.0.tgz", 658 | "integrity": "sha512-0yggixNfrA1KcBwvh/Hy2xAS1Wfs9dcg6TdFf2zN7gilcAigMdrtZ4ybrBSXBgLvGDw9V1p2MRnGBMq7XjTWLg==" 659 | }, 660 | "number-is-nan": { 661 | "version": "1.0.1", 662 | "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", 663 | "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" 664 | }, 665 | "oauth-sign": { 666 | "version": "0.9.0", 667 | "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", 668 | "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" 669 | }, 670 | "object-assign": { 671 | "version": "4.1.1", 672 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 673 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" 674 | }, 675 | "object-hash": { 676 | "version": "1.3.1", 677 | "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz", 678 | "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==" 679 | }, 680 | "parse-ms": { 681 | "version": "2.1.0", 682 | "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz", 683 | "integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==" 684 | }, 685 | "performance-now": { 686 | "version": "2.1.0", 687 | "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", 688 | "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" 689 | }, 690 | "postcss": { 691 | "version": "7.0.35", 692 | "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", 693 | "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", 694 | "requires": { 695 | "chalk": "^2.4.2", 696 | "source-map": "^0.6.1", 697 | "supports-color": "^6.1.0" 698 | }, 699 | "dependencies": { 700 | "supports-color": { 701 | "version": "6.1.0", 702 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", 703 | "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", 704 | "requires": { 705 | "has-flag": "^3.0.0" 706 | } 707 | } 708 | } 709 | }, 710 | "postman-collection": { 711 | "version": "3.6.8", 712 | "resolved": "https://registry.npmjs.org/postman-collection/-/postman-collection-3.6.8.tgz", 713 | "integrity": "sha512-TNPaK2dpVRhttUFo/WN0ReopXEtuSQMktwcvwJbQ0z8K+5hftvyx2ia40xgg9qFl/Ra78qoNTUmLL1s3lRqLMg==", 714 | "requires": { 715 | "escape-html": "1.0.3", 716 | "faker": "5.1.0", 717 | "file-type": "3.9.0", 718 | "http-reasons": "0.1.0", 719 | "iconv-lite": "0.6.2", 720 | "liquid-json": "0.3.1", 721 | "lodash": "4.17.20", 722 | "marked": "1.2.0", 723 | "mime-format": "2.0.0", 724 | "mime-types": "2.1.27", 725 | "postman-url-encoder": "3.0.0", 726 | "sanitize-html": "1.20.1", 727 | "semver": "7.3.2", 728 | "uuid": "3.4.0" 729 | } 730 | }, 731 | "postman-collection-transformer": { 732 | "version": "3.3.3", 733 | "resolved": "https://registry.npmjs.org/postman-collection-transformer/-/postman-collection-transformer-3.3.3.tgz", 734 | "integrity": "sha512-Ra0hfljwB6xnGJ7a638K0TkXTf5BuwGNo1Ahpa9ECehOTOlUFisE8dqX5VZl04QGbpvN5nmr0rwrtLXtK53Abg==", 735 | "requires": { 736 | "commander": "5.1.0", 737 | "inherits": "2.0.4", 738 | "intel": "1.2.0", 739 | "lodash": "4.17.19", 740 | "semver": "7.3.2", 741 | "strip-json-comments": "3.1.1" 742 | }, 743 | "dependencies": { 744 | "commander": { 745 | "version": "5.1.0", 746 | "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", 747 | "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==" 748 | }, 749 | "lodash": { 750 | "version": "4.17.19", 751 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", 752 | "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" 753 | } 754 | } 755 | }, 756 | "postman-request": { 757 | "version": "2.88.1-postman.27", 758 | "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.27.tgz", 759 | "integrity": "sha512-4Qc7p3/cbp5S4Q6LcOzJ+K5N7loWDKjW0S9hj8M2AMJDUVcFUbdgvQb6ZfTERz2+34xP9ByCy7VhdnNCATe/bA==", 760 | "requires": { 761 | "@postman/form-data": "~3.1.1", 762 | "@postman/tunnel-agent": "^0.6.3", 763 | "aws-sign2": "~0.7.0", 764 | "aws4": "^1.8.0", 765 | "brotli": "~1.3.2", 766 | "caseless": "~0.12.0", 767 | "combined-stream": "~1.0.6", 768 | "extend": "~3.0.2", 769 | "forever-agent": "~0.6.1", 770 | "har-validator": "~5.1.3", 771 | "http-signature": "~1.3.1", 772 | "is-typedarray": "~1.0.0", 773 | "isstream": "~0.1.2", 774 | "json-stringify-safe": "~5.0.1", 775 | "mime-types": "~2.1.19", 776 | "oauth-sign": "~0.9.0", 777 | "performance-now": "^2.1.0", 778 | "qs": "~6.5.2", 779 | "safe-buffer": "^5.1.2", 780 | "stream-length": "^1.0.2", 781 | "tough-cookie": "~2.5.0", 782 | "uuid": "^3.3.2" 783 | }, 784 | "dependencies": { 785 | "tough-cookie": { 786 | "version": "2.5.0", 787 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", 788 | "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", 789 | "requires": { 790 | "psl": "^1.1.28", 791 | "punycode": "^2.1.1" 792 | } 793 | } 794 | } 795 | }, 796 | "postman-runtime": { 797 | "version": "7.26.8", 798 | "resolved": "https://registry.npmjs.org/postman-runtime/-/postman-runtime-7.26.8.tgz", 799 | "integrity": "sha512-ZMUZ7mQ2SMOX/C/ntgx2SAfRt3VV6wOy+aLyWbAqpQPo5Jfodxwv9QhxGj3S2km+IYzO6BT1luzE8X8fr2UafA==", 800 | "requires": { 801 | "async": "2.6.3", 802 | "aws4": "1.10.1", 803 | "eventemitter3": "4.0.7", 804 | "handlebars": "4.7.6", 805 | "http-reasons": "0.1.0", 806 | "httpntlm": "1.7.6", 807 | "inherits": "2.0.4", 808 | "js-sha512": "0.8.0", 809 | "lodash": "4.17.20", 810 | "node-oauth1": "1.3.0", 811 | "performance-now": "2.1.0", 812 | "postman-collection": "3.6.8", 813 | "postman-request": "2.88.1-postman.27", 814 | "postman-sandbox": "4.0.0", 815 | "postman-url-encoder": "3.0.0", 816 | "resolve-from": "5.0.0", 817 | "serialised-error": "1.1.3", 818 | "tough-cookie": "3.0.1", 819 | "uuid": "3.4.0" 820 | }, 821 | "dependencies": { 822 | "async": { 823 | "version": "2.6.3", 824 | "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", 825 | "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", 826 | "requires": { 827 | "lodash": "^4.17.14" 828 | } 829 | }, 830 | "aws4": { 831 | "version": "1.10.1", 832 | "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz", 833 | "integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==" 834 | } 835 | } 836 | }, 837 | "postman-sandbox": { 838 | "version": "4.0.0", 839 | "resolved": "https://registry.npmjs.org/postman-sandbox/-/postman-sandbox-4.0.0.tgz", 840 | "integrity": "sha512-0j1VCDa5MHMTfZqv2XSYUyn+hgT9izoRdGFAvjtHCH+i+2TP1KxqXzjxXzOdx1pt26wpl9APdJ2hKKFpx9UlrQ==", 841 | "requires": { 842 | "lodash": "4.17.20", 843 | "teleport-javascript": "1.0.0", 844 | "uvm": "2.0.1" 845 | } 846 | }, 847 | "postman-url-encoder": { 848 | "version": "3.0.0", 849 | "resolved": "https://registry.npmjs.org/postman-url-encoder/-/postman-url-encoder-3.0.0.tgz", 850 | "integrity": "sha512-bk5wus5/5Ei9pbh+sQXaAxS5n4ZwiNAaIA8VBvRcXP6QyKcue2yF6xk1HqdtaZoH1G8+6509SVeOBojoFQ7nrA==", 851 | "requires": { 852 | "punycode": "^2.1.1" 853 | } 854 | }, 855 | "pretty-ms": { 856 | "version": "7.0.1", 857 | "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-7.0.1.tgz", 858 | "integrity": "sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==", 859 | "requires": { 860 | "parse-ms": "^2.1.0" 861 | } 862 | }, 863 | "psl": { 864 | "version": "1.8.0", 865 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", 866 | "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" 867 | }, 868 | "punycode": { 869 | "version": "2.1.1", 870 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 871 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" 872 | }, 873 | "qs": { 874 | "version": "6.5.2", 875 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", 876 | "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" 877 | }, 878 | "readable-stream": { 879 | "version": "3.6.0", 880 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", 881 | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", 882 | "requires": { 883 | "inherits": "^2.0.3", 884 | "string_decoder": "^1.1.1", 885 | "util-deprecate": "^1.0.1" 886 | } 887 | }, 888 | "resolve-from": { 889 | "version": "5.0.0", 890 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", 891 | "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==" 892 | }, 893 | "safe-buffer": { 894 | "version": "5.2.1", 895 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 896 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" 897 | }, 898 | "safer-buffer": { 899 | "version": "2.1.2", 900 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 901 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 902 | }, 903 | "sanitize-html": { 904 | "version": "1.20.1", 905 | "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.20.1.tgz", 906 | "integrity": "sha512-txnH8TQjaQvg2Q0HY06G6CDJLVYCpbnxrdO0WN8gjCKaU5J0KbyGYhZxx5QJg3WLZ1lB7XU9kDkfrCXUozqptA==", 907 | "requires": { 908 | "chalk": "^2.4.1", 909 | "htmlparser2": "^3.10.0", 910 | "lodash.clonedeep": "^4.5.0", 911 | "lodash.escaperegexp": "^4.1.2", 912 | "lodash.isplainobject": "^4.0.6", 913 | "lodash.isstring": "^4.0.1", 914 | "lodash.mergewith": "^4.6.1", 915 | "postcss": "^7.0.5", 916 | "srcset": "^1.0.0", 917 | "xtend": "^4.0.1" 918 | } 919 | }, 920 | "semver": { 921 | "version": "7.3.2", 922 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", 923 | "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==" 924 | }, 925 | "serialised-error": { 926 | "version": "1.1.3", 927 | "resolved": "https://registry.npmjs.org/serialised-error/-/serialised-error-1.1.3.tgz", 928 | "integrity": "sha512-vybp3GItaR1ZtO2nxZZo8eOo7fnVaNtP3XE2vJKgzkKR2bagCkdJ1EpYYhEMd3qu/80DwQk9KjsNSxE3fXWq0g==", 929 | "requires": { 930 | "object-hash": "^1.1.2", 931 | "stack-trace": "0.0.9", 932 | "uuid": "^3.0.0" 933 | }, 934 | "dependencies": { 935 | "stack-trace": { 936 | "version": "0.0.9", 937 | "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.9.tgz", 938 | "integrity": "sha1-qPbq7KkGdMMz58Q5U/J1tFFRBpU=" 939 | } 940 | } 941 | }, 942 | "source-map": { 943 | "version": "0.6.1", 944 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 945 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" 946 | }, 947 | "srcset": { 948 | "version": "1.0.0", 949 | "resolved": "https://registry.npmjs.org/srcset/-/srcset-1.0.0.tgz", 950 | "integrity": "sha1-pWad4StC87HV6D7QPHEEb8SPQe8=", 951 | "requires": { 952 | "array-uniq": "^1.0.2", 953 | "number-is-nan": "^1.0.0" 954 | } 955 | }, 956 | "sshpk": { 957 | "version": "1.16.1", 958 | "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", 959 | "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", 960 | "requires": { 961 | "asn1": "~0.2.3", 962 | "assert-plus": "^1.0.0", 963 | "bcrypt-pbkdf": "^1.0.0", 964 | "dashdash": "^1.12.0", 965 | "ecc-jsbn": "~0.1.1", 966 | "getpass": "^0.1.1", 967 | "jsbn": "~0.1.0", 968 | "safer-buffer": "^2.0.2", 969 | "tweetnacl": "~0.14.0" 970 | } 971 | }, 972 | "stack-trace": { 973 | "version": "0.0.10", 974 | "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", 975 | "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" 976 | }, 977 | "stream-length": { 978 | "version": "1.0.2", 979 | "resolved": "https://registry.npmjs.org/stream-length/-/stream-length-1.0.2.tgz", 980 | "integrity": "sha1-gnfzy+5JpNqrz9tOL0qbXp8snwA=", 981 | "requires": { 982 | "bluebird": "^2.6.2" 983 | } 984 | }, 985 | "strftime": { 986 | "version": "0.10.0", 987 | "resolved": "https://registry.npmjs.org/strftime/-/strftime-0.10.0.tgz", 988 | "integrity": "sha1-s/D6QZKVICpaKJ9ta+n0kJphcZM=" 989 | }, 990 | "string-width": { 991 | "version": "4.2.0", 992 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", 993 | "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", 994 | "requires": { 995 | "emoji-regex": "^8.0.0", 996 | "is-fullwidth-code-point": "^3.0.0", 997 | "strip-ansi": "^6.0.0" 998 | } 999 | }, 1000 | "string_decoder": { 1001 | "version": "1.3.0", 1002 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", 1003 | "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", 1004 | "requires": { 1005 | "safe-buffer": "~5.2.0" 1006 | } 1007 | }, 1008 | "strip-ansi": { 1009 | "version": "6.0.0", 1010 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 1011 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 1012 | "requires": { 1013 | "ansi-regex": "^5.0.0" 1014 | } 1015 | }, 1016 | "strip-json-comments": { 1017 | "version": "3.1.1", 1018 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 1019 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" 1020 | }, 1021 | "supports-color": { 1022 | "version": "5.5.0", 1023 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 1024 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 1025 | "requires": { 1026 | "has-flag": "^3.0.0" 1027 | } 1028 | }, 1029 | "symbol": { 1030 | "version": "0.3.1", 1031 | "resolved": "https://registry.npmjs.org/symbol/-/symbol-0.3.1.tgz", 1032 | "integrity": "sha1-tvmpANSWpX8CQI8iGYwQndoGMEE=" 1033 | }, 1034 | "teleport-javascript": { 1035 | "version": "1.0.0", 1036 | "resolved": "https://registry.npmjs.org/teleport-javascript/-/teleport-javascript-1.0.0.tgz", 1037 | "integrity": "sha512-j1llvWVFyEn/6XIFDfX5LAU43DXe0GCt3NfXDwJ8XpRRMkS+i50SAkonAONBy+vxwPFBd50MFU8a2uj8R/ccLg==" 1038 | }, 1039 | "tough-cookie": { 1040 | "version": "3.0.1", 1041 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", 1042 | "integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==", 1043 | "requires": { 1044 | "ip-regex": "^2.1.0", 1045 | "psl": "^1.1.28", 1046 | "punycode": "^2.1.1" 1047 | } 1048 | }, 1049 | "tweetnacl": { 1050 | "version": "0.14.5", 1051 | "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", 1052 | "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" 1053 | }, 1054 | "uglify-js": { 1055 | "version": "3.11.5", 1056 | "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.11.5.tgz", 1057 | "integrity": "sha512-btvv/baMqe7HxP7zJSF7Uc16h1mSfuuSplT0/qdjxseesDU+yYzH33eHBH+eMdeRXwujXspaCTooWHQVVBh09w==", 1058 | "optional": true 1059 | }, 1060 | "underscore": { 1061 | "version": "1.7.0", 1062 | "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", 1063 | "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=" 1064 | }, 1065 | "uri-js": { 1066 | "version": "4.4.0", 1067 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz", 1068 | "integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==", 1069 | "requires": { 1070 | "punycode": "^2.1.0" 1071 | } 1072 | }, 1073 | "utcstring": { 1074 | "version": "0.1.0", 1075 | "resolved": "https://registry.npmjs.org/utcstring/-/utcstring-0.1.0.tgz", 1076 | "integrity": "sha1-Qw/VEKt/yVtdWRDJAteYgMIIQ2s=" 1077 | }, 1078 | "util-deprecate": { 1079 | "version": "1.0.2", 1080 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 1081 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" 1082 | }, 1083 | "uuid": { 1084 | "version": "3.4.0", 1085 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", 1086 | "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" 1087 | }, 1088 | "uvm": { 1089 | "version": "2.0.1", 1090 | "resolved": "https://registry.npmjs.org/uvm/-/uvm-2.0.1.tgz", 1091 | "integrity": "sha512-bZAckfNKnr95YkTCVZWyzK+7w1c8sYJuTresCBqhiizByVRtfPqhGJpTwFUSaS2YkaVfsMoN5xZcOCNxTx9uCA==", 1092 | "requires": { 1093 | "flatted": "3.1.0" 1094 | } 1095 | }, 1096 | "verror": { 1097 | "version": "1.10.0", 1098 | "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", 1099 | "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", 1100 | "requires": { 1101 | "assert-plus": "^1.0.0", 1102 | "core-util-is": "1.0.2", 1103 | "extsprintf": "^1.2.0" 1104 | } 1105 | }, 1106 | "word-wrap": { 1107 | "version": "1.2.3", 1108 | "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", 1109 | "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" 1110 | }, 1111 | "wordwrap": { 1112 | "version": "1.0.0", 1113 | "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", 1114 | "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" 1115 | }, 1116 | "xmlbuilder": { 1117 | "version": "15.1.1", 1118 | "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz", 1119 | "integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==" 1120 | }, 1121 | "xtend": { 1122 | "version": "4.0.2", 1123 | "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", 1124 | "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" 1125 | } 1126 | } 1127 | } 1128 | -------------------------------------------------------------------------------- /Chapter09/test-scripts-films-request.js: -------------------------------------------------------------------------------- 1 | pm.test('check status code', function () { 2 | pm.response.to.have.status(200); 3 | }) 4 | pm.test('check response time', function() { 5 | pm.expect(pm.response.responseSize).to.be.above(19000); 6 | }) -------------------------------------------------------------------------------- /Chapter09/tests-scripts-people-request.js: -------------------------------------------------------------------------------- 1 | pm.test('check status code', function () { 2 | pm.response.to.have.status(200); 3 | 4 | }) 5 | pm.test('check response time', function() { 6 | pm.expect(pm.response.responseTime).to.be.below(400); 7 | }) -------------------------------------------------------------------------------- /Chapter10/ExampleBlogAPI_withTests.postman_collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "_postman_id": "3fdd6a8a-57d9-4965-abc6-9b85ace89db8", 4 | "name": "ExampleBlogAPI", 5 | "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" 6 | }, 7 | "item": [ 8 | { 9 | "name": "SmokeTests", 10 | "item": [ 11 | { 12 | "name": "blogposts", 13 | "item": [ 14 | { 15 | "name": "GetBlogpostList", 16 | "event": [ 17 | { 18 | "listen": "test", 19 | "script": { 20 | "exec": [ 21 | "var jsonData = pm.response.json();\r", 22 | "var firstBlogPost = {\r", 23 | " \"id\": 1,\r", 24 | " \"title\": \"The FIRST blog post\",\r", 25 | " \"body\": \"This is my first blog post\",\r", 26 | " \"profileId\": 1\r", 27 | "}\r", 28 | "pm.test(\"Check first Blogpost Data\", function () { \r", 29 | " //assume that the first blogpost won't change\r", 30 | " pm.expect(jsonData[0]).to.eql(firstBlogPost);\r", 31 | "});\r", 32 | "\r", 33 | "pm.test(\"Check that each blogpost has required fields\", function () {\r", 34 | " var x;\r", 35 | " for (x in jsonData) {\r", 36 | " utils.check_blogpost_keys(jsonData[x]);\r", 37 | " } \r", 38 | "});\r", 39 | "\r", 40 | "" 41 | ], 42 | "type": "text/javascript" 43 | } 44 | } 45 | ], 46 | "request": { 47 | "method": "GET", 48 | "header": [], 49 | "url": { 50 | "raw": "{{base_url}}blogposts", 51 | "host": [ 52 | "{{base_url}}blogposts" 53 | ] 54 | } 55 | }, 56 | "response": [] 57 | }, 58 | { 59 | "name": "GetSingleBlogPosts", 60 | "event": [ 61 | { 62 | "listen": "test", 63 | "script": { 64 | "exec": [ 65 | "var jsonData = pm.response.json();\r", 66 | "pm.test(\"Check that the blogpost has required fields\", function () {\r", 67 | " utils.check_blogpost_keys(jsonData);\r", 68 | "});\r", 69 | "" 70 | ], 71 | "type": "text/javascript" 72 | } 73 | } 74 | ], 75 | "request": { 76 | "method": "GET", 77 | "header": [], 78 | "url": { 79 | "raw": "{{base_url}}blogposts/{{blogpost_id}}", 80 | "host": [ 81 | "{{base_url}}blogposts" 82 | ], 83 | "path": [ 84 | "{{blogpost_id}}" 85 | ] 86 | } 87 | }, 88 | "response": [] 89 | }, 90 | { 91 | "name": "PostAndDeleteBlogpost", 92 | "event": [ 93 | { 94 | "listen": "test", 95 | "script": { 96 | "exec": [ 97 | "var jsonData = pm.response.json();\r", 98 | "pm.test(\"Check that the blogpost has required fields\", function () {\r", 99 | " utils.check_blogpost_keys(jsonData);\r", 100 | "});\r", 101 | "pm.test(\"Status code is 201\", function () {\r", 102 | " pm.response.to.have.status(201);\r", 103 | "});\r", 104 | "\r", 105 | "var post_id = jsonData.id;\r", 106 | "var base_url = pm.environment.get(\"base_url\")\r", 107 | "\r", 108 | "pm.sendRequest({url:`${base_url}blogposts/${post_id}`,method: 'DELETE'}, function (err, response) {\r", 109 | " pm.test(\"Delete Response is OK\", function () {\r", 110 | " pm.expect(response.status).to.eql('OK');\r", 111 | " });\r", 112 | " pm.test(\"Delete Response body is empty\", function () {\r", 113 | " pm.expect(response.json()).to.eql({});\r", 114 | " });\r", 115 | "});\r", 116 | "\r", 117 | "" 118 | ], 119 | "type": "text/javascript" 120 | } 121 | } 122 | ], 123 | "request": { 124 | "method": "POST", 125 | "header": [], 126 | "body": { 127 | "mode": "raw", 128 | "raw": "{\r\n \"id\": 1,\r\n \"title\": \"The FIRST blog post\",\r\n \"body\": \"This is my first blog post\",\r\n \"profileId\": 1\r\n}", 129 | "options": { 130 | "raw": { 131 | "language": "json" 132 | } 133 | } 134 | }, 135 | "url": { 136 | "raw": "{{base_url}}blogposts", 137 | "host": [ 138 | "{{base_url}}blogposts" 139 | ] 140 | } 141 | }, 142 | "response": [] 143 | }, 144 | { 145 | "name": "UpdateBlogpost", 146 | "event": [ 147 | { 148 | "listen": "test", 149 | "script": { 150 | "exec": [ 151 | "var jsonData = pm.response.json()\r", 152 | "pm.test(\"Check that each blogpost has required fields\", function () {\r", 153 | " utils.check_blogpost_keys(jsonData);\r", 154 | "});\r", 155 | "\r", 156 | "//reset the post back to it's original state\r", 157 | "var base_url = pm.environment.get(\"base_url\");\r", 158 | "var post_id = pm.environment.get(\"blogpost_id\");\r", 159 | "var original_response = pm.environment.get(\"original_get_response\")\r", 160 | "pm.sendRequest({url:`${base_url}blogposts/${post_id}`,\r", 161 | " method: 'PUT',\r", 162 | " header:{'Content-Type': 'application/json'},\r", 163 | " body:{mode: 'raw', raw: original_response}}, \r", 164 | " function (err, response) {\r", 165 | " console.log(response.json());\r", 166 | "});" 167 | ], 168 | "type": "text/javascript" 169 | } 170 | }, 171 | { 172 | "listen": "prerequest", 173 | "script": { 174 | "exec": [ 175 | "//get original value\r", 176 | "var base_url = pm.environment.get(\"base_url\");\r", 177 | "var post_id = pm.environment.get(\"blogpost_id\");\r", 178 | "\r", 179 | "pm.sendRequest({url:`${base_url}blogposts/${post_id}`,method: 'GET'}, function (err, response) {\r", 180 | " pm.environment.set(\"original_get_response\",response.json());\r", 181 | "});" 182 | ], 183 | "type": "text/javascript" 184 | } 185 | } 186 | ], 187 | "request": { 188 | "method": "PUT", 189 | "header": [], 190 | "body": { 191 | "mode": "raw", 192 | "raw": "{\r\n \"id\": 1,\r\n \"title\": \"Modified BlogPost\",\r\n \"body\": \"This is my first blog post - and it has been modified\",\r\n \"profileId\": 1\r\n}", 193 | "options": { 194 | "raw": { 195 | "language": "json" 196 | } 197 | } 198 | }, 199 | "url": { 200 | "raw": "{{base_url}}blogposts/{{blogpost_id}}", 201 | "host": [ 202 | "{{base_url}}blogposts" 203 | ], 204 | "path": [ 205 | "{{blogpost_id}}" 206 | ] 207 | } 208 | }, 209 | "response": [] 210 | }, 211 | { 212 | "name": "GetBlogpostWithEmbeddedComments", 213 | "event": [ 214 | { 215 | "listen": "prerequest", 216 | "script": { 217 | "exec": [ 218 | "//get original value\r", 219 | "var base_url = pm.environment.get(\"base_url\");\r", 220 | "var post_id = pm.environment.get(\"blogpost_id\");\r", 221 | "\r", 222 | "pm.sendRequest({url:`${base_url}blogposts/${post_id}`,method: 'GET'}, function (err, response) {\r", 223 | " pm.environment.set(\"original_get_response\",response.json());\r", 224 | "});" 225 | ], 226 | "type": "text/javascript" 227 | } 228 | }, 229 | { 230 | "listen": "test", 231 | "script": { 232 | "exec": [ 233 | "var expected_response = {\r", 234 | " \"id\": 1,\r", 235 | " \"title\": \"The FIRST blog post\",\r", 236 | " \"body\": \"This is my first blog post\",\r", 237 | " \"profileId\": 1,\r", 238 | " \"comments\": [\r", 239 | " {\r", 240 | " \"id\": 1,\r", 241 | " \"body\": \"some comment\",\r", 242 | " \"blogpostId\": 1,\r", 243 | " \"profileId\": 1\r", 244 | " }\r", 245 | " ]\r", 246 | "}\r", 247 | "pm.test(\"Response includes correct information\", function () {\r", 248 | " pm.expect(expected_response).to.eql(pm.response.json());\r", 249 | "});\r", 250 | "\r", 251 | "" 252 | ], 253 | "type": "text/javascript" 254 | } 255 | } 256 | ], 257 | "request": { 258 | "method": "GET", 259 | "header": [], 260 | "url": { 261 | "raw": "{{base_url}}blogposts/1?_embed=comments", 262 | "host": [ 263 | "{{base_url}}blogposts" 264 | ], 265 | "path": [ 266 | "1" 267 | ], 268 | "query": [ 269 | { 270 | "key": "_embed", 271 | "value": "comments" 272 | } 273 | ] 274 | } 275 | }, 276 | "response": [] 277 | }, 278 | { 279 | "name": "GetBlogpostWithExpandedProfile", 280 | "event": [ 281 | { 282 | "listen": "prerequest", 283 | "script": { 284 | "exec": [ 285 | "" 286 | ], 287 | "type": "text/javascript" 288 | } 289 | }, 290 | { 291 | "listen": "test", 292 | "script": { 293 | "exec": [ 294 | "var expected_response = {\r", 295 | " \"id\": 1,\r", 296 | " \"title\": \"The FIRST blog post\",\r", 297 | " \"body\": \"This is my first blog post\",\r", 298 | " \"profileId\": 1,\r", 299 | " \"profile\": {\r", 300 | " \"id\": 1,\r", 301 | " \"name\": \"John Smith\"\r", 302 | " }\r", 303 | "}\r", 304 | "pm.test(\"Response includes correct information\", function () {\r", 305 | " pm.expect(expected_response).to.eql(pm.response.json());\r", 306 | "});" 307 | ], 308 | "type": "text/javascript" 309 | } 310 | } 311 | ], 312 | "request": { 313 | "method": "GET", 314 | "header": [], 315 | "url": { 316 | "raw": "{{base_url}}blogposts/1?_expand=profile", 317 | "host": [ 318 | "{{base_url}}blogposts" 319 | ], 320 | "path": [ 321 | "1" 322 | ], 323 | "query": [ 324 | { 325 | "key": "_expand", 326 | "value": "profile" 327 | } 328 | ] 329 | } 330 | }, 331 | "response": [] 332 | } 333 | ], 334 | "event": [ 335 | { 336 | "listen": "prerequest", 337 | "script": { 338 | "type": "text/javascript", 339 | "exec": [ 340 | "utils = {check_blogpost_keys: function (blogpostData) {", 341 | " var postKeys = Object.keys(blogpostData);", 342 | " pm.expect(postKeys).to.have.members(['body','id','profileId','title']);", 343 | "}", 344 | "}" 345 | ] 346 | } 347 | }, 348 | { 349 | "listen": "test", 350 | "script": { 351 | "type": "text/javascript", 352 | "exec": [ 353 | "" 354 | ] 355 | } 356 | } 357 | ] 358 | }, 359 | { 360 | "name": "comments", 361 | "item": [ 362 | { 363 | "name": "GetCommentList", 364 | "request": { 365 | "method": "GET", 366 | "header": [], 367 | "url": { 368 | "raw": "{{base_url}}comments", 369 | "host": [ 370 | "{{base_url}}comments" 371 | ] 372 | } 373 | }, 374 | "response": [] 375 | }, 376 | { 377 | "name": "GetSingleComments", 378 | "request": { 379 | "method": "GET", 380 | "header": [], 381 | "url": { 382 | "raw": "{{base_url}}comments/{{comment_id}}", 383 | "host": [ 384 | "{{base_url}}comments" 385 | ], 386 | "path": [ 387 | "{{comment_id}}" 388 | ] 389 | } 390 | }, 391 | "response": [] 392 | }, 393 | { 394 | "name": "PostAndDeleteComment", 395 | "request": { 396 | "method": "POST", 397 | "header": [], 398 | "url": { 399 | "raw": "{{base_url}}comments", 400 | "host": [ 401 | "{{base_url}}comments" 402 | ] 403 | } 404 | }, 405 | "response": [] 406 | }, 407 | { 408 | "name": "UpdateComment", 409 | "request": { 410 | "method": "PUT", 411 | "header": [], 412 | "url": { 413 | "raw": "{{base_url}}comments/{{comment_id}}", 414 | "host": [ 415 | "{{base_url}}comments" 416 | ], 417 | "path": [ 418 | "{{comment_id}}" 419 | ] 420 | } 421 | }, 422 | "response": [] 423 | }, 424 | { 425 | "name": "GetCommentsWithQueryParams", 426 | "request": { 427 | "method": "GET", 428 | "header": [], 429 | "url": { 430 | "raw": "" 431 | } 432 | }, 433 | "response": [] 434 | } 435 | ] 436 | }, 437 | { 438 | "name": "profiles", 439 | "item": [ 440 | { 441 | "name": "GetProfileList", 442 | "request": { 443 | "method": "GET", 444 | "header": [], 445 | "url": { 446 | "raw": "{{base_url}}profiles", 447 | "host": [ 448 | "{{base_url}}profiles" 449 | ] 450 | } 451 | }, 452 | "response": [] 453 | }, 454 | { 455 | "name": "GetSingleProfiles", 456 | "request": { 457 | "method": "GET", 458 | "header": [], 459 | "url": { 460 | "raw": "{{base_url}}profiles/{{profile_id}}", 461 | "host": [ 462 | "{{base_url}}profiles" 463 | ], 464 | "path": [ 465 | "{{profile_id}}" 466 | ] 467 | } 468 | }, 469 | "response": [] 470 | }, 471 | { 472 | "name": "PostAndDeleteProfile", 473 | "request": { 474 | "method": "POST", 475 | "header": [], 476 | "url": { 477 | "raw": "{{base_url}}profiles", 478 | "host": [ 479 | "{{base_url}}profiles" 480 | ] 481 | } 482 | }, 483 | "response": [] 484 | }, 485 | { 486 | "name": "UpdateProfile", 487 | "request": { 488 | "method": "PUT", 489 | "header": [], 490 | "url": { 491 | "raw": "{{base_url}}profiles/{{profile_id}}", 492 | "host": [ 493 | "{{base_url}}profiles" 494 | ], 495 | "path": [ 496 | "{{profile_id}}" 497 | ] 498 | } 499 | }, 500 | "response": [] 501 | }, 502 | { 503 | "name": "GetProfilesWithQueryParams", 504 | "request": { 505 | "method": "GET", 506 | "header": [], 507 | "url": { 508 | "raw": "" 509 | } 510 | }, 511 | "response": [] 512 | } 513 | ] 514 | } 515 | ] 516 | }, 517 | { 518 | "name": "Workflows", 519 | "item": [ 520 | { 521 | "name": "NewCommenter", 522 | "item": [] 523 | }, 524 | { 525 | "name": "DuplicateAndEditBlogpost", 526 | "item": [] 527 | } 528 | ] 529 | }, 530 | { 531 | "name": "blogposts", 532 | "protocolProfileBehavior": { 533 | "disableBodyPruning": true 534 | }, 535 | "request": { 536 | "method": "GET", 537 | "header": [], 538 | "body": { 539 | "mode": "raw", 540 | "raw": "{\r\n \"name\": \"The second blog post\",\r\n \"body\": \"This is my second blog post. Look I modified it!\",\r\n \"profileId\": 1\r\n}\r\n", 541 | "options": { 542 | "raw": { 543 | "language": "json" 544 | } 545 | } 546 | }, 547 | "url": { 548 | "raw": "http://localhost:3000/blogposts/1?_expand=comments", 549 | "protocol": "http", 550 | "host": [ 551 | "localhost" 552 | ], 553 | "port": "3000", 554 | "path": [ 555 | "blogposts", 556 | "1" 557 | ], 558 | "query": [ 559 | { 560 | "key": "_expand", 561 | "value": "comments" 562 | } 563 | ] 564 | } 565 | }, 566 | "response": [] 567 | } 568 | ] 569 | } -------------------------------------------------------------------------------- /Chapter10/README.md: -------------------------------------------------------------------------------- 1 | # api-testing-challenges 2 | 3 | ## Table of contents 4 | 5 | 6 | 7 | - [Setup and installation](#install) 8 | - [Challenges](#challenges) 9 | * [Find the secret](#secret-profile) 10 | * [Find the 500](#find-the-500-errors) 11 | 12 | 13 | 14 | ## Install 15 | After cloning the repo locally you can install it by opening a command prompt in the location to which you have cloned it and then calling the command below. Note that this requires you to have the npm package manger installed. If you don't have it, you can easily install it from [here](https://www.npmjs.com/get-npm) 16 | 17 | ```bash 18 | $ npm install 19 | ``` 20 | 21 | ### Setup 22 | Once you have it installed you can start the server for the challenge you are interested in by calling 23 | 24 | ```bash 25 | $ node 26 | ``` 27 | Where the available servers are: 28 | 29 | - find_the_secret_server.js 30 | - find_the_500_server.js 31 | 32 | ## Challenges 33 | These challenges are all designed to be 'black box.' The purpose of them is to help you learn more about how APIs work and what kinds of things to think about when testing them. For you to get the most out of them, try to solve them by using only API calls. Don't go looking in the server implementations or the databases for the answers. See if you can figure them out with only using the APIs 34 | 35 | ### Secret profile 36 | The challenge: 37 | 38 | There is a secret profile (profile 1) that you are not supposed to be able to access. Using only API calls, can you find out the name of that profile? 39 | 40 | #### Routes 41 | 42 | The find the secret challenge can be solved using the following routes: 43 | 44 | ``` 45 | GET /blogposts 46 | GET /blogposts/ 47 | GET /comments 48 | GET /comments/ 49 | GET /profiles 50 | GET /profiles/ 51 | ``` 52 | 53 | You may also need to use the following parameters: 54 | 55 | ##### Relationships 56 | 57 | To include children resources, add `_embed` 58 | 59 | ``` 60 | GET /blogposts?_embed=comments 61 | GET /blogposts/1?_embed=comments 62 | ``` 63 | 64 | To include parent resource, add `_expand` 65 | 66 | ``` 67 | GET /comments?_expand=blogpost 68 | GET /comments/1?_expand=blogpost 69 | ``` 70 | 71 | ### Find The 500 Errors 72 | The challenge: 73 | 74 | There are (at least) two 500 errors to be found in this little application. See if you can find them using only API calls. 75 | 76 | #### Routes 77 | 78 | The find the 500 challenge has the following routes: 79 | 80 | ``` 81 | GET /blogposts 82 | GET /blogposts/ 83 | GET /comments 84 | GET /comments/ 85 | GET /profiles 86 | GET /profiles/ 87 | GET /avatars 88 | GET /avatars/ 89 | ``` 90 | POST and PUT commands are also available. To figure out what parameters they take, just do a GET call on the corresponding resource to see what parameters it has. 91 | ``` 92 | POST /blogposts 93 | POST /comments 94 | POST /profiles 95 | POST /avatars 96 | 97 | PUT /blogposts/ 98 | PUT /comments/ 99 | PUT /profiles/ 100 | PUT /avatars/ 101 | ``` 102 | 103 | DELETE commands will also work, but you shouldn't need them to solve this challenge 104 | 105 | NOTE that you can get the database for this into a bad state. If you feel like things are a mess and you can't proceed anymore you can reset the challenge and start over, by reseting the find_the_500_db.json file back to it's original state (use git to do this) and then restarting the server. 106 | 107 | You may also need to use the following parameters: 108 | 109 | ##### Relationships 110 | 111 | To include children resources, add `_embed` 112 | 113 | ``` 114 | GET /blogposts?_embed=comments 115 | GET /blogposts/1?_embed=comments 116 | ``` 117 | 118 | To include parent resource, add `_expand` 119 | 120 | ``` 121 | GET /comments?_expand=blogpost 122 | GET /comments/1?_expand=blogpost 123 | ``` 124 | 125 | -------------------------------------------------------------------------------- /Chapter10/application_server.js: -------------------------------------------------------------------------------- 1 | const jsonServer = require('json-server') 2 | const server = jsonServer.create() 3 | const router = jsonServer.router('local_db.json') 4 | const middlewares = jsonServer.defaults() 5 | 6 | function compareArrays(arr1,arr2){ 7 | if (arr1.length != arr2.length) 8 | return false; 9 | 10 | for (var i = 0, l=arr1.length; i < l; i++) { 11 | // Check if we have nested arrays 12 | if (arr1[i] instanceof Array && arr2[i] instanceof Array) { 13 | // recurse into the nested arrays 14 | if (!arr1[i].equals(arr2[i])) 15 | return false; 16 | } 17 | else if (arr1[i] != arr2[i]) { 18 | // Warning - two different object instances will never be equal: {x:20} != {x:20} 19 | return false; 20 | } 21 | } 22 | return true; 23 | } 24 | 25 | function checkForRequiredFields(requiredFields, req) { 26 | //check without id 27 | if (compareArrays(Object.keys(req.body),requiredFields)){ 28 | return true; 29 | } 30 | //check with id 31 | requiredFields.unshift('id') 32 | if (compareArrays(Object.keys(req.body),requiredFields)){ 33 | return true; 34 | } 35 | return false; 36 | } 37 | 38 | function allRequiredFieldsPresent(req){ 39 | if (get_base_resource_from_url(req.url) == 'avatars'){ 40 | var requiredFieldsAvatar = ['description','url','profileId','blogpostId','commentId'] 41 | return checkForRequiredFields (requiredFieldsAvatar, req); 42 | } 43 | if (get_base_resource_from_url(req.url) == 'comments') { 44 | var requiredFieldsComments = ['body','blogpostId','profileId'] 45 | return checkForRequiredFields (requiredFieldsComments, req); 46 | } 47 | return true; 48 | } 49 | 50 | function get_base_resource_from_url(url){ 51 | return url.split('/')[1] 52 | } 53 | 54 | function get_expand_type_from_url(url){ 55 | return url.split('=')[1] 56 | } 57 | 58 | function get_missing_fields(req){ 59 | var requiredFieldsAvatar = ['description','url','profileId','blogpostId','commentId'] 60 | var missing_fields = []; 61 | for (var i=0; i { 73 | if (req.method === 'POST') { 74 | if (allRequiredFieldsPresent(req)){ 75 | next() 76 | }else{ 77 | 78 | res.status(400).jsonp({ 79 | error: "Incorrect parameters given." 80 | }) 81 | res.end(); 82 | } 83 | } 84 | else if (req.method === 'PUT'){ 85 | if (allRequiredFieldsPresent(req)){ 86 | next() 87 | } else{ 88 | var missing_fields = get_missing_fields(req) 89 | for(var i=0; i =0){ 108 | next(); 109 | }else{ 110 | res.status(400).jsonp({ 111 | error: base_resource + " does not have a parent " + expand_type 112 | }) 113 | res.end(); 114 | } 115 | }else{ 116 | next(); 117 | } 118 | } 119 | }) 120 | server.use(router) 121 | server.listen(3000, () => { 122 | console.log('JSON Server is running. Requests can be accessed at http://localhost:3000/') 123 | }) -------------------------------------------------------------------------------- /Chapter10/initial_local_db.json: -------------------------------------------------------------------------------- 1 | { 2 | "blogposts": [ 3 | { 4 | "id": 1, 5 | "title": "The FIRST blog post", 6 | "body": "This is my first blog post", 7 | "profileId": 1 8 | } 9 | ], 10 | "comments": [ 11 | { 12 | "id": 1, 13 | "body": "some comment", 14 | "blogpostId": 1, 15 | "profileId": 1 16 | } 17 | ], 18 | "profiles": [ 19 | { 20 | "id": 1, 21 | "name": "John Smith" 22 | } 23 | ], 24 | "avatars": [ 25 | { 26 | "id": 1, 27 | "description": "A Public avatar?", 28 | "url": "www.example.com/avatar.jpg", 29 | "profileId": 1, 30 | "commentId": 1, 31 | "blogpostId": 1 32 | } 33 | ] 34 | } -------------------------------------------------------------------------------- /Chapter10/local_db.json: -------------------------------------------------------------------------------- 1 | { 2 | "blogposts": [ 3 | { 4 | "id": 1, 5 | "title": "The FIRST blog post", 6 | "body": "This is my first blog post", 7 | "profileId": 1 8 | }, 9 | { 10 | "title": "New Blog Post Title", 11 | "body": "This is a blog post that I created with the API", 12 | "profileId": 1, 13 | "id": 2 14 | }, 15 | { 16 | "title": "New Blog Post Title", 17 | "body": "This is a blog post that I created with the API", 18 | "profileId": 1, 19 | "id": 3 20 | }, 21 | { 22 | "title": "New Blog Post Title", 23 | "body": "This is a blog post that I created with the API", 24 | "profileId": 1, 25 | "id": 4 26 | }, 27 | { 28 | "title": "New Blog Post Title", 29 | "body": "This is a blog post that I created with the API", 30 | "profileId": 1, 31 | "id": 5 32 | }, 33 | { 34 | "title": "New Blog Post Title", 35 | "body": "This is a blog post that I created with the API", 36 | "profileId": 1, 37 | "id": 6 38 | } 39 | ], 40 | "comments": [ 41 | { 42 | "id": 1, 43 | "body": "some comment", 44 | "blogpostId": 1, 45 | "profileId": 1 46 | } 47 | ], 48 | "profiles": [ 49 | { 50 | "id": 1, 51 | "name": "John Smith" 52 | } 53 | ], 54 | "avatars": [ 55 | { 56 | "id": 1, 57 | "description": "A Public avatar?", 58 | "url": "www.example.com/avatar.jpg", 59 | "profileId": 1, 60 | "commentId": 1, 61 | "blogpostId": 1 62 | } 63 | ] 64 | } -------------------------------------------------------------------------------- /Chapter10/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "json-server": "^0.14.2" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /Chapter10/pre-request-scripts-GetBlogpostWithEmbeddedComments.js: -------------------------------------------------------------------------------- 1 | //get original value 2 | var base_url = pm.environment.get("base_url"); 3 | var post_id = pm.environment.get("blogpost_id"); 4 | 5 | pm.sendRequest({url:`${base_url}blogposts/${post_id}`,method: 'GET'}, function (err, response) { 6 | pm.environment.set("original_get_response",response.json()); 7 | }); -------------------------------------------------------------------------------- /Chapter10/pre-reuest-scripts-UpdateBlogpost.js: -------------------------------------------------------------------------------- 1 | //get original value 2 | var base_url = pm.environment.get("base_url"); 3 | var post_id = pm.environment.get("blogpost_id"); 4 | 5 | pm.sendRequest({url:`${base_url}blogposts/${post_id}`,method: 'GET'}, function (err, response) { 6 | pm.environment.set("original_get_response",response.json()); 7 | }); -------------------------------------------------------------------------------- /Chapter10/reset_db.js: -------------------------------------------------------------------------------- 1 | fs = require('fs'); 2 | fs.readFile('initial_local_db.json',function(err, data){ 3 | if (err) throw err; 4 | 5 | fs.writeFile('local_db.json', data, 'utf-8', function(err) { 6 | if (err) throw err; 7 | console.log('Done!'); 8 | }) 9 | }) -------------------------------------------------------------------------------- /Chapter10/test-scripts-GetBlogpostList-request.js: -------------------------------------------------------------------------------- 1 | var jsonData = pm.response.json(); 2 | var firstBlogPost = { 3 | "id": 1, 4 | "title": "The FIRST blog post", 5 | "body": "This is my first blog post", 6 | "profileId": 1 7 | } 8 | pm.test("Check first Blogpost Data", function () { 9 | //assume that the first blogpost won't change 10 | pm.expect(jsonData[0]).to.eql(firstBlogPost); 11 | }); 12 | 13 | pm.test("Check that each blogpost has required fields", function () { 14 | var x; 15 | for (x in jsonData) { 16 | utils.check_blogpost_keys(jsonData[x]); 17 | } 18 | }); -------------------------------------------------------------------------------- /Chapter10/test-scripts-GetBlogpostWithEmbeddedComments.js: -------------------------------------------------------------------------------- 1 | var expected_response = { 2 | "id": 1, 3 | "title": "The FIRST blog post", 4 | "body": "This is my first blog post", 5 | "profileId": 1, 6 | "comments": [ 7 | { 8 | "id": 1, 9 | "body": "some comment", 10 | "blogpostId": 1, 11 | "profileId": 1 12 | } 13 | ] 14 | } 15 | pm.test("Response includes correct information", function () { 16 | pm.expect(expected_response).to.eql(pm.response.json()); 17 | }); -------------------------------------------------------------------------------- /Chapter10/test-scripts-GetSingleBlogPosts.js: -------------------------------------------------------------------------------- 1 | var jsonData = pm.response.json(); 2 | pm.test("Check that the blogpost has required fields", function () { 3 | utils.check_blogpost_keys(jsonData); 4 | }); -------------------------------------------------------------------------------- /Chapter10/test-scripts-PostAndDeleteBlogpost.js: -------------------------------------------------------------------------------- 1 | var jsonData = pm.response.json(); 2 | pm.test("Check that the blogpost has required fields", function () { 3 | utils.check_blogpost_keys(jsonData); 4 | }); 5 | pm.test("Status code is 201", function () { 6 | pm.response.to.have.status(201); 7 | }); 8 | 9 | var post_id = jsonData.id; 10 | var base_url = pm.environment.get("base_url") 11 | 12 | pm.sendRequest({url:`${base_url}blogposts/${post_id}`,method: 'DELETE'}, function (err, response) { 13 | pm.test("Delete Response is OK", function () { 14 | pm.expect(response.status).to.eql('OK'); 15 | }); 16 | pm.test("Delete Response body is empty", function () { 17 | pm.expect(response.json()).to.eql({}); 18 | }); 19 | }); -------------------------------------------------------------------------------- /Chapter10/test-scripts-UpdateBlogpost.-request.js: -------------------------------------------------------------------------------- 1 | var jsonData = pm.response.json() 2 | pm.test("Check that each blogpost has required fields", function () { 3 | utils.check_blogpost_keys(jsonData); 4 | }); 5 | 6 | //reset the post back to it's original state 7 | var base_url = pm.environment.get("base_url"); 8 | var post_id = pm.environment.get("blogpost_id"); 9 | var original_response = pm.environment.get("original_get_response") 10 | pm.sendRequest({url:`${base_url}blogposts/${post_id}`, 11 | method: 'PUT', 12 | header:{'Content-Type': 'application/json'}, 13 | body:{mode: 'raw', raw: original_response}}, 14 | function (err, response) { 15 | console.log(response.json()); 16 | }); -------------------------------------------------------------------------------- /Chapter11/TodoList.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: ToDo List API 4 | description: Manages ToDo list tasks 5 | version: '1.0' 6 | servers: 7 | - url: http://localhost:5000/todolist/api/v1 8 | paths: 9 | /tasks: 10 | get: 11 | description: gets the list of all tasks for the current user 12 | responses: 13 | '200': 14 | description: got back the list of tasks 15 | content: 16 | application/json: 17 | schema: 18 | $ref: '#/components/schemas/tasks' 19 | '400': 20 | description: sent wrongly formatted data 21 | content: 22 | application/json: 23 | schema: 24 | $ref: '#/components/schemas/Error' 25 | post: 26 | description: create a new task 27 | responses: 28 | '201': 29 | description: created a new task 30 | content: 31 | application/json: 32 | schema: 33 | $ref: '#/components/schemas/task' 34 | '400': 35 | description: sent wrongly formatted data 36 | content: 37 | application/json: 38 | schema: 39 | $ref: '#/components/schemas/Error' 40 | requestBody: 41 | $ref: '#/components/requestBodies/taskBody' 42 | /tasks/{taskId}: 43 | get: 44 | description: Gets the informaiton for the specified task 45 | parameters: 46 | - in: path 47 | schema: 48 | $ref: '#/components/schemas/taskId' 49 | name: taskId 50 | description: Id of the task 51 | required: true 52 | example: 53 | taskId: 1 54 | responses: 55 | '200': 56 | description: Got back the specified task 57 | content: 58 | application/json: 59 | schema: 60 | $ref: '#/components/schemas/task' 61 | '400': 62 | description: sent wrongly formatted data 63 | content: 64 | application/json: 65 | schema: 66 | $ref: '#/components/schemas/Error' 67 | 68 | put: 69 | description: Changes the description for the specified task 70 | parameters: 71 | - in: path 72 | schema: 73 | $ref: '#/components/schemas/taskId' 74 | name: taskId 75 | description: Id of the task 76 | required: true 77 | responses: 78 | '200': 79 | description: task updated correctly 80 | content: 81 | application/json: 82 | schema: 83 | $ref: '#/components/schemas/task' 84 | '400': 85 | description: send wrongly formatted data 86 | content: 87 | application/json: 88 | schema: 89 | $ref: '#/components/schemas/Error' 90 | requestBody: 91 | $ref: '#/components/requestBodies/taskBody' 92 | delete: 93 | description: Removes the specified task 94 | parameters: 95 | - in: path 96 | schema: 97 | $ref: '#/components/schemas/taskId' 98 | name: taskId 99 | description: Id of the task 100 | required: true 101 | responses: 102 | '204': 103 | description: specified task removed 104 | content: 105 | application/json: 106 | schema: 107 | type: object 108 | components: 109 | requestBodies: 110 | taskBody: 111 | required: true 112 | content: 113 | application/json: 114 | schema: 115 | $ref: '#/components/schemas/task' 116 | examples: 117 | New: 118 | value: 119 | title: Learn API Testing 120 | status: New 121 | InProgress: 122 | value: 123 | title: Learn API Testing 124 | status: In Progress 125 | Completed: 126 | value: 127 | title: Learn API Testing 128 | status: Completed 129 | schemas: 130 | taskId: 131 | type: integer 132 | minimum: 1 133 | example: 1 134 | task: 135 | type: object 136 | required: 137 | - title 138 | - status 139 | properties: 140 | title: 141 | type: string 142 | status: 143 | type: string 144 | enum: [New,In Progress,Completed] 145 | dueDate: 146 | type: string 147 | format: date-time 148 | tasks: 149 | type: array 150 | items: 151 | $ref: '#/components/schemas/task' 152 | Error: 153 | type: string 154 | default: "Bad data sent" -------------------------------------------------------------------------------- /Chapter12/TodoList.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: ToDo List API 4 | description: Manages ToDo list tasks 5 | version: '1.0' 6 | servers: 7 | - url: http://localhost:5000/todolist/api/v1 8 | paths: 9 | /tasks: 10 | get: 11 | description: gets the list of all tasks for the current user 12 | responses: 13 | '200': 14 | description: got back the list of tasks 15 | content: 16 | application/json: 17 | schema: 18 | $ref: '#/components/schemas/tasks' 19 | '400': 20 | description: sent wrongly formatted data 21 | content: 22 | application/json: 23 | schema: 24 | $ref: '#/components/schemas/Error' 25 | post: 26 | description: create a new task 27 | responses: 28 | '201': 29 | description: created a new task 30 | content: 31 | application/json: 32 | schema: 33 | $ref: '#/components/schemas/task' 34 | '400': 35 | description: sent wrongly formatted data 36 | content: 37 | application/json: 38 | schema: 39 | $ref: '#/components/schemas/Error' 40 | requestBody: 41 | $ref: '#/components/requestBodies/taskBody' 42 | /tasks/{taskId}: 43 | get: 44 | description: Gets the informaiton for the specified task 45 | parameters: 46 | - in: path 47 | schema: 48 | $ref: '#/components/schemas/taskId' 49 | name: taskId 50 | description: Id of the task 51 | required: true 52 | example: 53 | taskId: 1 54 | responses: 55 | '200': 56 | description: Got back the specified task 57 | content: 58 | application/json: 59 | schema: 60 | $ref: '#/components/schemas/task' 61 | '400': 62 | description: sent wrongly formatted data 63 | content: 64 | application/json: 65 | schema: 66 | $ref: '#/components/schemas/Error' 67 | 68 | put: 69 | description: Changes the description for the specified task 70 | parameters: 71 | - in: path 72 | schema: 73 | $ref: '#/components/schemas/taskId' 74 | name: taskId 75 | description: Id of the task 76 | required: true 77 | responses: 78 | '200': 79 | description: task updated correctly 80 | content: 81 | application/json: 82 | schema: 83 | $ref: '#/components/schemas/task' 84 | '400': 85 | description: send wrongly formatted data 86 | content: 87 | application/json: 88 | schema: 89 | $ref: '#/components/schemas/Error' 90 | requestBody: 91 | $ref: '#/components/requestBodies/taskBody' 92 | delete: 93 | description: Removes the specified task 94 | parameters: 95 | - in: path 96 | schema: 97 | $ref: '#/components/schemas/taskId' 98 | name: taskId 99 | description: Id of the task 100 | required: true 101 | responses: 102 | '204': 103 | description: specified task removed 104 | content: 105 | application/json: 106 | schema: 107 | type: object 108 | components: 109 | requestBodies: 110 | taskBody: 111 | required: true 112 | content: 113 | application/json: 114 | schema: 115 | $ref: '#/components/schemas/task' 116 | examples: 117 | New: 118 | value: 119 | title: Learn API Testing 120 | status: New 121 | InProgress: 122 | value: 123 | title: Learn API Testing 124 | status: In Progress 125 | Completed: 126 | value: 127 | title: Learn API Testing 128 | status: Completed 129 | schemas: 130 | taskId: 131 | type: integer 132 | minimum: 1 133 | example: 1 134 | task: 135 | type: object 136 | required: 137 | - title 138 | - status 139 | properties: 140 | title: 141 | type: string 142 | status: 143 | type: string 144 | enum: [New,In Progress,Completed] 145 | dueDate: 146 | type: string 147 | format: date-time 148 | tasks: 149 | type: array 150 | items: 151 | $ref: '#/components/schemas/task' 152 | Error: 153 | type: string 154 | default: "Bad data sent" -------------------------------------------------------------------------------- /Chapter14/ecommerce.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: Simple Ecommerce API 4 | description: Provides data for an ecommece site 5 | version: '1.0' 6 | servers: 7 | - url: http://localhost:5000/ecommerce/api/v1 8 | paths: 9 | /products: 10 | get: 11 | summary: gets the list of products 12 | operationId: GetListOfProducts 13 | parameters: 14 | - in: query 15 | name: category 16 | schema: 17 | type: string 18 | responses: 19 | '200': 20 | description: got back the list of products 21 | content: 22 | application/json: 23 | schema: 24 | $ref: '#/components/schemas/products' 25 | /products/{{productId}}: 26 | get: 27 | summary: gets the information about the product with the specified productId 28 | responses: 29 | '200': 30 | description: got back product info 31 | content: 32 | application/json: 33 | schema: 34 | $ref: '#/components/schemas/product' 35 | /cart/{{cartId}}: 36 | get: 37 | summary: tells you what items are in your cartId 38 | responses: 39 | '200': 40 | description: got back a list of items 41 | content: 42 | application/json: 43 | schema: 44 | $ref: '#/components/schemas/cart' 45 | post: 46 | summary: add an item to the cartId 47 | responses: 48 | '201': 49 | description: add the specified item to the cart 50 | requestBody: 51 | required: true 52 | content: 53 | application/json: 54 | schema: 55 | $ref: '#/components/schemas/product' 56 | /cart/{{cartId}}/{{productId}}: 57 | delete: 58 | summary: removes the given item from the given cart 59 | responses: 60 | '204': 61 | description: specified product removed 62 | content: 63 | application/json: 64 | schema: 65 | type: object 66 | /purchasehistory/{{userId}}: 67 | get: 68 | summary: get the purchase history of the given user 69 | responses: 70 | '200': 71 | description: succusfully returned a list of purchased items 72 | content: 73 | application/json: 74 | schema: 75 | $ref: '#/components/schemas/purchases' 76 | /categories: 77 | get: 78 | summary: gets a list of available categories 79 | responses: 80 | '200': 81 | description: got a list of categories 82 | content: 83 | application/json: 84 | schema: 85 | $ref: '/#components/schema/categories' 86 | links: 87 | ListOfCategories: 88 | operationId: GetListOfProducts 89 | parameters: 90 | category: '$response.body' 91 | components: 92 | schemas: 93 | purchases: 94 | allOf: 95 | - $ref: '#/components/schemas/product' 96 | - type: object 97 | properties: 98 | purchasedDate: 99 | type: string 100 | format: date-time 101 | cart: 102 | type: array 103 | items: 104 | $ref: '#/components/schemas/product' 105 | cartBody: 106 | type: object 107 | product: 108 | type: object 109 | required: 110 | - productId 111 | - description 112 | - price 113 | - imageLink 114 | properties: 115 | productId: 116 | type: integer 117 | minimum: 1 118 | description: 119 | type: string 120 | price: 121 | type: number 122 | minimum: 0.0 123 | imageLink: 124 | type: string 125 | format: uri 126 | category: 127 | type: string 128 | example: 129 | productId: 10 130 | description: "A Shirt" 131 | price: 12.55 132 | imageLink: "https://www.alink.com" 133 | category: "Men's Clothes" 134 | products: 135 | type: array 136 | items: 137 | $ref: '#/components/schemas/product' 138 | categories: 139 | type: array 140 | items: 141 | type: string 142 | -------------------------------------------------------------------------------- /Chapter14/test-scripts-GetListOfProducts.js: -------------------------------------------------------------------------------- 1 | pm.test("Check that men's clothes category filter gives back the correct products", function () { 2 | var jsonData = pm.response.json(); 3 | var i; 4 | for (i in jsonData) { 5 | pm.expect(jsonData[i].category).to.eql("Men's Clothes"); 6 | } 7 | }); -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Packt 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | # API Testing and Development with Postman 5 | 6 | API Testing and Development with Postman 7 | 8 | This is the code repository for [API Testing and Development with Postman](https://www.packtpub.com/product/api-testing-and-development-with-postman/9781800569201), published by Packt. 9 | 10 | **A practical guide to creating, testing, and managing APIs for automated software testing** 11 | 12 | ## What is this book about? 13 | Postman enables the exploration and testing of web APIs, helping testers and developers figure out how an API works. With Postman, you can create effective test automation for any APIs. If you want to put your knowledge of APIs to work quickly, this practical guide to using Postman will help you get started. 14 | 15 | This book covers the following exciting features: 16 | * Find out what is involved in effective API testing 17 | * Use Postman to improve the quality of your APIs 18 | * Understand what a well-designed API looks like 19 | * Become well-versed with API terminology, including the different types of APIs 20 | * Get to grips with performing functional and non-functional testing of an API 21 | 22 | If you feel this book is for you, get your [copy](https://www.amazon.com/dp/1800569203) today! 23 | 24 | https://www.packtpub.com/ 26 | 27 | 28 | ## Instructions and Navigations 29 | All of the code is organized into folders. For example, Chapter06. 30 | 31 | The code will look like the following: 32 | ``` 33 | pm.test("Body matches string", function () { 34 | pm.expect(pm.response.text()).to.include("string_you_want_to_search"); 35 | }); 36 | 37 | ``` 38 | 39 | **Following is what you need for this book:** 40 | The book is for software testing professionals and software developers looking to improve product and API quality through API test automation. You will find this book useful if understand APIs and want to build your skills for creating, testing, and documenting APIs. The book assumes beginner-level knowledge of JavaScript and API development. 41 | 42 | With the following software and hardware list you can run all code files present in the book (Chapter 1-14). 43 | 44 | ### Software and Hardware List 45 | 46 | | Chapter | Software required | OS required | 47 | | -------- | ------------------------------------| -----------------------------------| 48 | | 1-14 | Postman v8.0.7 | Windows, Mac OS X, and Linux (Any) | 49 | | 5 | Burp Suite Community Edition v2021.2.1 | Windows, Mac OS X, and Linux (Any) | 50 | 51 | 52 | 53 | We also provide a PDF file that has color images of the screenshots/diagrams used in this book. [Click here to download it](https://static.packt-cdn.com/downloads/9781800569201_ColorImages.pdf). 54 | 55 | 56 | ### Related products 57 | * Enterprise API Management [[Packt]](https://www.packtpub.com/product/enterprise-api-management/9781787284432) [[Amazon]](https://www.amazon.in/dp/1787284433) 58 | 59 | * Building Low Code Applications wtih Mendix [[Packt]](https://www.packtpub.com/product/building-low-code-applications-with-mendix/9781800201422) [[Amazon]](https://www.amazon.com/dp/1800201427) 60 | 61 | ## Errata 62 | * Page 54 (bullet point 5): **Name the API something such as Swagger Pet Store** _should be_ **This will automatically import the API and create a collection. Click on Confirm and Close.** 63 | * Page 55 (Paragraph 1 including figure 3.4): Should be ignored and removed. 64 | * Page 55(Paragraph 2, bullet point 2): **With the Generate collection from schema option...** _should be_ **Since Postman has already created a collection, leave the Use and Existing collection option selected, and click on Select Collection and Continue** 65 | * Page 55 (Paragraph 2, bullet point 3): Should be ignored and removed. 66 | * Page 57 (bullet point 6): **choose Swagger Pet Store API** _should be_ **chose Swagger Petstore** 67 | * Page 58 (step 1 near the top): **Make sure you have Swagger Pet Store API selected** _should be_ **Make sure you have Swagger Petstore selected** 68 | 69 | ## Get to Know the Author 70 | **Dave Westerveld** 71 | is a Senior Software Test developer. He has worked for several years as a software tester and has been involved in numerous projects involving test automation. He is an API testing expert. He was part of a team that developed new APIs and worked on automation projects for API tests as well. He has published various well-received video courses. He is passionate about sharing his knowledge and expertise that help testers stay relevant in the changing world of software testing. 72 | 73 | 74 | ### Download a free PDF 75 | 76 | If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.
77 |

https://packt.link/free-ebook/9781800569201

--------------------------------------------------------------------------------