In the previous articles on Postman Tutorial, we have covered “How To Fix Common Errors In Postman“
In this “GUID in Postman” article, I will be demonstrating how you can implement this concept and get a tight grip over this.
GUID stands for Global Unique Identifier. It is basically hexadecimal digits separated by hyphens. GUID solves the purpose of uniqueness.
In Postman, we use this to generate and send a random value to APIs.
{
"id": "{{$guid}}",
}
It can be generated using online tools or manually. Online tool to generate guid is https://www.guidgenerator.com/
Structure:
GUID is a 128-bit value. It follows the structure defined in RFC4122.
Basic structure is: xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx where M defines version and N defines variant
For Example, b3d27f9b-d21d-427c-164e-7fb6776f87b0 guid is a version 4
There are various versions defined for guid:
Version1: Date-Time and MAC address are used
Version2: Uses DCE security
Version3: MD5 hash and namespace are used
Version4: Generate random digits to create a GUID
Version5: SHA-1 hash and namespace are used
Advantages:
Disadvantages:
#api testing tutorials #postman