Postman Environment Variables: API Testing using Postman - (Part 4)

Поділитися
Вставка
  • Опубліковано 17 сер 2019
  • What is an Enviroment in Postman
    An environment is a set of key-value pairs. The key represents the name of the variable. You can use a data editor to modify an environment.
    While working with APIs, you often need different setups for your local machine, the development server, or the production API. Environments let you customize requests using variables so you can easily switch between different setups without changing your requests.
    You don't need to remember all those values once they are in Postman. You can download environments, save them as JSON files, and upload them later.
    You can create, share, duplicate, export, and delete an environment. You can also import an environment as a single JSON file.
    Creating a new environment
    You can create a new environment from the:
    Manage Environments icon
    New button
    Launch screen
    What is Variable?
    Variables are symbolic names that represent the information you store in them. The information the variables represent can change, but the operations on the variable remain the same. Variables in Postman work the same way.
    You can assign five types of variable scopes:
    Global
    Collection
    Environment
    Data
    Local
    Data variables
    The Collection Runner lets you import a CSV or a JSON file, and then use the values from the data file inside HTTP requests and scripts. We call these 'data variables'.
    To use them inside Postman, follow the same syntax as environment or global variables.
    Data variables in requests
    Variables inside the Postman UI are enclosed inside curly braces.
    For example, in the screenshot below, {{username}} and {{password}} inside URL parameters would be replaced by corresponding values from the data file:
    Dynamic variables
    Postman has a few dynamic variables that you can use in your requests.
    Dynamic variables cannot be used in the Sandbox. You can only use them in the {{..}} format in the request URL / headers / body.
    {{$guid}} : Adds a v4 style guid
    {{$timestamp}}: Adds the current timestamp
    {{$randomInt}}: Adds a random integer between 0 and 1000
    For a complete list of dynamic variables, refer to the section Dynamic Variables List.
    Join Facebook Group : Software Testing & Automation Discussion - bit.ly/askpramod
    Blog : scrolltest.com
    Follow at Quora : www.quora.com/profile/Promode-1
    🚀 Tools and services I recommend:
    Some of the courses that I recommend to become better Automation Tester 🙌🙌
    ✅Selenium Training and Certification -
    scrolltest.com/go/edureka
    ✅Learn Jenkins for QA -
    bit.ly/learnjenkins-p1
    ✅Programming Java -
    bit.ly/learnjava2020-p1
    ✅Test Automation -
    bit.ly/learnautomation2020
    ✅API Testing -
    www.learnapitesting.com
    ✅Cypress Tutorial with LIVE Projects -
    cypresstutorial.com
  • Навчання та стиль

КОМЕНТАРІ • 52

  • @diliphatagale7496
    @diliphatagale7496 3 роки тому +2

    good bro its very helpful 1000+like

  • @gundeepsingh7053
    @gundeepsingh7053 4 роки тому +2

    Thanks for the collection tutorials, it was good to have deep knowledge of several pieces of it

  • @RicardoDiaz21129
    @RicardoDiaz21129 4 роки тому

    Very helpful, easy to understand. Thank you

  • @tonyjoannable
    @tonyjoannable 3 роки тому

    Great resource thanks for sharing

  • @meghatiwari5225
    @meghatiwari5225 3 роки тому

    Thankyou for your efforts.

  • @swatisaxena1880
    @swatisaxena1880 4 роки тому +1

    Crisp and clean explanation

    • @TheTestingAcademy
      @TheTestingAcademy  4 роки тому

      Thanks for the awesome feedback

    • @onlinebharat111
      @onlinebharat111 2 роки тому +1

      @@TheTestingAcademy dude kindly improve quality of video.videos are informative but not visible

  • @user-uj1we7yv6v
    @user-uj1we7yv6v 4 роки тому +2

    Thanks for providing the videos. Your explanation is awesome but only thing is unable to see the text clearly.

  • @sireeshabade2694
    @sireeshabade2694 4 роки тому

    tq sir I learn more information

  • @solmazgharagozloo5848
    @solmazgharagozloo5848 4 роки тому +3

    Thanks, The only problem is the quality of videos, I cannot read.

    • @onlinebharat111
      @onlinebharat111 2 роки тому

      Very true,I tried watch the hd video but still it is still very light in colour.

  • @abdirashiidjama7739
    @abdirashiidjama7739 4 роки тому

    Thank you!

    • @TheTestingAcademy
      @TheTestingAcademy  4 роки тому +1

      Thanks for lovely comment, Please share with your friends or any one who you think may need it.

  • @mangeshpardeshi9510
    @mangeshpardeshi9510 3 роки тому +1

    What if we try to define 2 global variables from Pre-Request script at the same time , will it give us the result

  • @maheshjare3824
    @maheshjare3824 4 роки тому +2

    Very well explained Sir but video quality is not good .

  • @Zack-ni3vz
    @Zack-ni3vz 2 роки тому

    how do you find out which API to check ? if it doesnt say API in the network setting of the chrome developers tools?

  • @harinivenkateshan4613
    @harinivenkateshan4613 4 роки тому +1

    Hi Pramod, Very useful video. But the video quality is not good. Cannot see properly.

  • @vrajeshbadgujar
    @vrajeshbadgujar Рік тому

    helpful

  • @user-fw9pg9lu2i
    @user-fw9pg9lu2i 9 місяців тому

    If I have two different collections and two different environments, I want to connect the 1st collection with the 1st environment and the 2nd collection with the 2nd environment for all time. Is this possible?

  • @finder1013
    @finder1013 Рік тому

    mean sir scoop of environment variable is greatter than global variable thats whywe can use in different work space is this is correct?

  • @hansrajmaurya2066
    @hansrajmaurya2066 3 роки тому

    I have confusion at 1:29 [ collection come under enviroment] or [enviroment come under collection] .

  • @Komalk29
    @Komalk29 Рік тому

    When I am adding the value in current value and clicking on send the value vanishes and I am not able to get the response. Is there any way to save the values in particular environment?

  • @PinoyGuitarTutorials
    @PinoyGuitarTutorials 3 роки тому

    what happened to local variable var data = 2??

  • @poonambhondve09
    @poonambhondve09 3 роки тому

    Very well explained. but there is 1 suggestion. you have used very small font size so it is difficult to understand.

  • @hemanthgowda5930
    @hemanthgowda5930 4 роки тому

    Hi promod,
    Which is the language used in the test screen??? and
    do we need to learn any programming language for automation using postman?
    can you give your comments on these points?

    • @TheTestingAcademy
      @TheTestingAcademy  4 роки тому

      To learn postman, you don't need to learn any language, but basics of Javascript helps in creating testcaaes

    • @hemanthgowda5930
      @hemanthgowda5930 4 роки тому

      @@TheTestingAcademy ok for automation testing...same JavaScript language is required??

  • @rajendraacharya3525
    @rajendraacharya3525 Рік тому

    what is pre-request script ?
    what is global variable ?
    and why we use that i didn't get you properly.

  • @pavithra2623
    @pavithra2623 4 роки тому

    How to use token without expiring where should we declare it , i have declared in environment variables still it gets expired so can you help me on this ?

  • @parthakonda
    @parthakonda 4 роки тому

    local vars leverage? seems like you skipped.

  • @user-fw9pg9lu2i
    @user-fw9pg9lu2i 9 місяців тому

    How to delete an added environment in Postman

  • @rw9422
    @rw9422 2 роки тому +1

    Dude you are going to give people seizures with that intro

  • @mjhidalgocr
    @mjhidalgocr 4 роки тому

    I almost had a seizure with that intro