# Day 05: Variables

**URL:** <https://community.postman.com/t/day-05-variables/23789>\
**Category:** Help Hub\
**Created:** [May 16, 2021, 3:27pm UTC](https://community.postman.com/t/day-05-variables/23789 "2021-05-16T15:27:54Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![danpaul](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@danpaul](https://community.postman.com/u/danpaul)\
**Post date:** [May 16, 2021, 3:27pm UTC](https://community.postman.com/t/day-05-variables/23789/1 "2021-05-16T15:27:54Z")

</div>

Hello,

I am attempting to complete the Day 05: Variables. When I run the following request [https://api.getpostman.com/collections/12958258-fc4f5a31-180f-47f7-a061-f28505424b49](https://api.getpostman.com/collections/12958258-fc4f5a31-180f-47f7-a061-f28505424b49). The following errors are generated:

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/0/2/02fa55ba94637373f4fe9d844a914e3cce32cd6b.png)

---

<div class="post-metadata">

**Author:** ![danpaul](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@danpaul](https://community.postman.com/u/danpaul)\
**Post date:** [May 16, 2021, 4:29pm UTC](https://community.postman.com/t/day-05-variables/23789/2 "2021-05-16T16:29:25Z")

</div>

I have resolved all four errors. All five test cases are now passing.

---

<div class="post-metadata">

**Author:** ![hameethapostman](https://avatars.discourse-cdn.com/v4/letter/h/f6c823/32.png) [@hameethapostman](https://community.postman.com/u/hameethapostman)\
**Post date:** [May 24, 2021, 11:19am UTC](https://community.postman.com/t/day-05-variables/23789/3 "2021-05-24T11:19:47Z")

</div>

I am getting this error while running my tests. How did you resolve yours?

Variables added correctly | AssertionError: check global variable: expected ‘[https://api.coindesk.com/v1/bpi/currentprice/{{currency}](https://api.coindesk.com/v1/bpi/currentprice/%7B%7Bcurrency%7D)}.json’ to equal ‘{{coindeskBaseUrl}}/v1/bpi/currentprice/{{currency}}.json’

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/d/8/d8fef399f418369efea74b2490d3d14e8e42fbb8.png)

---

<div class="post-metadata">

**Author:** ![danpaul](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@danpaul](https://community.postman.com/u/danpaul)\
**Post date:** [May 24, 2021, 12:05pm UTC](https://community.postman.com/t/day-05-variables/23789/4 "2021-05-24T12:05:55Z")

</div>

Hello,

At the collection level please check that the variables are correct, please see the screenshot below.

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/1/1/1148b9c33aec8f3cc671574778ebab7303329afe.png)

---

<div class="post-metadata">

**Author:** ![danpaul](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@danpaul](https://community.postman.com/u/danpaul)\
**Post date:** [May 24, 2021, 12:08pm UTC](https://community.postman.com/t/day-05-variables/23789/5 "2021-05-24T12:08:04Z")

</div>

Also check that the variables are set correctly for {{coindeskBaseUrl}} and {{currency}}

---

<div class="post-metadata">

**Author:** ![hameethapostman](https://avatars.discourse-cdn.com/v4/letter/h/f6c823/32.png) [@hameethapostman](https://community.postman.com/u/hameethapostman)\
**Post date:** [May 24, 2021, 2:54pm UTC](https://community.postman.com/t/day-05-variables/23789/6 "2021-05-24T14:54:58Z")

</div>

My variables have been set properly at collection level and global level, but still see the error

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/8/a/8aee8ae62c20048f77112f3adf684412cdecbe3f.png)

 ![2021-05-24_20h23_12](https://us1.discourse-cdn.com/getpostman/original/3X/9/7/97712d0591d72e53b8c70ad94e8bda967bc3380c.png)

---

<div class="post-metadata">

**Author:** ![danpaul](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@danpaul](https://community.postman.com/u/danpaul)\
**Post date:** [May 24, 2021, 3:12pm UTC](https://community.postman.com/t/day-05-variables/23789/7 "2021-05-24T15:12:39Z")

</div>

Hello,

In the initial value field for the global variable you need a value adding to the field.

---

<div class="post-metadata">

**Author:** ![hameethapostman](https://avatars.discourse-cdn.com/v4/letter/h/f6c823/32.png) [@hameethapostman](https://community.postman.com/u/hameethapostman)\
**Post date:** [May 24, 2021, 3:19pm UTC](https://community.postman.com/t/day-05-variables/23789/8 "2021-05-24T15:19:16Z")

</div>

Even when the initial value is set it is not working.

---

<div class="post-metadata">

**Author:** ![pranavdavar](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/pranavdavar/32/9152_2.png) [@pranavdavar](https://community.postman.com/u/pranavdavar)\
**Post date:** [May 24, 2021, 5:41pm UTC](https://community.postman.com/t/day-05-variables/23789/9 "2021-05-24T17:41:28Z")

</div>

Hi @hameethapostman,

Can you please check the requests under the Variables folder, if you are using variables not the actual values?

I believe this thread and [this](https://community.postman.com/t/day-05-variables-assertion-error/24039) are the same. If, so can you close the other one which is not having any comments, to remove duplicates.

---

<div class="post-metadata">

**Author:** ![neilstudd](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/neilstudd/32/8213_2.png) [@neilstudd](https://community.postman.com/u/neilstudd)\
**Post date:** [May 24, 2021, 5:47pm UTC](https://community.postman.com/t/day-05-variables/23789/10 "2021-05-24T17:47:39Z")

</div>

Hi @hameethapostman,

The error message in your scenario is not actually complaining about the setting of the variables; it is checking to see whether you have used the variables in the address of your request. Like this:

 ![Screenshot_20210524-184107](https://us1.discourse-cdn.com/getpostman/original/3X/8/f/8f4cd9229ceec6c42c4821181c9e8f8a009defee.png)

Your error message says that you are using [api.coindesk.com](http://api.coindesk.com) directly in the URL, whereas you should have changed the URL to use the `{{coindeskBaseUrl}}` variable.

---

<div class="post-metadata">

**Author:** ![hameethapostman](https://avatars.discourse-cdn.com/v4/letter/h/f6c823/32.png) [@hameethapostman](https://community.postman.com/u/hameethapostman)\
**Post date:** [May 25, 2021, 7:17am UTC](https://community.postman.com/t/day-05-variables/23789/11 "2021-05-25T07:17:05Z")

</div>

Thanks in the second step I did the mistake , corrected it and it works.
