Postman Beginner Tutorial 11 | How to create First Test

  Рет қаралды 36,878

Automation Step by Step

Automation Step by Step

2 жыл бұрын

Take this QUIZ after watching - forms.gle/G47QpEyMEM3UeA4m6
All FREE courses - automationstepbystep.com/
What are Tests in Postman
How to create tests at REQUEST level
How to create tests at FOLDER level
How to create tests at COLLECTION level
Tests in Postman are JavaScript code that is executed after receiving response
Step 1 - Create a api request
Step 2 - Check the tests section under
Request
Collection
Folder
Step 3 - Create and run tests
#PostmanTestScripts
____________________________________________________________
Stories by Raghav - automationstepbystep.com/stor...
My Udemy Courses - automationstepbystep.com/udem...
Every LIKE & SUBSCRIPTION gives me great motivation to keep working for you
You can support my mission for education by sharing this knowledge and helping as many people as you can
If my work has helped you, consider helping any animal near you, in any way you can.
_______ ONLINE COURSES TO LEARN _______
automationstepbystep.com/free...
GitHub - github.com/Raghav-Pal/
Udemy - www.udemy.com/user/raghav-pal-3/
Training by Raghav at your venue - raghav.qna@gmail.com
Training schedule - automationstepbystep.com/trai...
----------- UI TESTING -----------
Selenium Beginners - bit.ly/2MGRS8K
Selenium Java Framework from Scratch - bit.ly/2N9xvR6
Selenium Python - bit.ly/2oyMp5x
Selenium Tips - bit.ly/2owxc50
Selenium Builder - bit.ly/2MKNtlq
Katalon Studio - bit.ly/2wARFdi
Robot Framework with RIDE- bit.ly/2Px6Ue9
Robot Framework with Eclipse - bit.ly/2N8DZxb
Protractor - bit.ly/2KtqVkU
TestProject - bit.ly/2DRNJYE
----------- API TESTING -----------
Web Services (API) - bit.ly/2MGafL7
SoapUI - bit.ly/2MGahmd
Postman - bit.ly/2wz8LrW
General - bit.ly/2PYdwmV
Katalon Studio API Testing - bit.ly/2BwuCTN
----------- MOBILE TESTING -----------
Appium - bit.ly/2ZHFSGX
Mobile Playlist - bit.ly/2PxpeUv
----------- CI | CD | DEVOPS -----------
Jenkins Beginner - bit.ly/2MIn8EC
Jenkins Tips & Trick - bit.ly/2LRt6xC
Docker - bit.ly/2MInnzx
Kubernetes - bit.ly/2MJIlMK
------------VIRTUALISATION------------
Virtualization on windows - bit.ly/2SItIL9
----------- VERSION CONTROL SYSTEM -----------
Git & GitHub - bit.ly/2Q1pagY
GitLab - bit.ly/2kQPGyQ
----------- PERFORMANCE TESTING -----------
JMeter Beginner - bit.ly/2oBbtIU
JMeter Intermediate - bit.ly/2oziNVB
JMeter Advanced - bit.ly/2Q22Y6a
JMeter Tips & Tricks - bit.ly/2NOfWD2
Performance Testing - bit.ly/2wEXbLS
----------- PROGRAMMING -----------
Java Beginners - bit.ly/2PVUcXs
Java Tips & Tricks - bit.ly/2CdcDnJ
GROOVY - bit.ly/2FvWV5C
JAVASCRIPT - bit.ly/2KJDZ8o
PYTHON - bit.ly/2Z4iRye
----------- IDE -----------
Visual Studio Code - bit.ly/2V15yvt
----------- BUILD TOOLS -----------
Maven - bit.ly/2NJdDRS
Gradle - bit.ly/30l3h1B
----------- OTHERS -----------
Redis- bit.ly/2N9jyCG
Misc - bit.ly/2Q2q5xQ
Tools & Tips - bit.ly/2oBfwoR
QnA Friday- bit.ly/2NgwGpw
Sunday Special - bit.ly/2wB23BO
Ask Raghav - bit.ly/2CoJGWf
Interviews - bit.ly/2NIPPxk
All Playlists - bit.ly/2LSiezA
---------- Connect with Raghav -----------
Udemy Courses - www.udemy.com/user/raghav-pal-3/
Twitter - / learnwithraghav
KZfaq - / automationstepbystep
Never Stop Learning
Raghav

