Size: a a a

Postman | Community

2020 May 10

NV

Nick Verbitsky in Postman | Community
Dipika Thorat
hey
actually m really beginner to postman
n my client asked me
if i could automate this or not
If you're completely new to Postman, consider looking through our resources: https://github.com/n-verbitsky/postman-community/blob/master/README.md
источник

ES

Evgeny Shandrik in Postman | Community
Nick Verbitsky
Собрал для нас список полезных материалов.

Документация
Postman
* [Postman Learning Center]
* [Postman on GitHub]

Postman Built-In Libraries
* [List of Postman Built-In Libraries]
* [chai.js]
* [ajv]
* [crypto-js]
* [uuid]
* [xml2js]
* [moment.js]
* [lodash]

Newman
* [Newman on GitHub]
* [Newman HTML Reporter on GitHub]

JS
* [developer.mozilla.org]

Статьи
Postman
* [Postman Blog]
* [Введение в Postman]

Newman
* [REST API Testing using Postman & Newman Essential Guide]

Книги
Postman
* [Postman Quick Reference Guide]
* [JavaScript for impatient programmers]

REST
* [Automating and Testing a REST API]

JS
* [You don't know JS: first edition]

Митапы
Postman
* [POST/CON 2019 - Workshops]

Youtube
Postman
* [New to Postman]
* [Postman Youtube Channel]
* [Valentin Despa Learn Postman]

Курсы
Postman
* [Postman: The Complete Guide - REST API Testing]

JS
* [Freecodecamp]
* [W3C JavaScript Tutorial]
* [Курс лекций по JavaScript и Node.js в КПИ]
* [Основы ES6]

FAQ
Postman
* [How to Write Global Functions in Postman]

Если хотите дополнить список - обращайтесь к @evgeny_shandrik /@nverbitsky или добавляйте изменения на GitHub.
источник

DT

Dipika Thorat in Postman | Community
This is 1 st response of get methods
here for id =1
uic id is 15345
источник

DT

Dipika Thorat in Postman | Community
this is 2nd response body
where i need to check for id =1
it fetched proper uic id
источник

NV

Nick Verbitsky in Postman | Community
❤️
источник

NV

Nick Verbitsky in Postman | Community
Dipika Thorat
This is 1 st response of get methods
here for id =1
uic id is 15345
Do you need to check only first object in an array?
источник

NV

Nick Verbitsky in Postman | Community
Or all of them?
источник

DT

Dipika Thorat in Postman | Community
all of them
источник

NV

Nick Verbitsky in Postman | Community
Is array length is the same?
Is the order of objects in the responses is the same?
источник

NV

Nick Verbitsky in Postman | Community
Is netId unique value present of objects in both responses?
источник

DT

Dipika Thorat in Postman | Community
yes
источник

NV

Nick Verbitsky in Postman | Community
I would do something like this:
First Tests tab:

const jsonBody = pm.response.json();
const objectsArray = [];
jsonBody.forEach(object => {
   const item = {
       uicId: object.uicId,
       netId: object.netId,
    };
   objectsArray.push(item);
}
pm.collectionVariables.set('objectsArray', JSON.stringify(objects array);
источник

NV

Nick Verbitsky in Postman | Community
Sorry, writing from phone, will provide the second script later.
источник

DT

Dipika Thorat in Postman | Community
sure np
n yes thanks for ur help
источник

DT

Dipika Thorat in Postman | Community
i need to compare two values ID and UicCode
источник

DT

Dipika Thorat in Postman | Community
not NetID
источник

DT

Dipika Thorat in Postman | Community
1 st get responce of array
источник

DT

Dipika Thorat in Postman | Community
источник

DT

Dipika Thorat in Postman | Community
2 nd responce
источник

DT

Dipika Thorat in Postman | Community
источник