diff --git a/eng/Directory.Build.Common.props b/eng/Directory.Build.Common.props index dfa2a3bcca6b4..e2837d2e8e20d 100644 --- a/eng/Directory.Build.Common.props +++ b/eng/Directory.Build.Common.props @@ -180,7 +180,7 @@ $(MSBuildThisFileDirectory)AzSdkTestLibKey.snk - $(RepoEngPath)\nunit.runsettings + $(RepoEngPath)\nunit.runsettings diff --git a/sdk/core/Azure.Core.TestFramework/README.md b/sdk/core/Azure.Core.TestFramework/README.md index 89bfb7fe622e7..eb2790ac712b7 100644 --- a/sdk/core/Azure.Core.TestFramework/README.md +++ b/sdk/core/Azure.Core.TestFramework/README.md @@ -149,6 +149,15 @@ public class AppConfigurationTestEnvironment : TestEnvironment } ``` +## Test settings + +Test settings can be configured via `.runsettings` files. See [nunit.runsettings](https://github.com/Azure/azure-sdk-for-net/blob/master/eng/nunit.runsettings) for available knobs. + +There are two ways to work with `.runsettings`. Both are picked up by Visual Studio without restart. +- You can edit [nunit.runsettings](https://github.com/Azure/azure-sdk-for-net/blob/master/eng/nunit.runsettings) locally to achieve desired configuration. +- You can prepare few copies of `.runsettings` by cloning [nunit.runsettings](https://github.com/Azure/azure-sdk-for-net/blob/master/eng/nunit.runsettings). +Load them in Visual Studio (`Test>Configure Run Settings` menu) and switch between them. This option requires setting an environment variable `AZURE_SKIP_DEFAULT_RUN_SETTINGS=true`. + ## TokenCredential If a test or sample uses `TokenCredential` to construct the client use `TestEnvironment.Credential` to retrieve it.