From cd625f8729eead9457845115e0086387af43ec81 Mon Sep 17 00:00:00 2001 From: Kamil Sobol Date: Mon, 26 Apr 2021 16:24:18 -0700 Subject: [PATCH 1/3] fix runsettings in VS. --- eng/Directory.Build.Common.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Directory.Build.Common.props b/eng/Directory.Build.Common.props index dfa2a3bcca6b4..7be1e630f0f9b 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 From cedd3320dbea31ca0a8e8f1581271a7aa26a11af Mon Sep 17 00:00:00 2001 From: Kamil Sobol Date: Tue, 27 Apr 2021 08:45:30 -0700 Subject: [PATCH 2/3] let's do this. --- eng/Directory.Build.Common.props | 2 +- sdk/core/Azure.Core.TestFramework/README.md | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/eng/Directory.Build.Common.props b/eng/Directory.Build.Common.props index 7be1e630f0f9b..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..f069b54f13cf6 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 varialbe `AZURE_SKIP_DEFAULT_RUN_SETTINGS=true`. + ## TokenCredential If a test or sample uses `TokenCredential` to construct the client use `TestEnvironment.Credential` to retrieve it. From e698fd54b86b86ee3e46063e140a23c01a2b5509 Mon Sep 17 00:00:00 2001 From: Kamil Sobol <61715331+kasobol-msft@users.noreply.github.com> Date: Tue, 27 Apr 2021 10:18:57 -0700 Subject: [PATCH 3/3] Update sdk/core/Azure.Core.TestFramework/README.md Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com> --- sdk/core/Azure.Core.TestFramework/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/core/Azure.Core.TestFramework/README.md b/sdk/core/Azure.Core.TestFramework/README.md index f069b54f13cf6..eb2790ac712b7 100644 --- a/sdk/core/Azure.Core.TestFramework/README.md +++ b/sdk/core/Azure.Core.TestFramework/README.md @@ -156,7 +156,7 @@ Test settings can be configured via `.runsettings` files. See [nunit.runsettings 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 varialbe `AZURE_SKIP_DEFAULT_RUN_SETTINGS=true`. +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