cancel
Showing results for 
Search instead for 
Did you mean: 

How to override Environment value for parameter when env key name matches param name?

SOLVED
Highlighted
New Contributor

How to override Environment value for parameter when env key name matches param name?

I am testing an API that requires an API key in the header. 

 

There was an environment variable called ApiKey; let's say its value was xxxxx. 

When I tried to override this header for an unhappy path test, I couldn't. While the override value remained in the header box, the environment value was what was actually was actually sent.

 

When I tried deleting the environment value, it still overrode my custom value, but just with a blank. 

 

Help?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
New Contributor

Re: How to override Environment value for parameter when env key name matches param name?

It turns out that the issue was a set request headers script at the project level that overrode local settings. >.<

View solution in original post

2 REPLIES 2
Highlighted
Staff

Re: How to override Environment value for parameter when env key name matches param name?

The Project properties are unique for default environment and for each environment added. Each will maintain a unique copy. Do you have a project property expansion in the header? Something like this ${#Project#HeaderPropName}

 

 

 


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
New Contributor

Re: How to override Environment value for parameter when env key name matches param name?

It turns out that the issue was a set request headers script at the project level that overrode local settings. >.<

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
Check out this week's challenge!

Create a script to generate an email when an assertion fails for the TechCorner tag!


Scripts created in July:
- A script to change the request body before sending it to the server
Top Kudoed Authors