# Issue Runner and Environment Variable in URL

**URL:** <https://community.postman.com/t/issue-runner-and-environment-variable-in-url/2508>\
**Category:** Help Hub\
**Created:** [August 24, 2018, 7:43pm UTC](https://community.postman.com/t/issue-runner-and-environment-variable-in-url/2508 "2018-08-24T19:43:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![U585522](https://avatars.discourse-cdn.com/v4/letter/u/4da419/32.png) [@U585522](https://community.postman.com/u/U585522)\
**Post date:** [August 24, 2018, 7:43pm UTC](https://community.postman.com/t/issue-runner-and-environment-variable-in-url/2508/1 "2018-08-24T19:43:08Z")

</div>

Hi All,

New to Postman, so want to see if I’m missing something before I declare this as a bug.

I have several different servers running slight variations of the same a .Net Web API service. (Dev, SIT, UAT, PROD) All environments use https, but of course have different URLs. I’m also debugging locally via localhost, which is standard http.

I have a single Collection which tests each of my web api methods. I’ve also created a different Postman Environment for each of the servers. Each one has an Environment Variable called UrlBase, such that I can run the same tests on each of the different servers.

I have the url for each method in the Collection set to {{UrlBase}}/api/SomeMethodName, so that I can test each method on each of the different servers just by changing the Environment. UrlBase is set to “[https://myProdServer](https://myProdServer)”, etc.

Executing a single method in the collection works great. Methods get json data, the tests I’ve written pass, etc. A problem happens when I go to use the Runner though. Looking at the run results, I can see where it’s appending an extra “http://” in front of my URLs, such that it’s now trying to hit [http://https](http://https):/myProdServer.

I realize it’s essentially treating the ‘//’ as a single ‘/’ in my environment variable. I was able to get around this for the localhost version by dropping the http:// in front, but that doesn’t seem to work when I need to use https. Any way around this?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![U585522](https://avatars.discourse-cdn.com/v4/letter/u/4da419/32.png) [@U585522](https://community.postman.com/u/U585522)\
**Post date:** [August 24, 2018, 8:28pm UTC](https://community.postman.com/t/issue-runner-and-environment-variable-in-url/2508/2 "2018-08-24T20:28:40Z")

</div>

Ok, just as a work around to my own question: I created two variables. One for httpType which can be “http” or “https”, and changed UrlBase to only be “myProdServer”, “myUATServer”, etc. Thus leaving out the :// part that seems to be causing the trouble. Still, seems inconsistent that it sees the // in the Environment variable differently if I am using the Runner vs executing each method individually in the Collection. Maybe a bug?

---

<div class="post-metadata">

**Author:** ![tmccann](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/tmccann/32/3550_2.png) [@tmccann](https://community.postman.com/u/tmccann)\
**Post date:** [August 27, 2018, 12:15pm UTC](https://community.postman.com/t/issue-runner-and-environment-variable-in-url/2508/3 "2018-08-27T12:15:43Z")

</div>

@U585522 Can you tell us the version of the app you are using and on what platform?  
This is the first time I have heard of this happening, so curious if this is maybe a legit bug.

---

<div class="post-metadata">

**Author:** ![U585522](https://avatars.discourse-cdn.com/v4/letter/u/4da419/32.png) [@U585522](https://community.postman.com/u/U585522)\
**Post date:** [August 27, 2018, 1:12pm UTC](https://community.postman.com/t/issue-runner-and-environment-variable-in-url/2508/4 "2018-08-27T13:12:41Z")

</div>

Sure. I’m using Windows 10. It’s the most recent version (6.2.5).

---

<div class="post-metadata">

**Author:** ![tmccann](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/tmccann/32/3550_2.png) [@tmccann](https://community.postman.com/u/tmccann)\
**Post date:** [August 27, 2018, 1:33pm UTC](https://community.postman.com/t/issue-runner-and-environment-variable-in-url/2508/5 "2018-08-27T13:33:06Z")

</div>

Ok, I run a Mac shop here so that would explain why I have not seen this.  
I would think this may be a legit bug.  
cc @kunagpal @shamasis
