How to maintain a state of DevTest Config file variables?

Document ID : KB000094966
Last Modified Date : 08/05/2018
Show Technical Document Details
Introduction:
Maintain the state of a config variable when VS is running in multiple capacities.

For example:
Built a service which has a virtual switching mechanism for live/virtual- When the user submits a REST request with a certain value, it changes the service so it directs traffic to virtual. When the capacity is set to anything greater than 1 the code testExec.setStateValue(" STATUS", state);  is not maintaining the STATUS value.
Question:
How to maintain a state of DevTest Config file variables?
Environment:
DevTest 10.2
Answer:
TestExec is not the right place to store state if you are accessing Config variables across multiple instances of  VS. Best practice is to use SharedModelMap.