#12 | How to use Vars(Variables) in Bruno | REST API Testing tutorials for Beginners | Malayalam

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

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

  • @AleksandarTokarev
    @AleksandarTokarev 7 месяцев назад

    Is it possible to do set a variable globally? Instead of setting it for a speicfic collection?

    • @thetestinginstinct
      @thetestinginstinct  7 месяцев назад

      At the moment there is no option to set variable globally. Options that are available are the following:
      1. Create an environment and add variable under that.
      2. Making use of vars tab
      3. by using getVar() and setVar() API at collection level.
      4. DotEnv File

  • @KatherinJohanaHenaoHenao
    @KatherinJohanaHenaoHenao 7 месяцев назад

    Hi, How can I use the variable below {{$guid}} in bruno? it is not recognized....

    • @thetestinginstinct
      @thetestinginstinct  7 месяцев назад

      Dynamic variable is not available in Bruno. But you can use any external module. Please check the 15 th video in playlist. There I have used faker library to create data. Steps are as follows:
      You need to add a package.json file where your collection is stored.
      {
      "name": "github-rest-api-collection",
      "version": "1.0.0",
      "main": "index.js",
      "homepage": "github.com/usebruno/github-rest-api-collection#readme",
      "dependencies": {
      "@faker-js/faker": "8.3.1"
      }
      }
      And then run following command inside your collection folder using terminal/cmd:
      npm install
      Then in script tab of your request use the following script and use the uuid value as you need:
      const { faker } = require('@faker-js/faker');
      const uuidValue = faker.string.uuid()
      req.setBody({
      name: uuidValue,
      job: uuidValue
      });

  • @domiw3027
    @domiw3027 10 месяцев назад

    Is this English?

    • @thetestinginstinct
      @thetestinginstinct  10 месяцев назад +1

      No the video is in Malayalam language. But still you can follow the video. If you have any doubts in this video, please ask. I am happy to answer. I will add the github link of the project here and in video description as well. github.com/thetestinginstinct/BrunoAPITesting