-
Notifications
You must be signed in to change notification settings - Fork 146
Specify Environment Variables in RunSettings RFC #202
Specify Environment Variables in RunSettings RFC #202
Conversation
|
@ViktorHofer Can you please go through this? |
|
|
||
| ``` | ||
| Since these environment variables should always be set when the test host is started, the tests should always run in a separate process. | ||
| For this, the `/InIsolation` flag will be set when there are environment variables so that the test host is always invoked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes sense to not set the InIsolation flag when env vars are set as others who aren't running in isolation want to use this feature as well, not for the testhost invocation but inside the test app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In certain specific cases, we run the tests inside vstest.console process without starting the testhost process. Since we are planning to set the environment variables when starting the test host, these cases will not be encountered for. This flag will insure that the test host is launched with the correct variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we support both cases?
- Set env vars before the testhost process is started
- If tests are executed directly in vstest.console, set the env vars before invoking the tests.
| <!-- File name extension must be .runsettings --> | ||
| <RunSettings> | ||
| <RunConfiguration> | ||
| <EnvironmentVariables> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: do you usually use plural or singular? I.e. you have RunSettings (plural) but also RunConfiguration (singular).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the EnvironmentVariables, it made sense to use plural to infer that multiple values are allowed.
|
Should we close this PR? |
No description provided.