Demystifying Postman Variables: HOW and WHEN to use Different Variable Scopes

Поделиться
HTML-код
  • Опубликовано: 4 янв 2025

Комментарии • 20

  • @vdespa
    @vdespa  5 лет назад +5

    Collection variables are now writable! Please read an updated version of the information presented here: medium.com/@vdespa/demystifying-postman-variables-how-and-when-to-use-different-variable-scopes-66ad8dc11200

  • @dharmiknaik1772
    @dharmiknaik1772 2 года назад

    Thanks for posting this video. I was looking for this exact thing!

    • @vdespa
      @vdespa  2 года назад +1

      Glad I could help!

  • @rakeshyadavvanamula5411
    @rakeshyadavvanamula5411 5 лет назад +2

    Nice Thanks!

  • @stefanodigaetano1627
    @stefanodigaetano1627 4 года назад +1

    Great video 👌

    • @vdespa
      @vdespa  4 года назад

      Thanks 👍

  • @pogothemonkey7461
    @pogothemonkey7461 5 лет назад

    as usual, awesome video, thanks for the help! :)

  • @truthresonator
    @truthresonator 4 года назад +1

    Sometimes these videos are even better than that of your paid course because it's more.of.an overview in a short video with the considerations of the choices in mind.

    • @vdespa
      @vdespa  4 года назад +1

      Thanks for your comment. The course and the RUclips are different approaches to delivering content. The course is better if you need a clear path to learn everything that you can do with Postman.

  • @abhishekkandala7109
    @abhishekkandala7109 3 года назад

    Hi Valentin Despa. Thanks for this video. Is there any way i can save the assertion status(Pass/Fail) in a variable. I need to pass the assertion status to another request.

    • @vdespa
      @vdespa  3 года назад

      Unfortunately no. It is hard to help 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.

  • @energydrinker5771
    @energydrinker5771 5 лет назад

    Cannot get any variables to show using double braces in Pre-request Scripts or Tests. console.log(pm.globals.get("householdId")); works, but console.log("{{householdId}}"); literally outputs "
    {{householdId}}" in the console.log. I'm doing a class where pretty much the whole thing is written using the {{}} syntax. Am I doing something wrong? Is there a setting I need to change? Can you no longer access variables with "{{varName}}" in scripts?

    • @vdespa
      @vdespa  5 лет назад

      This never worked in scripts. You always need to use the pm.* API. The curly braces notation only works outside of the scripts. I hope this helps.

  • @jarosawjusiak6716
    @jarosawjusiak6716 5 лет назад +1

    What about local varables?

    • @vdespa
      @vdespa  5 лет назад

      Valid point. Please see medium.com/@vdespa/demystifying-postman-variables-how-and-when-to-use-different-variable-scopes-66ad8dc11200

    • @jarosawjusiak6716
      @jarosawjusiak6716 5 лет назад +1

      @@vdespa Thx a lot! I was trying to understand the concept by reading docs but couldn't find any good example or clarification.

    • @vdespa
      @vdespa  5 лет назад

      @@jarosawjusiak6716 I had the same issue. This is why I have created this content. Let me know anytime you have other questions.

  • @ismaelfarfan2990
    @ismaelfarfan2990 3 года назад

    The scope of collection and environment should actually be switched just because environment can be shared across all collections in the workspace, just saying.
    Environment sounds as a good idea until you end up with 40 possible environments to choose from: {test, test-for-collection1, test-2.0, test1, test-john, my-test, private-test, do-not-touch-test...}.
    I wish there was a way to actually pick collection-level variables just as we can pick environment variables.

  • @Dan-rn6xm
    @Dan-rn6xm 5 лет назад

    Nice T shirt ;)