Your postman course that I took on udemy has directly led to me receiving a pay increase simply because I became more valuable to the company through the new knowledge I acquired. Multumesc frumos Valentin!
Wonderful! Glad that it helped. You are welcome. Thank you for leaving a comment.
2 ปีที่แล้ว +1
Thank you Valentin! This video helped me to manage challenges I was working on for a long time. So as dealing with special characters in the JSON hierarchy and finding an expected element in an array.
You really explain all in videos nice, english isn't my native language and I understand all what you explain because you are talking clear, slow and with easy accent
Hey man I like your personal site with Gatsby. Couldn't find the source on your github/youtube. What did you need Gatsby for given its a pretty simple layout?
Hello Valentine, does find() work when we get response in xml? -----------I have seen your video on xml parsing, but sometimes find() does not work well with xml. Can you please suggest? ------------Thank you.
We have a json where a path leads to either a single object or an array of objects. We need to "loop" over each element and compare to another API. Is there an elegant way to do this? So far, we have code to cover both scenarios...
I would say that the API design is not great. It should be an array all the time. Probably an if-block will do it. If the API design is not elegant, the tests won't be either.
Is it possible to parameterize the expected value, for example in this case we are hardcoding "Jane", "Social-Media". Is there a way to drive it from environment variables or via a CSV file ?
@@vdespa I want to use the dynamic array index based on the condition. If the condition matches then I should get the respective index. How can that be done ? Can you help me on this.
@@dwarakeshthanigaivelan2199 It is hard to tell what you are trying to do. Join the Facebook community (see link in the description) and ask your question there. Consider adding more details, including screenshots. Thanks for understanding.
It is hard to know what the problem is in this case. Join the Facebook community (see link in the description) and ask your question there. Consider adding more details, including screenshots. Thanks for understanding.
It is hard to answer this with the given information. Join the Discord community (see link in the description) and ask your question there. Consider adding more details, including screenshots. Thanks for understanding.
Very good information! I wanted to ask you how I do an assertion when the array is like this: "social-media": [ socialm1: "Facebook" , socialm2: "Twitter" ] I would like to validate Twitter.
Thanks! Regarding your assertion I need more details. Join the Facebook community (see link in the description) and ask your question there. Consider adding more details, including screenshots. Thanks for understanding.
Hi My response body has { id: 564 firstname:apple lastname:fruit } { id:897 firstname:Tomato lastman:vegetable }etc How can I write test to get the id of Tomato vegetable from the response and set the id in the environment variable? from a GET request.Is it possible?
Hey, I want to extract value of item.values.name based on the value of type.id in below json snippet, Can u plz help how can i write json expression for it in postman assertions , I dont want to use array position I tried using below but failed data.item.values[?(@.type.id==25)].name data { item { Values: [ { id : 1, name: abc, type : { description: bcd, id: 25, name: ghj } }, array continues.... ]
It is hard to answer this with the given information. Join the Discord community (see link in the description) and ask your question there. Consider adding more details, including screenshots. Thanks for understanding.
const response = pm.response.json(); const count = response.find(item => item.total_count === 2); console.log("The applet state is :::: " + count); throws error There was an error in evaluating the test script: TypeError: response.find is not a function Postman version: Version 8.5.0 (8.5.0)
I have given a parameter in request(eg:date=2020-03-12) I need to verify the same date is present in response or not, by not giving the value(2020-03-12) directly in script. Because this date is dynamic and will be changed often. So I need to check the value of the date given in request is present in response using the date variable alone. I hope the question is clear
👉 Want to learn more about Postman? Check my complete Postman online course.
vdespa.com/courses/?q=TH-cam
Your postman course that I took on udemy has directly led to me receiving a pay increase simply because I became more valuable to the company through the new knowledge I acquired. Multumesc frumos Valentin!
Simple and clear way of explaining. Your videos make Postman even more fun and easier to use. Keep up the good work 👍
Thanks, will do!
Great tutorial Valentin. I came from your Udemy course and I'm so happy with all I'm learning. Thank you
Thanks 👍
And I bought your course Postman: The Complete Guide - REST API Testing! Let's get started!
Thanks 👍 Enjoy the course.
@@vdespa 👍👍
Thank you Valentin, for this video. You made this look so simple and easy. Also the way you explain things is wonderful.
You are welcome. Thank you for leaving a comment.
It seems easy and joyful. Thanks a lot, Valentin makes it easier.
You're welcome!
Thank you Valentin. Things have become clear for me !!!
Wonderful! Glad that it helped. You are welcome. Thank you for leaving a comment.
Thank you Valentin! This video helped me to manage challenges I was working on for a long time. So as dealing with special characters in the JSON hierarchy and finding an expected element in an array.
I am glad it helped. Thanks for your comment 👍
Thanku Valentin...it's getting really helpful me to understand about it. Thanks.
You are welcome. Thank you for leaving a comment.
Your class it's amazing. I really liked it a lot. From 🇧🇷
Happy to hear that! I am glad that it was helpful.
Came from your Udemy course.
The find method on the array is pretty handy, replaces the whole for in or forEach search for an object.
Yes. There are a lot of array method work exploring.
Thanks for simplifying writing postman tests with JS. Looking forward to more tutorials from you
More to come! Thanks for your comment.
You really explain all in videos nice, english isn't my native language and I understand all what you explain because you are talking clear, slow and with easy accent
Happy to hear that!
Thank you for your content! I'm using your course on Udemy and I like it!
Thank you, Vlad!
thanks Valentin very helpfull your style of teaching step by step is fabulous thanks agian
Glad it was helpful! You are welcome. Thank you for leaving a comment.
Yes Valentine, this is very useful. Pls point us more samples
You are welcome. Thank you for leaving a comment.
This is awesome!! Great work again!! 🏆
Thank you, Danny! Cheers!
This video was so great! Thanks a lot! Keep on going! :) Great job
Thank you! Will do!
Very helpful. Thank you so much for posting this :)
Glad it was helpful! You are welcome. Thank you for leaving a comment.
Thank you Valentin,
Great video, it helped me a lot in learning Postman assertions! ❤️
Happy to hear that. Thanks for your comment!
Thanks Valentin, this video was really helpful!
Glad it was helpful! You are welcome. Thank you for leaving a comment.
Thank you so much, sir! Extremely helpful
You are welcome. Thank you for leaving a comment.
Nice video tutorials, Valentin. Thank You for sharing this info. with us... :-).
Thank you!
I love it, thanks Valentin😀
Glad you like it! You are welcome. Thank you for leaving a comment.
Thank you Valentin, you rock!
Thanks!
Awesome....learned few new things. Thank you:)
Glad it was helpful!
Thank you so much! Excellent video.
Glad you enjoyed it! You are welcome. Thank you for leaving a comment.
Really helpful! Thank you)
Glad it was helpful! You are welcome. Thank you for leaving a comment.
Thank you Valentin! It was very useful
Glad it was helpful!
Cool this is a great information!
Glad you think so! You are welcome. Thank you for leaving a comment.
Thanks for this tutorial
You are welcome. Thank you for leaving a comment.
Thank you! Now I know more)
You are welcome. Thank you for leaving a comment.
Another amazing lecture
Thank you! Cheers! Glad that you liked it.
Thank you very much. Really helpful! Looking forward for more tutorials
You are welcome! I am glad that it was helpful.
Very Nicely Explain
Thanks!
Very good explanation, Thanks
You are welcome!
This was very helpfull, thanks!!!
Glad to hear. Thanks for your comment and consider subscribing.
Thank you, It was helpful.
Glad it was helpful!
great job!
Thanks! You are welcome. Thank you for leaving a comment.
thanks so much for this! saved me! lol
Great to hear! Thanks for the comment.
Hey man I like your personal site with Gatsby. Couldn't find the source on your github/youtube. What did you need Gatsby for given its a pretty simple layout?
Thanks. I am using Gitlab for the code. I like experimenting with technologies and CI/CD pipelines.
This is awsome 😻
Thank you!
Great Video!
Glad you enjoyed it
Thank you so much
You are welcome. Thank you for leaving a comment.
thanks man
You're welcome 😁
Hi . This video is very useful. Can you also make a tutorial on how we can pass this object to a variable? Thanks in advance.
Thanks man
Thanks for watching!
To Good and thanks a lot
Most welcome
Very nice
Thanks
Hello Valentine,
does find() work when we get response in xml?
-----------I have seen your video on xml parsing, but sometimes find() does not work well with xml. Can you please suggest?
------------Thank you.
It may not work with all examples. Give it a try and see if it works for your use-case.
We have a json where a path leads to either a single object or an array of objects. We need to "loop" over each element and compare to another API. Is there an elegant way to do this? So far, we have code to cover both scenarios...
I would say that the API design is not great. It should be an array all the time.
Probably an if-block will do it. If the API design is not elegant, the tests won't be either.
Please create some videos on Java Script basics, object and arrays
Thanks for the suggestion. I will do that in a next tutorial.
@@vdespa Thanks and today video last 5mint little bit confused in how to Read Array of object in Java script
Thank you
You're welcome.
Is it possible to parameterize the expected value, for example in this case we are hardcoding "Jane", "Social-Media". Is there a way to drive it from environment variables or via a CSV file ?
Of course. Use a Postman variable, like pm.iterationData.get("variablename") instead of the hardcoded value.
@@vdespa I want to use the dynamic array index based on the condition. If the condition matches then I should get the respective index. How can that be done ? Can you help me on this.
@@dwarakeshthanigaivelan2199 It is hard to tell what you are trying to do. Join the Facebook community (see link in the description) and ask your question there. Consider adding more details, including screenshots. Thanks for understanding.
How can we assert the value "Mailing / visiting"
this special character is throwing error
Try something like somearray["Mailing / visiting"]
Hey .. I am facing a proxy issue in running postman collection through bamboo .. can you please suggest some solution
It is hard to know what the problem is in this case. Join the Facebook community (see link in the description) and ask your question there. Consider adding more details, including screenshots. Thanks for understanding.
I am getting the error message find is not a function run running the test. any help would be appreciated..
It is hard to answer this with the given information. Join the Discord community (see link in the description) and ask your question there. Consider adding more details, including screenshots. Thanks for understanding.
Very good information!
I wanted to ask you how I do an assertion when the array is like this:
"social-media": [
socialm1: "Facebook"
,
socialm2: "Twitter"
]
I would like to validate Twitter.
Thanks! Regarding your assertion I need more details. Join the Facebook community (see link in the description) and ask your question there. Consider adding more details, including screenshots. Thanks for understanding.
Hiw should i assert that all name is equal to jane and that it will fail. Or each name in the array is equal to jane.
You should iterate over each element of the array and use the assertion to.eql. However, I doubt you will ever have this use-case.
I am facing an issue while creating const person = response[1]; TypeError: Cannot read properties of undefined (reading 'name')
Is your response an array? Do the objects inside have a property called name?
@@vdespa I dont knw that
Why it is bringing back object in console but it is an array in fact?
Good question! I should have explained this better. An array is technically an object.
@@vdespa so it's never saying array in console?
Hi My response body has
{
id: 564
firstname:apple
lastname:fruit
}
{
id:897
firstname:Tomato
lastman:vegetable
}etc
How can I write test to get the id of Tomato vegetable from the response and set the id in the environment variable? from a GET request.Is it possible?
You need to learn some JavaScript. Watch this: th-cam.com/video/juuhb3W8xT4/w-d-xo.html
Thank you for quick response. I will go through it.
how to check empty array ?
Check it's length.
Hey, I want to extract value of item.values.name based on the value of type.id in below json snippet, Can u plz help how can i write json expression for it in postman assertions , I dont want to use array position
I tried using below but failed
data.item.values[?(@.type.id==25)].name
data
{
item
{
Values: [
{
id : 1,
name: abc,
type : {
description: bcd,
id: 25,
name: ghj
}
},
array continues....
]
It is hard to answer this with the given information. Join the Discord community (see link in the description) and ask your question there. Consider adding more details, including screenshots. Thanks for understanding.
what if there are multiple emails?
You can use external data files to provide different sets of data.
Hi. Help me findout please, how to patch deeper field
for example i need to update parent 1 or 2:
{
"users": [
{
"id": 1,
"first_name": "John",
"last_name": "Smith",
"parents": [
{
"first_name": "Arnold",
"last_name": "Terminator"
},
{
"first_name": "Sara",
"last_name": "Conor"
}
]
i try do it according RFC
Header:
Content-Type: application/json-patch+json
Body:
[
{"op" : "replace", "path" : "/parents/1/first_name", "value" : "NewName"}
]
But it doesnt work :-(
const response = pm.response.json();
const count = response.find(item => item.total_count === 2);
console.log("The applet state is :::: " + count);
throws error There was an error in evaluating the test script: TypeError: response.find is not a function
Postman version: Version 8.5.0 (8.5.0)
Find works on arrays. Most likely your response is not an array.
I have given a parameter in request(eg:date=2020-03-12) I need to verify the same date is present in response or not, by not giving the value(2020-03-12) directly in script. Because this date is dynamic and will be changed often. So I need to check the value of the date given in request is present in response using the date variable alone. I hope the question is clear
Have you looked into JSON schema validation? Or using a regular expression (regex)?
this is free?? i feel like a moron