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
Let's start July with new challenges!

Create a script to change request body before sending it to the server for the TechCorner tag!


Scripts created in June:
- A script to generate a request body based on data from Datasource
- A script to go through all response nodes and check the value of the required field
- A Dispatching script to get responses based on the values in Request Body
- A script to add a new tag and assign it to all TestCases in a TestSuite
Top Kudoed Authors