Ask a Question

Centralizing the custom properties defined for Environments. Want to read values from a config file.

SOLVED
Madhusm
Occasional Contributor

Centralizing the custom properties defined for Environments. Want to read values from a config file.

We have projects created which has to be executed across N environments. Currently it is quite cumbersome to manually create environments and maintain it.
For example I have an environment defined XYZ and a custom property defined .Now if there is a change in the property value have to manually edit all the projects for the property to get updated.

How can I use one centralized file with all properties defined and based on the environment it can make the changes to that environment. What are the options I have to implement this?

Sample Config file 

Env1=Beatrice
Env1.NodeID=123456789
Env1.APIKey=Abnjjjkj89090909
Env2=Alex
Env2.NodeID=4665656565656
Env2.APIKey=Abjjkjkj87887878787
EnvN=XYZ
EnvN.NodeID=467878799956565656
EnvN.APIKey=MNKKjjkjkj87887878787

 

I have projects with environments defined as in the snapshot attached, now I want to set these properties from a generic config property file which has these properties defined with different values based on the environment. So when I execute the test I want that properties are extracted from the generic config file at the time of execution based on the environment chosen.

21 REPLIES 21
nmrao
Community Hero

@Madhusm
Like to hear from you if that is at least suites what you are looking if you didn't get chance to try yet.


Regards,
Rao.
Madhusm
Occasional Contributor

@nmrao Hey I will try to implement this around next week. Will surely let you know about it.

 

Regards

Madhusm

cancel
Showing results for 
Search instead for 
Did you mean: