Forum Discussion
richie
3 years agoCommunity Hero
Hey Anastasiya1991
I might be misunderstanding your issue, but are you saying that a certain custom header is environment specific?
If this is correct you can paramaterise the header value.
The way i setup my project for each environment is to create a properties file....1 per enviroment and include in the file all the different environment specific parameters. I then load the file in before executiom depending on which environment i want to test against
So in your scenario id create 2 properties files, each containing project level properties, so in your scenario, each file would include the header value you need to set.
Then within the API, id update the http header value to '${#Project#header}'
I actually do the above in all my readyapi projects now. I paramaterise every single environment specific parameter resulting in zero hard coding of these values. This allows me to lift and shift my projects to other enviroments without having to change ANY of the content in my readyapi/soapui projects (other than loading in the properties file immediately before execution).
Cheers
Rich
For your scenario,
I might be misunderstanding your issue, but are you saying that a certain custom header is environment specific?
If this is correct you can paramaterise the header value.
The way i setup my project for each environment is to create a properties file....1 per enviroment and include in the file all the different environment specific parameters. I then load the file in before executiom depending on which environment i want to test against
So in your scenario id create 2 properties files, each containing project level properties, so in your scenario, each file would include the header value you need to set.
Then within the API, id update the http header value to '${#Project#header}'
I actually do the above in all my readyapi projects now. I paramaterise every single environment specific parameter resulting in zero hard coding of these values. This allows me to lift and shift my projects to other enviroments without having to change ANY of the content in my readyapi/soapui projects (other than loading in the properties file immediately before execution).
Cheers
Rich
For your scenario,
Related Content
- 4 months ago