0% found this document useful (0 votes)
9 views

Learn API dd

Uploaded by

Mathumathi M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Learn API dd

Uploaded by

Mathumathi M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

All About API

Understanding variables:

For example, if you have the same URL in more than one request, but the URL might change
later, you can store the URL in a variable base_url and reference it in your requests using
{{base_url}}. If the URL changes, you can change the variable value and it will be reflected
throughout your collection, wherever you've used the variable name.

The same principle applies to any part of your request where data is repeated. Whatever value
is stored in the variable will be included wherever you've referenced the variable when your
requests run. If the base URL value is https://postman-echo.com, and is listed as part of the
request URL using {{base_url}}/get, Postman will send the request to
https://postman-echo.com/get.

Environments:

You can use environments to group sets of variables together and share them with
collaborators, for example if you use one set of config details for your production server and
another for testing.

these scopes are: global, collection, environment, data, and local.

Global variables enable you to access data between collections, requests, test scripts, and
environments. Global variables are available throughout a workspace.

Collection variables are available throughout the requests in a collection and are independent
of environments. Collection variables don't change based on the selected environment.
Collection variables are suitable if you're using a single environment, for example for auth or
URL details.

https://www.youtube.com/watch?v=oCEDjp3XMco

Environment variables enable you to scope your work to different environments, for example
local development versus testing or production. One environment can be active at a time.

Data variables come from external CSV and JSON files to define data sets you can use when
running collections
Local variables are temporary variables that are access ed in your request scripts. Local variable
values are scoped to a single request or collection run, and are no longer available when the
run is complete.

If a variable with the same name is declared in two different scopes, the value stored in the
variable with narrowest scope will be used. For example, if there is a global variable named
username and a local variable named username, the local value will be used when the request
runs.

https://www.testbytes.net/blog/11-differences-betwee n-ios-and-android-mobile-app-testing/#
:~:text=Android%20phones%20are%20available%20in,which%20can%20be %20tested%20easily
.&text=Different%20layout%20and%20sizes%2C%20results,vary%20from%20de vice%20to%20d
evice.

Dummy API link:

https://reqres.in/

https://www.youtube.com/watch?v=EwlBogHckP0&list=PLM-7VG-sgbtCAb1WEnlpmbyc2Xld70
A9n

https://www.youtube.com/watch?v=GhrvZ5nUW Ng

Writing postman test cases:

https://www.youtube.com/watch?v=EVg6gxeiUd0

https://learning.postman.com/docs/writing -scripts/test-scripts/

Best video:

https://www.youtube.com/watch?v=wrFJL5rF-5Y&list=PL6flErFppaj1gBVlGy8Lz5VpHkCfkFOXn
&index=8

You might also like