Пікірлер: 34
@kanaga4271
@kanaga4271 2 жыл бұрын
I thought the API Postman was so hard on my mind. But now that I have seen the API in your video I understand this is a very easy lesson. Thank you sir
@RaghavPal
@RaghavPal 2 жыл бұрын
Glad it was helpful!
@dineshkhatri3859
@dineshkhatri3859 Жыл бұрын
Better than most of udemy classes.Great effort in every video.Thank you brother
@RaghavPal
@RaghavPal Жыл бұрын
You are most welcome
@shahzaibidreesahmed4827
@shahzaibidreesahmed4827 Жыл бұрын
Great explanation. Thank you!
@RaghavPal
@RaghavPal Жыл бұрын
Most welcome Shahzaib
@C.Sakthivignesh
@C.Sakthivignesh 11 ай бұрын
Thank you so much sir for made this video.
@RaghavPal
@RaghavPal 11 ай бұрын
Most welcome
@user-yr4uq6yz3w
@user-yr4uq6yz3w Күн бұрын
Hi! Thank you for the video! Why are tests in folder duplicated? (3:44) Thank you!
@RaghavPal
@RaghavPal Күн бұрын
Most welcome Sofy are you saying in the results.. it should show as per the tests added and executed.
@azatryspaev3315
@azatryspaev3315 10 ай бұрын
veediyo ke lie dhanyavaad👍
@RaghavPal
@RaghavPal 10 ай бұрын
Most welcome Azat
@antonzhong9970
@antonzhong9970 Жыл бұрын
Your video help me a lot. Thanks. One question though, if we hit Timeout error like this -> "Cloud Agent Error: Request is taking longer than 30 seconds to fulfill", what should we do ? In my Settings, first it is default 0 and as I understand it means infinite. Since the error says longer than 30seconds, I update to 10000ms, still the error come out. Thanks again.
@RaghavPal
@RaghavPal Жыл бұрын
Hi Anton The error message "Cloud Agent Error: Request is taking longer than 30 seconds to fulfill" means that the request that you are making to the API is taking longer than 30 seconds to complete. This can happen for a number of reasons, including: * The API is slow. * The network is slow. * There is a problem with the request. To troubleshoot this error, you can try the following: * Check the API's documentation to see if there is a known issue with the API. * Check the network to see if there is a problem with the network. * Check the request to see if there is a problem with the request If you have checked all of these things and you are still getting the error, you can try increasing the timeout value in Postman. The timeout value is the amount of time that Postman will wait for a response from the API before it times out. To increase the timeout value in Postman, you can follow these steps: 1. Open the Postman settings. 2. Click on the Timeouts tab. 3. Increase the Request Timeout value. 4. Click on the Save button. Once you have increased the timeout value, you should be able to make the request to the API without getting the error. Here are some additional things to keep in mind: * The default timeout value in Postman is 0 seconds, which means that there is no timeout. * The maximum timeout value in Postman is 300 seconds. * If the request still times out after you have increased the timeout value, you may need to contact the API provider to see if there is a problem with the API. I hope this helps
@perfectionist967
@perfectionist967 3 ай бұрын
@@RaghavPal - Sir, can u make one video on how to create API documentation
@paneerselvam3682
@paneerselvam3682 Жыл бұрын
Hi sir.. can we pass an array of values as query param in postman... For each of the value in array i will have the decoded value in the response. Can i get those values as array. For eg i have array ["Arun","Kumar","Raj"].. for each of this value.. i will have a decoded value in response. I have to get those values in another array. Could you please help with this. 🙂
@RaghavPal
@RaghavPal Жыл бұрын
Hi, this should help you stackoverflow.com/questions/60501752/pass-array-as-query-parameter-in-postman
@TestAutomationByJohn
@TestAutomationByJohn 2 жыл бұрын
Hi Sir ,Could You please do a video On how become To AUTOMATION ARCHITECT i am very Passionate about It and also i would like to Continue my career in same it is Humble request .
@RaghavPal
@RaghavPal 2 жыл бұрын
Sure, I will create it
@TestAutomationByJohn
@TestAutomationByJohn 2 жыл бұрын
@@RaghavPal Yes Please sir
@akanshasaraswat7274
@akanshasaraswat7274 2 жыл бұрын
garding creation of test cases through SRS real company.. Sir pls video bna do SRS kaise padhe, kya dekh kar test case likhe sir pls pls Sir please try to make video on weekend I really need sir from Monday Apki help se m selected in mnc.
@RaghavPal
@RaghavPal 2 жыл бұрын
Hi Akansha, I will check and plan
@rajasfive5926
@rajasfive5926 Жыл бұрын
how to add response examples?
@RaghavPal
@RaghavPal Жыл бұрын
will need more details Rajas
@prudhvipalepu7676
@prudhvipalepu7676 Жыл бұрын
Is folder is also called as collection in postman?
@RaghavPal
@RaghavPal Жыл бұрын
No, collection is different than folder
@vahidatamboli5305
@vahidatamboli5305 Жыл бұрын
How to save my created test case in global environment.. The reason is to save test case because I want to create my environment and I want to save my environment.
@RaghavPal
@RaghavPal Жыл бұрын
Hi Vahida, you can download your env as json
@shilpareddy2903
@shilpareddy2903 8 ай бұрын
Hi Raghav, Scenario: Endpoint1: XXXX/Process- Here my file will be uploaded Endpoint 2: xxxx/refresh- when i click on this request the file status will be updating. First it will be as uploading, Next it will be as processing, Finally it comes to Processed. Here Can you help me how to wait until the status is Processed. Note: Here I need to wait after process endpoint because I can’t keep on clicking the refresh request because the file process may take 5 mins or sometimes 10 mins depends on the data I upload. Please help me.
@RaghavPal
@RaghavPal 8 ай бұрын
Shilpa To wait until the file status is Processed after uploading the file to the first endpoint (XXXX/Process-) and clicking the refresh request (xxxx/refresh-), you can implement a loop that checks the file status at regular intervals until it is Processed. Here's an example of how to do this using Postman's scripting capabilities: ```javascript // Define a function to check the file status function checkFileStatus() { // Send the refresh request to get the file status const refreshResponse = pm.request("refreshRequest"); // Extract the file status from the response const fileStatus = response.json().status; // Check if the file status is Processed if (fileStatus === "Processed") { return true; // File status is Processed, stop checking } else { return false; // File status is not Processed, continue checking } } // Define the delay interval between status checks const delayInterval = 5000; // Check every 5 seconds // Upload the file to the first endpoint pm.request("uploadRequest"); // Start checking the file status until it is Processed while (!checkFileStatus()) { // Wait for the specified delay interval pm.setNextRequest(setTimeout(() => {}, delayInterval)); } // Proceed with the next step after the file is Processed // (e.g., download the processed file) pm.request("nextRequest"); ``` This code will repeatedly check the file status using the `checkFileStatus()` function and wait for the specified delay interval (`delayInterval`) between each check. Once the file status is Processed, the loop will stop, and the next request (`nextRequest`) will be executed.
@shilpareddy2903
@shilpareddy2903 8 ай бұрын
@@RaghavPal need to write this script in pre request or in test
@RaghavPal
@RaghavPal 8 ай бұрын
in test script
@shilpareddy2903
@shilpareddy2903 8 ай бұрын
Can you please reply to this. I am getting error as pm.request is not a function
@RaghavPal
@RaghavPal 8 ай бұрын
The error "pm.request is not a function" indicates that you are trying to use the `pm.request` function in your Postman test script, but the function is not defined. This can happen for a few reasons: 1. **You are using an older version of Postman:** The `pm.request` function was introduced in Postman 5.x. If you are using an older version of Postman, you will need to upgrade to Postman 5.x or later. 2. **You are using the wrong scope:** The `pm.request` function can only be used within the context of a test script. If you are trying to use the function outside of a test script, it will not work. 3. **You have a typo in your code:** Make sure that you are spelling the `pm.request` function correctly. If you have checked all of these things and you are still getting the error, you may need to contact Postman support for help. Here is an example of how to use the `pm.request` function in a Postman test script: ```javascript pm.test("Send GET request", function () { pm.request("www.example.com", function (err, response) { if (err) { console.error(err); } else { console.log(response.body); } }); }); ``` This code will send a GET request to the URL www.example.com and then log the response body to the console.
Postman Beginner Tutorial 12 | How to Debug
6:43
Automation Step by Step
Рет қаралды 33 М.
Это реально работает?!
00:33
БРУНО
Рет қаралды 1,9 МЛН
Postman Tutorial #11 - How to Create First Test Case in Postman
6:59
Software Testing Mentor
Рет қаралды 9 М.
Writing Tests in Postman - with Examples | The Exploratory
12:53
Postman Beginner Tutorial 14 | How to Add Authorization in Postman
11:18
Automation Step by Step
Рет қаралды 164 М.
Part 9: How to put Assertions/Validations in your API tests
26:08
Automation Testing Insider
Рет қаралды 2,6 М.
How to write API test cases in Postman using JavaScript
15:45
Naveen AutomationLabs
Рет қаралды 87 М.
Postman Beginner Tutorial 9 | Environments
12:15
Automation Step by Step
Рет қаралды 47 М.