From 293d2ed4688bf18aa8120cfa41cd7452caf11643 Mon Sep 17 00:00:00 2001 From: nohwnd Date: Fri, 20 Mar 2026 11:40:07 +0100 Subject: [PATCH 1/3] Replace SettingsMigrator tool with a Copilot skill and remove all code The SettingsMigrator.exe tool converts legacy .testsettings files to .runsettings format. This replaces it with a Copilot skill that documents the complete migration process step-by-step, usable both by AI agents and humans following manual steps. Changes: - New .github/skills/settings-migration/SKILL.md with complete migration guide including XML mapping rules, examples, and edge cases - Removed src/SettingsMigrator/ (source, resources, 14 localization files) - Removed test/SettingsMigrator.UnitTests/ (16 unit tests, test data) - Removed from TestPlatform.sln, Microsoft.TestPlatform.nuspec, Microsoft.TestPlatform.csproj, V2.CLI.csproj, verify-nupkgs.ps1 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/skills/settings-migration/SKILL.md | 237 ++++++++++ TestPlatform.sln | 14 - eng/verify-nupkgs.ps1 | 2 - src/SettingsMigrator/Migrator.cs | 423 ------------------ src/SettingsMigrator/NullableHelpers.cs | 42 -- src/SettingsMigrator/NullableHelpers.tt | 45 -- src/SettingsMigrator/PathResolver.cs | 49 -- src/SettingsMigrator/Program.cs | 41 -- .../PublicAPI/PublicAPI.Shipped.txt | 27 -- .../PublicAPI/PublicAPI.Unshipped.txt | 1 - .../Resources/Resources.Designer.cs | 115 ----- src/SettingsMigrator/Resources/Resources.resx | 142 ------ .../Resources/xlf/Resources.cs.xlf | 46 -- .../Resources/xlf/Resources.de.xlf | 46 -- .../Resources/xlf/Resources.es.xlf | 46 -- .../Resources/xlf/Resources.fr.xlf | 46 -- .../Resources/xlf/Resources.it.xlf | 46 -- .../Resources/xlf/Resources.ja.xlf | 46 -- .../Resources/xlf/Resources.ko.xlf | 46 -- .../Resources/xlf/Resources.pl.xlf | 46 -- .../Resources/xlf/Resources.pt-BR.xlf | 46 -- .../Resources/xlf/Resources.ru.xlf | 46 -- .../Resources/xlf/Resources.tr.xlf | 46 -- .../Resources/xlf/Resources.xlf | 41 -- .../Resources/xlf/Resources.zh-Hans.xlf | 46 -- .../Resources/xlf/Resources.zh-Hant.xlf | 46 -- src/SettingsMigrator/SettingsMigrator.csproj | 61 --- src/SettingsMigrator/TestSettingsNodes.cs | 28 -- .../Microsoft.TestPlatform.csproj | 1 - .../Microsoft.TestPlatform.nuspec | 16 +- ...tudio.TestTools.TestPlatform.V2.CLI.csproj | 8 - .../MigratorTests.cs | 187 -------- .../PathResolverTests.cs | 74 --- .../ProgramTests.cs | 24 - .../SettingsMigrator.UnitTests.csproj | 28 -- ...ldRunSettingsWithDataCollector.runsettings | 11 - ...unSettingsWithEmbeddedSettings.runsettings | 6 - .../oldTestSettings.testsettings | 42 -- 38 files changed, 238 insertions(+), 2025 deletions(-) create mode 100644 .github/skills/settings-migration/SKILL.md delete mode 100644 src/SettingsMigrator/Migrator.cs delete mode 100644 src/SettingsMigrator/NullableHelpers.cs delete mode 100644 src/SettingsMigrator/NullableHelpers.tt delete mode 100644 src/SettingsMigrator/PathResolver.cs delete mode 100644 src/SettingsMigrator/Program.cs delete mode 100644 src/SettingsMigrator/PublicAPI/PublicAPI.Shipped.txt delete mode 100644 src/SettingsMigrator/PublicAPI/PublicAPI.Unshipped.txt delete mode 100644 src/SettingsMigrator/Resources/Resources.Designer.cs delete mode 100644 src/SettingsMigrator/Resources/Resources.resx delete mode 100644 src/SettingsMigrator/Resources/xlf/Resources.cs.xlf delete mode 100644 src/SettingsMigrator/Resources/xlf/Resources.de.xlf delete mode 100644 src/SettingsMigrator/Resources/xlf/Resources.es.xlf delete mode 100644 src/SettingsMigrator/Resources/xlf/Resources.fr.xlf delete mode 100644 src/SettingsMigrator/Resources/xlf/Resources.it.xlf delete mode 100644 src/SettingsMigrator/Resources/xlf/Resources.ja.xlf delete mode 100644 src/SettingsMigrator/Resources/xlf/Resources.ko.xlf delete mode 100644 src/SettingsMigrator/Resources/xlf/Resources.pl.xlf delete mode 100644 src/SettingsMigrator/Resources/xlf/Resources.pt-BR.xlf delete mode 100644 src/SettingsMigrator/Resources/xlf/Resources.ru.xlf delete mode 100644 src/SettingsMigrator/Resources/xlf/Resources.tr.xlf delete mode 100644 src/SettingsMigrator/Resources/xlf/Resources.xlf delete mode 100644 src/SettingsMigrator/Resources/xlf/Resources.zh-Hans.xlf delete mode 100644 src/SettingsMigrator/Resources/xlf/Resources.zh-Hant.xlf delete mode 100644 src/SettingsMigrator/SettingsMigrator.csproj delete mode 100644 src/SettingsMigrator/TestSettingsNodes.cs delete mode 100644 test/SettingsMigrator.UnitTests/MigratorTests.cs delete mode 100644 test/SettingsMigrator.UnitTests/PathResolverTests.cs delete mode 100644 test/SettingsMigrator.UnitTests/ProgramTests.cs delete mode 100644 test/SettingsMigrator.UnitTests/SettingsMigrator.UnitTests.csproj delete mode 100644 test/SettingsMigrator.UnitTests/oldRunSettingsWithDataCollector.runsettings delete mode 100644 test/SettingsMigrator.UnitTests/oldRunSettingsWithEmbeddedSettings.runsettings delete mode 100644 test/SettingsMigrator.UnitTests/oldTestSettings.testsettings diff --git a/.github/skills/settings-migration/SKILL.md b/.github/skills/settings-migration/SKILL.md new file mode 100644 index 0000000000..1ba955e9df --- /dev/null +++ b/.github/skills/settings-migration/SKILL.md @@ -0,0 +1,237 @@ +--- +name: settings-migration +description: Migrate legacy Visual Studio .testsettings files to .runsettings format. Use when users need to convert old test configuration files, understand the mapping between formats, or troubleshoot migration issues. Replaces the deprecated SettingsMigrator.exe tool. +--- + +# Migrating .testsettings to .runsettings + +This skill replaces the deprecated `SettingsMigrator.exe` tool. It covers migrating legacy `.testsettings` files (and `.runsettings` files with embedded `.testsettings` references) to the modern `.runsettings` format. + +## Background + +Visual Studio historically used `.testsettings` files for test configuration. The modern format is `.runsettings`. The two formats differ in structure, and some `.testsettings` nodes map to `` wrappers in `.runsettings` to preserve backward compatibility. + +See also: [RFC 0023 - TestSettings Deprecation](../../docs/RFCs/0023-TestSettings-Deprecation.md) + +## When to Use + +- User has a `.testsettings` file and needs a `.runsettings` file +- User has a `.runsettings` with an `path.testsettings` embedded reference +- User asks about migrating test settings, test configuration formats, or legacy settings + +## Step-by-Step Migration + +### Step 1: Identify the Source File Type + +Check the file extension: +- **`.testsettings`** → Go to [Migrate from .testsettings](#migrate-from-testsettings) +- **`.runsettings` with embedded settings** → Go to [Migrate embedded .testsettings](#migrate-embedded-testsettings-from-runsettings) + +To check for embedded settings in a `.runsettings` file, look for: +```xml + + + path\to\file.testsettings + + +``` + +### Step 2: Read the .testsettings File + +Parse the `.testsettings` XML and extract these nodes (all are optional): + +| XPath in .testsettings | Node Name | Purpose | +|---|---|---| +| `/TestSettings/Deployment` | Deployment | File deployment settings | +| `/TestSettings/Scripts` | Scripts | Setup/cleanup scripts | +| `/TestSettings/Execution/TestTypeSpecific/WebTestRunConfiguration` | WebSettings | Web test configuration | +| `/TestSettings/Execution/AgentRule/DataCollectors/DataCollector` | DataCollectors | Data collector definitions | +| `/TestSettings/Execution/Timeouts` | Timeouts | Timeout attributes | +| `/TestSettings/Execution/TestTypeSpecific/UnitTestRunConfig` | UnitTestConfig | Unit test run configuration | +| `/TestSettings/Execution/Hosts` | Hosts | Host configuration | +| `/TestSettings/Execution` | Execution | Execution attributes (parallelTestCount, hostProcessPlatform) | + +### Step 3: Build the .runsettings Output + +Start with a minimal `.runsettings` skeleton: + +```xml + + + +``` + +Then apply each mapping rule below. + +#### 3a. WebTestRunConfiguration (top-level) + +If the `.testsettings` has a `WebTestRunConfiguration` node, copy it directly as a child of ``: + +```xml + + + + + +``` + +#### 3b. LegacySettings Node + +If **any** of these are present: `Deployment`, `Scripts`, `UnitTestConfig`, `Hosts`, `parallelTestCount`, `testTimeout`, or `hostProcessPlatform`, create a `` node and also set `true`: + +```xml + + + + + + + + + + + + ... + + ... + + + + + + true + + +``` + +**Rules for the Execution sub-node:** +- Only create `` if at least one of `UnitTestConfig`, `parallelTestCount`, `testTimeout`, `Hosts` is present +- `parallelTestCount` and `hostProcessPlatform` are **attributes** on the `` element +- `testTimeout` goes into `` child element +- `Hosts` is copied as a child element +- `UnitTestRunConfig` is wrapped in `` child element + +#### 3c. TestSessionTimeout (from runTimeout) + +If the `.testsettings` `Timeouts` node has a `runTimeout` attribute, map it to: + +```xml + + + VALUE + + +``` + +#### 3d. DataCollectors + +If the `.testsettings` has DataCollector nodes, copy them to: + +```xml + + + + ... + + + + +``` + +#### 3e. Unsupported Attributes (warn the user) + +These `.testsettings` timeout attributes are **not supported** and will be lost: +- `agentNotRespondingTimeout` +- `deploymentTimeout` +- `scriptTimeout` + +If any of these are present, warn the user that they cannot be migrated. + +### Migrate from .testsettings + +1. Parse the `.testsettings` file (Step 2) +2. Build a fresh `.runsettings` (Step 3) +3. Save the output file + +### Migrate Embedded .testsettings from .runsettings + +1. Parse the existing `.runsettings` file +2. Find `` node and read the `.testsettings` path + - If the path is relative, resolve it relative to the `.runsettings` file location +3. Remove the `` node from the `.runsettings` +4. Parse the referenced `.testsettings` file (Step 2) +5. Apply all mappings (Step 3) into the existing `.runsettings` document +6. If there's already a `` node in the `.runsettings`, remove it first (it will be replaced) +7. Save the output file + +## Complete Example + +### Input: `legacy.testsettings` + +```xml + + + + + + + + + + + + + + + + + + + + + + + + +``` + +### Output: `migrated.runsettings` + +```xml + + + + + + + + + + + + + + + + + + + + + 600000 + + + + + + + + + true + + +``` + +> **Note:** The `agentNotRespondingTimeout` attribute was dropped because it is not supported in the modern format. The user should be warned about this. diff --git a/TestPlatform.sln b/TestPlatform.sln index fb5d189e0d..1c621c99fc 100644 --- a/TestPlatform.sln +++ b/TestPlatform.sln @@ -122,10 +122,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DataCollectors", "DataColle EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.TestPlatform.Extensions.EventLogCollector.UnitTests", "test\DataCollectors\Microsoft.TestPlatform.Extensions.EventLogCollector.UnitTests\Microsoft.TestPlatform.Extensions.EventLogCollector.UnitTests.csproj", "{21DB138B-85B7-479E-91FE-01E0F972EC56}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SettingsMigrator", "src\SettingsMigrator\SettingsMigrator.csproj", "{69F5FF81-5615-4F06-B83C-FCF979BB84CA}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SettingsMigrator.UnitTests", "test\SettingsMigrator.UnitTests\SettingsMigrator.UnitTests.csproj", "{E7D4921C-F12D-4E1C-85AC-8B7F91C59B0E}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.TestPlatform.Extensions.HtmlLogger", "src\Microsoft.TestPlatform.Extensions.HtmlLogger\Microsoft.TestPlatform.Extensions.HtmlLogger.csproj", "{236A71E3-01DA-4679-9DFF-16A8E079ACFF}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.TestPlatform.Extensions.HtmlLogger.UnitTests", "test\Microsoft.TestPlatform.Extensions.HtmlLogger.UnitTests\Microsoft.TestPlatform.Extensions.HtmlLogger.UnitTests.csproj", "{41248B96-6E15-4E5E-A78F-859897676814}" @@ -352,14 +348,6 @@ Global {21DB138B-85B7-479E-91FE-01E0F972EC56}.Debug|Any CPU.Build.0 = Debug|Any CPU {21DB138B-85B7-479E-91FE-01E0F972EC56}.Release|Any CPU.ActiveCfg = Release|Any CPU {21DB138B-85B7-479E-91FE-01E0F972EC56}.Release|Any CPU.Build.0 = Release|Any CPU - {69F5FF81-5615-4F06-B83C-FCF979BB84CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {69F5FF81-5615-4F06-B83C-FCF979BB84CA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {69F5FF81-5615-4F06-B83C-FCF979BB84CA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {69F5FF81-5615-4F06-B83C-FCF979BB84CA}.Release|Any CPU.Build.0 = Release|Any CPU - {E7D4921C-F12D-4E1C-85AC-8B7F91C59B0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E7D4921C-F12D-4E1C-85AC-8B7F91C59B0E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E7D4921C-F12D-4E1C-85AC-8B7F91C59B0E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E7D4921C-F12D-4E1C-85AC-8B7F91C59B0E}.Release|Any CPU.Build.0 = Release|Any CPU {236A71E3-01DA-4679-9DFF-16A8E079ACFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {236A71E3-01DA-4679-9DFF-16A8E079ACFF}.Debug|Any CPU.Build.0 = Debug|Any CPU {236A71E3-01DA-4679-9DFF-16A8E079ACFF}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -526,8 +514,6 @@ Global {65A25D6E-C9CC-4F45-8925-04087AC82634} = {B705537C-B82C-4A30-AFA5-6244D9A7DAEB} {D9A30E32-D466-4EC5-B4F2-62E17562279B} = {B27FAFDF-2DBA-4AB0-BA85-FD5F21D359D6} {21DB138B-85B7-479E-91FE-01E0F972EC56} = {D9A30E32-D466-4EC5-B4F2-62E17562279B} - {69F5FF81-5615-4F06-B83C-FCF979BB84CA} = {ED0C35EB-7F31-4841-A24F-8EB708FFA959} - {E7D4921C-F12D-4E1C-85AC-8B7F91C59B0E} = {B27FAFDF-2DBA-4AB0-BA85-FD5F21D359D6} {236A71E3-01DA-4679-9DFF-16A8E079ACFF} = {5E7F18A8-F843-4C8A-AB02-4C7D9205C6CF} {41248B96-6E15-4E5E-A78F-859897676814} = {020E15EA-731F-4667-95AF-226671E0C3AE} {074F5BD6-DC05-460B-B78F-044D125FD787} = {D9A30E32-D466-4EC5-B4F2-62E17562279B} diff --git a/eng/verify-nupkgs.ps1 b/eng/verify-nupkgs.ps1 index 3878e12a14..82c45ebecf 100644 --- a/eng/verify-nupkgs.ps1 +++ b/eng/verify-nupkgs.ps1 @@ -183,8 +183,6 @@ function Verify-NugetPackageExe { "ProcessSnapshotCleanup.exe" = "x86-64" "TDEnvCleanup.exe" = "x86" - "TestPlatform\SettingsMigrator.exe" = "x86" - "dump\DumpMinitool.exe" = "x86-64" "VideoRecorder\VSTestVideoRecorder.exe" = "x86" diff --git a/src/SettingsMigrator/Migrator.cs b/src/SettingsMigrator/Migrator.cs deleted file mode 100644 index e2edb5c224..0000000000 --- a/src/SettingsMigrator/Migrator.cs +++ /dev/null @@ -1,423 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System; -using System.Diagnostics.CodeAnalysis; -using System.Globalization; -using System.IO; -using System.Xml; - -using SettingsMigrator; - -using CommandLineResources = Microsoft.VisualStudio.TestPlatform.SettingsMigrator.Resources.Resources; - -namespace Microsoft.VisualStudio.TestPlatform.SettingsMigrator; - -/// -/// Migrator used to migrate test settings and run settings with embedded testsettings to run settings. -/// -public class Migrator -{ - private const string TestTimeoutAttributeName = "testTimeout"; - - private const string ParallelTestCountAttributeName = "parallelTestCount"; - - private const string HostProcessPlatformAttributeName = "hostProcessPlatform"; - - private const string RunTimeoutAttributeName = "runTimeout"; - - private const string LegacySettingsNodeName = "LegacySettings"; - - private const string MSTestNodeName = "MSTest"; - - private const string ForcedLegacyModeName = "ForcedLegacyMode"; - - private const string ExecutionNodeName = "Execution"; - - private const string TimeoutsNodeName = "Timeouts"; - - private const string TestTypeSpecificNodeName = "TestTypeSpecific"; - - private const string RunConfigurationNodeName = "RunConfiguration"; - - private const string TestSessionTimeoutNodeName = "TestSessionTimeout"; - - private const string DataCollectionRunSettingsNodeName = "DataCollectionRunSettings"; - - private const string DataCollectorsNodeName = "DataCollectors"; - - private const string SampleRunSettingsContent = "" + - ""; - - private const string AgentNotRespondingTimeoutAttribute = "agentNotRespondingTimeout"; - - private const string DeploymentTimeoutAttribute = "deploymentTimeout"; - - private const string ScriptTimeoutAttribute = "scriptTimeout"; - - private const string TestSettingsExtension = ".testsettings"; - - private const string RunSettingsExtension = ".runsettings"; - - /// - /// Migrates the nodes from given settings to run settings format. - /// - /// Path to old file - /// Path to new file - [SuppressMessage("Performance", "CA1822:Mark members as static", Justification = "Part of the public API")] - public void Migrate(string oldFilePath, string newFilePath) - { - if (!Path.IsPathRooted(oldFilePath)) - { - Console.WriteLine(CommandLineResources.ValidUsage); - } - - if (string.Equals(Path.GetExtension(oldFilePath), TestSettingsExtension, StringComparison.OrdinalIgnoreCase)) - { - MigrateTestSettings(oldFilePath, newFilePath); - } - else if (string.Equals(Path.GetExtension(oldFilePath), RunSettingsExtension, StringComparison.OrdinalIgnoreCase)) - { - MigrateRunSettings(oldFilePath, newFilePath); - } - else - { - Console.WriteLine(CommandLineResources.ValidUsage); - } - } - - /// - /// Given a runSettings with an embedded testSettings, converts it to runSettings. - /// - /// Path to old runsettings. - /// Path to new runsettings. - private static void MigrateRunSettings(string oldRunSettingsPath, string newRunSettingsPath) - { - string? testSettingsPath = null; - using XmlTextReader reader = new(oldRunSettingsPath); - reader.Namespaces = false; - - var runSettingsXmlDoc = new XmlDocument(); - runSettingsXmlDoc.Load(reader); - var root = runSettingsXmlDoc.DocumentElement; - - var testSettingsNode = root?.SelectSingleNode(@"/RunSettings/MSTest/SettingsFile"); - if (testSettingsNode != null) - { - testSettingsPath = testSettingsNode.InnerText; - } - - if (!testSettingsPath.IsNullOrWhiteSpace()) - { - // Expand path relative to runSettings location. - if (!Path.IsPathRooted(testSettingsPath)) - { - testSettingsPath = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(oldRunSettingsPath)!, testSettingsPath)); - } - - // Remove the embedded testSettings node if it exists. - RemoveEmbeddedTestSettings(runSettingsXmlDoc); - - MigrateTestSettingsNodesToRunSettings(testSettingsPath, runSettingsXmlDoc); - - runSettingsXmlDoc.Save(newRunSettingsPath); - Console.WriteLine(string.Format(CultureInfo.CurrentCulture, CommandLineResources.RunSettingsCreated, newRunSettingsPath)); - } - else - { - Console.WriteLine(CommandLineResources.NoEmbeddedSettings); - } - } - - /// - /// Given a testSettings, converts it to runSettings. - /// - /// Path to old testsettings. - /// Path to new runsettings. - private static void MigrateTestSettings(string oldTestSettingsPath, string newRunSettingsPath) - { - var runSettingsXmlDoc = new XmlDocument(); - runSettingsXmlDoc.LoadXml(SampleRunSettingsContent); - - MigrateTestSettingsNodesToRunSettings(oldTestSettingsPath, runSettingsXmlDoc); - - runSettingsXmlDoc.Save(newRunSettingsPath); - Console.WriteLine(string.Format(CultureInfo.CurrentCulture, CommandLineResources.RunSettingsCreated, newRunSettingsPath)); - } - - /// - /// Given a testSettings, converts it to runSettings - /// - /// Path to test settings - /// Runsettings Xml - private static void MigrateTestSettingsNodesToRunSettings(string testSettingsPath, XmlDocument runSettingsXmlDoc) - { - TestSettingsNodes testSettingsNodes = ReadTestSettingsNodes(testSettingsPath); - - string? testTimeout = null; - string? runTimeout = null; - if (testSettingsNodes.Timeout is not null) - { - if (testSettingsNodes.Timeout.Attributes?[TestTimeoutAttributeName] is XmlAttribute testTimeoutAttribute) - { - testTimeout = testTimeoutAttribute.Value; - } - - if (testSettingsNodes.Timeout.Attributes?[RunTimeoutAttributeName] is XmlAttribute runTimeoutAttribute) - { - runTimeout = runTimeoutAttribute.Value; - } - } - - string? parallelTestCount = null; - string? hostProcessPlatform = null; - if (testSettingsNodes.Execution is not null) - { - if (testSettingsNodes.Execution.Attributes?[ParallelTestCountAttributeName] is XmlAttribute parallelTestCountAttribute) - { - parallelTestCount = parallelTestCountAttribute.Value; - } - - if (testSettingsNodes.Execution.Attributes?[HostProcessPlatformAttributeName] is XmlAttribute hostProcessPlatformAttribute) - { - hostProcessPlatform = hostProcessPlatformAttribute.Value; - } - } - - // WebTestRunConfiguration node. - if (testSettingsNodes.WebSettings != null) - { - runSettingsXmlDoc.DocumentElement?.AppendChild(runSettingsXmlDoc.ImportNode(testSettingsNodes.WebSettings, deep: true)); - } - - // LegacySettings node. - AddLegacyNodes(testSettingsNodes, testTimeout, parallelTestCount, hostProcessPlatform, runSettingsXmlDoc); - - // TestSessionTimeout node. - if (!runTimeout.IsNullOrEmpty()) - { - AddRunTimeoutNode(runTimeout, runSettingsXmlDoc!); - } - - // DataCollectors node. - if (testSettingsNodes?.Datacollectors != null && testSettingsNodes.Datacollectors.Count > 0) - { - AddDataCollectorNodes(testSettingsNodes.Datacollectors, runSettingsXmlDoc); - } - } - - private static TestSettingsNodes ReadTestSettingsNodes(string testSettingsPath) - { - TestSettingsNodes testSettingsNodes = new(); - - using (XmlTextReader reader = new(testSettingsPath)) - { - reader.Namespaces = false; - - var testSettingsXmlDoc = new XmlDocument(); - testSettingsXmlDoc.Load(reader); - var testSettingsRoot = testSettingsXmlDoc.DocumentElement!; - - // Select the interesting nodes from the xml. - testSettingsNodes.Deployment = testSettingsRoot.SelectSingleNode(@"/TestSettings/Deployment"); - testSettingsNodes.Script = testSettingsRoot.SelectSingleNode(@"/TestSettings/Scripts"); - testSettingsNodes.WebSettings = testSettingsRoot.SelectSingleNode(@"/TestSettings/Execution/TestTypeSpecific/WebTestRunConfiguration"); - testSettingsNodes.Datacollectors = testSettingsRoot.SelectNodes(@"/TestSettings/Execution/AgentRule/DataCollectors/DataCollector"); - testSettingsNodes.Timeout = testSettingsRoot.SelectSingleNode(@"/TestSettings/Execution/Timeouts"); - testSettingsNodes.UnitTestConfig = testSettingsRoot.SelectSingleNode(@"/TestSettings/Execution/TestTypeSpecific/UnitTestRunConfig"); - testSettingsNodes.Hosts = testSettingsRoot.SelectSingleNode(@"/TestSettings/Execution/Hosts"); - testSettingsNodes.Execution = testSettingsRoot.SelectSingleNode(@"/TestSettings/Execution"); - - if (testSettingsNodes.Timeout != null - && (testSettingsNodes.Timeout.Attributes?[AgentNotRespondingTimeoutAttribute] != null - || testSettingsNodes.Timeout.Attributes?[DeploymentTimeoutAttribute] != null - || testSettingsNodes.Timeout.Attributes?[ScriptTimeoutAttribute] != null)) - { - Console.WriteLine(CommandLineResources.UnsupportedAttributes); - } - } - - return testSettingsNodes!; - } - - /// - /// Removes the embedded testSettings node if present. - /// - /// Xml doc to process - private static void RemoveEmbeddedTestSettings(XmlDocument newXmlDoc) - { - var testSettingsNode = newXmlDoc.DocumentElement?.SelectSingleNode(@"/RunSettings/MSTest/SettingsFile"); - if (testSettingsNode != null) - { - testSettingsNode.ParentNode?.RemoveChild(testSettingsNode); - } - } - - /// - /// Adds the legacy nodes to runSettings xml. - /// - /// testSettingsNodes - /// testTimeout - /// parallelTestCount - /// hostProcessPlatform - /// newXmlDoc - private static void AddLegacyNodes(TestSettingsNodes testSettingsNodes, string? testTimeout, string? parallelTestCount, string? hostProcessPlatform, XmlDocument newXmlDoc) - { - if (testSettingsNodes.Deployment == null - && testSettingsNodes.Script == null - && testSettingsNodes.UnitTestConfig == null - && parallelTestCount.IsNullOrEmpty() - && testTimeout.IsNullOrEmpty() - && hostProcessPlatform.IsNullOrEmpty() - && testSettingsNodes.Hosts == null) - { - return; - } - - if (newXmlDoc.DocumentElement == null) - { - return; - } - - // Add ForcedLegacy node. - var mstestNode = newXmlDoc.DocumentElement.SelectSingleNode(@"/RunSettings/MSTest"); - if (mstestNode == null) - { - mstestNode = newXmlDoc.CreateNode(XmlNodeType.Element, MSTestNodeName, null); - newXmlDoc.DocumentElement.AppendChild(mstestNode); - mstestNode = newXmlDoc.DocumentElement.SelectSingleNode(@"/RunSettings/MSTest"); - } - - if (mstestNode == null) - { - return; - } - - var forcedLegacyNode = newXmlDoc.DocumentElement.SelectSingleNode(@"/RunSettings/MSTest/ForcedLegacyMode"); - if (forcedLegacyNode == null) - { - forcedLegacyNode = newXmlDoc.CreateNode(XmlNodeType.Element, ForcedLegacyModeName, null); - mstestNode.AppendChild(newXmlDoc.ImportNode(forcedLegacyNode, deep: true)); - forcedLegacyNode = newXmlDoc.DocumentElement.SelectSingleNode(@"/RunSettings/MSTest/ForcedLegacyMode")!; - } - - forcedLegacyNode.InnerText = "true"; - - // Remove if the legacy node already exists. - var legacyNode = newXmlDoc.DocumentElement.SelectSingleNode(@"/RunSettings/LegacySettings"); - if (legacyNode?.ParentNode != null) - { - Console.WriteLine(CommandLineResources.IgnoringLegacySettings); - legacyNode.ParentNode.RemoveChild(legacyNode); - } - - legacyNode = newXmlDoc.CreateNode(XmlNodeType.Element, LegacySettingsNodeName, null); - - if (testSettingsNodes.Deployment != null) - { - legacyNode.AppendChild(newXmlDoc.ImportNode(testSettingsNodes.Deployment, deep: true)); - } - - if (testSettingsNodes.Script != null) - { - legacyNode.AppendChild(newXmlDoc.ImportNode(testSettingsNodes.Script, deep: true)); - } - - // Execution node. - if (testSettingsNodes.UnitTestConfig != null || !parallelTestCount.IsNullOrEmpty() || !testTimeout.IsNullOrEmpty() || testSettingsNodes.Hosts != null) - { - XmlNode newExecutionNode = newXmlDoc.CreateNode(XmlNodeType.Element, ExecutionNodeName, null); - - if (!parallelTestCount.IsNullOrEmpty()) - { - var parallelAttribute = newXmlDoc.CreateAttribute(ParallelTestCountAttributeName); - parallelAttribute.Value = parallelTestCount; - newExecutionNode.Attributes?.Append(parallelAttribute); - } - - if (!hostProcessPlatform.IsNullOrEmpty()) - { - var hostProcessPlatformAttribute = newXmlDoc.CreateAttribute(HostProcessPlatformAttributeName); - hostProcessPlatformAttribute.Value = hostProcessPlatform; - newExecutionNode.Attributes?.Append(hostProcessPlatformAttribute); - } - - if (!testTimeout.IsNullOrEmpty()) - { - var newTimeoutsNode = newXmlDoc.CreateNode(XmlNodeType.Element, TimeoutsNodeName, null); - var testTimeoutAttribute = newXmlDoc.CreateAttribute(TestTimeoutAttributeName); - testTimeoutAttribute.Value = testTimeout; - newTimeoutsNode.Attributes?.Append(testTimeoutAttribute); - newExecutionNode.AppendChild(newXmlDoc.ImportNode(newTimeoutsNode, deep: true)); - } - - if (testSettingsNodes.Hosts != null) - { - newExecutionNode.AppendChild(newXmlDoc.ImportNode(testSettingsNodes.Hosts, deep: true)); - } - - if (testSettingsNodes.UnitTestConfig != null) - { - var testTypeSpecificNode = newXmlDoc.CreateNode(XmlNodeType.Element, TestTypeSpecificNodeName, null); - testTypeSpecificNode.AppendChild(newXmlDoc.ImportNode(testSettingsNodes.UnitTestConfig, deep: true)); - newExecutionNode.AppendChild(newXmlDoc.ImportNode(testTypeSpecificNode, deep: true)); - } - - legacyNode.AppendChild(newXmlDoc.ImportNode(newExecutionNode, deep: true)); - } - - newXmlDoc.DocumentElement.AppendChild(legacyNode); - } - - /// - /// Adds the dataCollector nodes to the runSettings xml. - /// - /// Datacollector Nodes - /// Xml doc to process - private static void AddDataCollectorNodes(XmlNodeList oldDataCollectorNodes, XmlDocument? newXmlDoc) - { - if (newXmlDoc?.DocumentElement == null) - { - return; - } - - var dataCollectionRunSettingsNode = newXmlDoc.DocumentElement.SelectSingleNode(@"/RunSettings/DataCollectionRunSettings"); - dataCollectionRunSettingsNode ??= newXmlDoc.CreateNode(XmlNodeType.Element, DataCollectionRunSettingsNodeName, null); - - var dataCollectorsNode = newXmlDoc.DocumentElement.SelectSingleNode(@"/RunSettings/DataCollectionRunSettings/DataCollectors"); - if (dataCollectorsNode == null) - { - dataCollectorsNode = newXmlDoc.CreateNode(XmlNodeType.Element, DataCollectorsNodeName, null); - dataCollectionRunSettingsNode.AppendChild(newXmlDoc.ImportNode(dataCollectorsNode, deep: true)); - newXmlDoc.DocumentElement.AppendChild(dataCollectionRunSettingsNode); - dataCollectorsNode = newXmlDoc.DocumentElement.SelectSingleNode(@"/RunSettings/DataCollectionRunSettings/DataCollectors")!; - } - - foreach (XmlNode dataCollector in oldDataCollectorNodes) - { - dataCollectorsNode.AppendChild(newXmlDoc.ImportNode(dataCollector, deep: true)); - } - } - - /// - /// Adds run session timeout node. - /// - /// Run Timeout - /// Xml doc to process - private static void AddRunTimeoutNode(string runTimeout, XmlDocument newXmlDoc) - { - if (newXmlDoc.DocumentElement == null) - { - return; - } - - var runConfigurationNode = newXmlDoc.DocumentElement.SelectSingleNode(@"/RunSettings/RunConfiguration"); - runConfigurationNode ??= newXmlDoc.CreateNode(XmlNodeType.Element, RunConfigurationNodeName, null); - - var testSessionTimeoutNode = newXmlDoc.CreateNode(XmlNodeType.Element, TestSessionTimeoutNodeName, null); - testSessionTimeoutNode.InnerText = runTimeout; - runConfigurationNode.AppendChild(newXmlDoc.ImportNode(testSessionTimeoutNode, deep: true)); - - newXmlDoc.DocumentElement.AppendChild(runConfigurationNode); - } -} diff --git a/src/SettingsMigrator/NullableHelpers.cs b/src/SettingsMigrator/NullableHelpers.cs deleted file mode 100644 index 08dfce98e4..0000000000 --- a/src/SettingsMigrator/NullableHelpers.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// This code is auto-generated. Changes to this file will be lost! -// This T4 file is copied in various projects because inclusion as link or through shared project -// doesn't allow to generate the C# file locally. If some modification is required, please update -// all instances. -// - -#nullable enable - -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; - -namespace SettingsMigrator; - -internal static class StringUtils -{ - /// - [SuppressMessage("ApiDesign", "RS0030:Do not used banned APIs", Justification = "Replacement API to allow nullable hints for compiler")] - public static bool IsNullOrEmpty([NotNullWhen(returnValue: false)] this string? value) - => string.IsNullOrEmpty(value); - - /// - [SuppressMessage("ApiDesign", "RS0030:Do not used banned APIs", Justification = "Replacement API to allow nullable hints for compiler")] - public static bool IsNullOrWhiteSpace([NotNullWhen(returnValue: false)] this string? value) - => string.IsNullOrWhiteSpace(value); -} - -[SuppressMessage("ApiDesign", "RS0030:Do not used banned APIs", Justification = "Replacement API to allow nullable hints for compiler")] -internal static class TPDebug -{ - /// - [Conditional("DEBUG")] - public static void Assert([DoesNotReturnIf(false)] bool b) - => Debug.Assert(b); - - /// - [Conditional("DEBUG")] - public static void Assert([DoesNotReturnIf(false)] bool b, string message) - => Debug.Assert(b, message); -} diff --git a/src/SettingsMigrator/NullableHelpers.tt b/src/SettingsMigrator/NullableHelpers.tt deleted file mode 100644 index 7e3d8e7270..0000000000 --- a/src/SettingsMigrator/NullableHelpers.tt +++ /dev/null @@ -1,45 +0,0 @@ -<#@ template debug="true" hostspecific="true" language="C#" #> -<#@ output extension=".cs" #> -<#@ assembly name="System.Core" #> -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// -// This code is auto-generated. Changes to this file will be lost! -// This T4 file is copied in various projects because inclusion as link or through shared project -// doesn't allow to generate the C# file locally. If some modification is required, please update -// all instances. -// - -#nullable enable - -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; - -namespace <#= System.Runtime.Remoting.Messaging.CallContext.LogicalGetData("NamespaceHint") #>; - -internal static class StringUtils -{ - /// - [SuppressMessage("ApiDesign", "RS0030:Do not used banned APIs", Justification = "Replacement API to allow nullable hints for compiler")] - public static bool IsNullOrEmpty([NotNullWhen(returnValue: false)] this string? value) - => string.IsNullOrEmpty(value); - - /// - [SuppressMessage("ApiDesign", "RS0030:Do not used banned APIs", Justification = "Replacement API to allow nullable hints for compiler")] - public static bool IsNullOrWhiteSpace([NotNullWhen(returnValue: false)] this string? value) - => string.IsNullOrWhiteSpace(value); -} - -[SuppressMessage("ApiDesign", "RS0030:Do not used banned APIs", Justification = "Replacement API to allow nullable hints for compiler")] -internal static class TPDebug -{ - /// - [Conditional("DEBUG")] - public static void Assert([DoesNotReturnIf(false)] bool b) - => Debug.Assert(b); - - /// - [Conditional("DEBUG")] - public static void Assert([DoesNotReturnIf(false)] bool b, string message) - => Debug.Assert(b, message); -} diff --git a/src/SettingsMigrator/PathResolver.cs b/src/SettingsMigrator/PathResolver.cs deleted file mode 100644 index cb197a3241..0000000000 --- a/src/SettingsMigrator/PathResolver.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System; -using System.Diagnostics.CodeAnalysis; -using System.Globalization; -using System.IO; - -namespace Microsoft.VisualStudio.TestPlatform.SettingsMigrator; - -/// -/// Used to resolve the inputs provided by the user to paths needed by migrator. -/// -public class PathResolver -{ - private const string RunSettingsExtension = ".runsettings"; - - /// - /// Gets the target path based on user inputs. - /// - /// User inputs - /// New file path to create - [SuppressMessage("Performance", "CA1822:Mark members as static", Justification = "Part of the public API")] - public string? GetTargetPath(string[] args) - { - string? newFilePath = null; - if (args.Length < 1 || !Path.IsPathRooted(args[0])) - { - return newFilePath; - } - - if (args.Length == 1) - { - var oldFilePath = args[0]; - var newFileName = string.Concat(Path.GetFileNameWithoutExtension(oldFilePath), "_", DateTime.Now.ToString("MM-dd-yyyy_hh-mm-ss", CultureInfo.CurrentCulture), RunSettingsExtension); - newFilePath = Path.Combine(Path.GetDirectoryName(oldFilePath)!, newFileName); - } - else if (args.Length == 2) - { - newFilePath = args[1]; - if (!Path.IsPathRooted(newFilePath) || !string.Equals(Path.GetExtension(newFilePath), RunSettingsExtension, StringComparison.OrdinalIgnoreCase)) - { - newFilePath = null; - } - } - - return newFilePath; - } -} diff --git a/src/SettingsMigrator/Program.cs b/src/SettingsMigrator/Program.cs deleted file mode 100644 index 5b84b735bc..0000000000 --- a/src/SettingsMigrator/Program.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System; - -using SettingsMigrator; - -using CommandLineResources = Microsoft.VisualStudio.TestPlatform.SettingsMigrator.Resources.Resources; - -namespace Microsoft.VisualStudio.TestPlatform.SettingsMigrator; - -/// -/// Entry point for SettingsMigrator. -/// -public static class Program -{ - /// - /// Main entry point. Hands off execution to Migrator. - /// - /// Arguments on the command line - /// Exit code - public static int Main(string[] args) - { - var pathResolver = new PathResolver(); - string? newFilePath = pathResolver.GetTargetPath(args); - - if (!newFilePath.IsNullOrEmpty()) - { - string oldFilePath = args[0]; - var migrator = new Migrator(); - migrator.Migrate(oldFilePath, newFilePath); - } - else - { - Console.WriteLine(CommandLineResources.ValidUsage); - return 1; - } - - return 0; - } -} diff --git a/src/SettingsMigrator/PublicAPI/PublicAPI.Shipped.txt b/src/SettingsMigrator/PublicAPI/PublicAPI.Shipped.txt deleted file mode 100644 index 706bd9259e..0000000000 --- a/src/SettingsMigrator/PublicAPI/PublicAPI.Shipped.txt +++ /dev/null @@ -1,27 +0,0 @@ -#nullable enable -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.Migrator -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.Migrator.Migrate(string! oldFilePath, string! newFilePath) -> void -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.Migrator.Migrator() -> void -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.PathResolver -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.PathResolver.GetTargetPath(string![]! args) -> string? -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.PathResolver.PathResolver() -> void -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.Program -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Datacollectors.get -> System.Xml.XmlNodeList? -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Datacollectors.set -> void -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Deployment.get -> System.Xml.XmlNode? -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Deployment.set -> void -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Execution.get -> System.Xml.XmlNode? -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Execution.set -> void -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Hosts.get -> System.Xml.XmlNode? -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Hosts.set -> void -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Script.get -> System.Xml.XmlNode? -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Script.set -> void -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.TestSettingsNodes() -> void -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Timeout.get -> System.Xml.XmlNode? -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Timeout.set -> void -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.UnitTestConfig.get -> System.Xml.XmlNode? -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.UnitTestConfig.set -> void -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.WebSettings.get -> System.Xml.XmlNode? -Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.WebSettings.set -> void -static Microsoft.VisualStudio.TestPlatform.SettingsMigrator.Program.Main(string![]! args) -> int diff --git a/src/SettingsMigrator/PublicAPI/PublicAPI.Unshipped.txt b/src/SettingsMigrator/PublicAPI/PublicAPI.Unshipped.txt deleted file mode 100644 index 7dc5c58110..0000000000 --- a/src/SettingsMigrator/PublicAPI/PublicAPI.Unshipped.txt +++ /dev/null @@ -1 +0,0 @@ -#nullable enable diff --git a/src/SettingsMigrator/Resources/Resources.Designer.cs b/src/SettingsMigrator/Resources/Resources.Designer.cs deleted file mode 100644 index d7fb215f3c..0000000000 --- a/src/SettingsMigrator/Resources/Resources.Designer.cs +++ /dev/null @@ -1,115 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Microsoft.VisualStudio.TestPlatform.SettingsMigrator.Resources { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SettingsMigrator.Resources.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to Any LegacySettings node already present in the runsettings will be removed.. - /// - internal static string IgnoringLegacySettings { - get { - return ResourceManager.GetString("IgnoringLegacySettings", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RunSettings does not contain an embedded testSettings, not migrating.. - /// - internal static string NoEmbeddedSettings { - get { - return ResourceManager.GetString("NoEmbeddedSettings", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The migrated RunSettings file has been created at: {0}. - /// - internal static string RunSettingsCreated { - get { - return ResourceManager.GetString("RunSettingsCreated", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The attributes agentNotRespondingTimeout, deploymentTimeout, scriptTimeout are not supported, so these will not be migrated.. - /// - internal static string UnsupportedAttributes { - get { - return ResourceManager.GetString("UnsupportedAttributes", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Valid usage: - ///SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> - ///SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> <Full path to runsettings file to be created> - ///Examples: - ///SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings - ///SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings - ///SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings - ///SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings. - /// - internal static string ValidUsage { - get { - return ResourceManager.GetString("ValidUsage", resourceCulture); - } - } - } -} diff --git a/src/SettingsMigrator/Resources/Resources.resx b/src/SettingsMigrator/Resources/Resources.resx deleted file mode 100644 index 3f415c1ae0..0000000000 --- a/src/SettingsMigrator/Resources/Resources.resx +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Any LegacySettings node already present in the runsettings will be removed. - - - RunSettings does not contain an embedded testSettings, not migrating. - - - The migrated RunSettings file has been created at: {0} - - - The attributes agentNotRespondingTimeout, deploymentTimeout, scriptTimeout of Timeouts node are not supported, so these will not be migrated. - - - Valid usage: -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> <Full path to runsettings file to be created> -Examples: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - - \ No newline at end of file diff --git a/src/SettingsMigrator/Resources/xlf/Resources.cs.xlf b/src/SettingsMigrator/Resources/xlf/Resources.cs.xlf deleted file mode 100644 index 2974629c07..0000000000 --- a/src/SettingsMigrator/Resources/xlf/Resources.cs.xlf +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - Any LegacySettings node already present in the runsettings will be removed. - Všechny uzly LegacySettings, které už jsou v souboru Runsettings, se odstraní. - - - - RunSettings does not contain an embedded testSettings, not migrating. - RunSettings neobsahuje žádné vložené testSettings, nemigruje se. - - - - The migrated RunSettings file has been created at: {0} - Migrovaný soubor RunSettings se vytvořil v: {0} - - - - The attributes agentNotRespondingTimeout, deploymentTimeout, scriptTimeout of Timeouts node are not supported, so these will not be migrated. - Atributy agentNotRespondingTimeout, deploymentTimeout a scriptTimeout uzlu Timeouts nejsou podporované, takže se nebudou migrovat. - - - - Valid usage: -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> <Full path to runsettings file to be created> -Examples: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - Platné použití: -SettingsMigrator.exe <Úplná cesta k souboru testsettings nebo runsettings, který se má migrovat> -SettingsMigrator.exe <Úplná cesta k souboru testsettings nebo runsettings, který se má migrovat> <Úplná cesta k souboru runsettings, který se má vytvořit> -Příklady: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - - - - - \ No newline at end of file diff --git a/src/SettingsMigrator/Resources/xlf/Resources.de.xlf b/src/SettingsMigrator/Resources/xlf/Resources.de.xlf deleted file mode 100644 index 7844d26972..0000000000 --- a/src/SettingsMigrator/Resources/xlf/Resources.de.xlf +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - Any LegacySettings node already present in the runsettings will be removed. - Bereits in RunSettings vorhandene LegacySettings-Knoten werden entfernt. - - - - RunSettings does not contain an embedded testSettings, not migrating. - RunSettings enthält keine eingebetteten testSettings. Die Migration wird nicht durchgeführt. - - - - The migrated RunSettings file has been created at: {0} - Die migrierte RunSettings-Datei wurde in folgendem Verzeichnis erstellt: {0} - - - - The attributes agentNotRespondingTimeout, deploymentTimeout, scriptTimeout of Timeouts node are not supported, so these will not be migrated. - Die Attribute "agentNotRespondingTimeout", "deploymentTimeout" und "scriptTimeout" des Knotens "Timeouts" werden nicht unterstützt und daher nicht migriert. - - - - Valid usage: -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> <Full path to runsettings file to be created> -Examples: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - Gültige Syntax: -SettingsMigrator.exe <vollständiger Pfad zur TESTSETTINGS-Datei oder RUNSETTINGS-Datei für die Migration> -SettingsMigrator.exe <vollständiger Pfad zur TESTSETTINGS-Datei oder RUNSETTINGS-Datei für die Migration> <vollständiger Pfad zur zu erstellenden RUNSETTINGS-Datei> -Beispiele: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - - - - - \ No newline at end of file diff --git a/src/SettingsMigrator/Resources/xlf/Resources.es.xlf b/src/SettingsMigrator/Resources/xlf/Resources.es.xlf deleted file mode 100644 index 8e73dc517f..0000000000 --- a/src/SettingsMigrator/Resources/xlf/Resources.es.xlf +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - Any LegacySettings node already present in the runsettings will be removed. - Se quitará cualquier nodo de LegacySettings que ya exista en el archivo RunSettings. - - - - RunSettings does not contain an embedded testSettings, not migrating. - RunSettings no contiene ningún valor de testSettings incrustado, por lo que no se migrará. - - - - The migrated RunSettings file has been created at: {0} - El archivo RunSettings migrado se ha creado a las {0}. - - - - The attributes agentNotRespondingTimeout, deploymentTimeout, scriptTimeout of Timeouts node are not supported, so these will not be migrated. - Los atributos agentNotRespondingTimeout, deploymentTimeout, scriptTimeout del nodo Timeouts no se admiten, por lo que no se migrarán. - - - - Valid usage: -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> <Full path to runsettings file to be created> -Examples: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - Uso válido: -SettingsMigrator.exe <Ruta completa al archivo testsettings o runsettings que se va a migrar> -SettingsMigrator.exe <Ruta completa al archivo testsettings o runsettings que se va a migrar> <Ruta completa al archivo runsettings que se va a crear> -Ejemplos: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - - - - - \ No newline at end of file diff --git a/src/SettingsMigrator/Resources/xlf/Resources.fr.xlf b/src/SettingsMigrator/Resources/xlf/Resources.fr.xlf deleted file mode 100644 index 2c3d50d885..0000000000 --- a/src/SettingsMigrator/Resources/xlf/Resources.fr.xlf +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - Any LegacySettings node already present in the runsettings will be removed. - Tout nœud LegacySettings déjà présent dans les paramètres d’exécution sera supprimé. - - - - RunSettings does not contain an embedded testSettings, not migrating. - RunSettings ne contient pas de testSettings incorporé. Échec de la migration. - - - - The migrated RunSettings file has been created at: {0} - Le fichier RunSettings migré a été créé à : {0} - - - - The attributes agentNotRespondingTimeout, deploymentTimeout, scriptTimeout of Timeouts node are not supported, so these will not be migrated. - Les attributs agentNotRespondingTimeout, deploymentTimeout et scriptTimeout du nœud Timeouts ne sont pas pris en charge. Ils ne seront donc pas migrés. - - - - Valid usage: -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> <Full path to runsettings file to be created> -Examples: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - Utilisation valide : -SettingsMigrator.exe <chemin complet du fichier testsettings ou runsettings à migrer> -SettingsMigrator.exe <chemin complet du fichier testsettings ou runsettings à migrer> <chemin complet du fichier runsettings à créer> -Exemples : -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - - - - - \ No newline at end of file diff --git a/src/SettingsMigrator/Resources/xlf/Resources.it.xlf b/src/SettingsMigrator/Resources/xlf/Resources.it.xlf deleted file mode 100644 index 31c97f9c80..0000000000 --- a/src/SettingsMigrator/Resources/xlf/Resources.it.xlf +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - Any LegacySettings node already present in the runsettings will be removed. - L'eventuale nodo LegacySettings già presente nel file RunSettings verrà rimosso. - - - - RunSettings does not contain an embedded testSettings, not migrating. - Il file RunSettings non contiene un elemento testSettings incorporato. La migrazione non verrà eseguita. - - - - The migrated RunSettings file has been created at: {0} - Il file RunSettings di cui è stata eseguita la migrazione è stato creato in: {0} - - - - The attributes agentNotRespondingTimeout, deploymentTimeout, scriptTimeout of Timeouts node are not supported, so these will not be migrated. - Gli attributi agentNotRespondingTimeout, deploymentTimeout, scriptTimeout del nodo Timeouts non sono supportati, di conseguenza non ne verrà eseguita la migrazione. - - - - Valid usage: -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> <Full path to runsettings file to be created> -Examples: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - Sintassi valida: -SettingsMigrator.exe <percorso completo del file testsettings o runsettings di cui eseguire la migrazione> -SettingsMigrator.exe <percorso completo del file testsettings o runsettings di cui eseguire la migrazione> <percorso completo del file runsettings da creare> -Esempi: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - - - - - \ No newline at end of file diff --git a/src/SettingsMigrator/Resources/xlf/Resources.ja.xlf b/src/SettingsMigrator/Resources/xlf/Resources.ja.xlf deleted file mode 100644 index 7a4bc29684..0000000000 --- a/src/SettingsMigrator/Resources/xlf/Resources.ja.xlf +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - Any LegacySettings node already present in the runsettings will be removed. - RunSettings 内に既に存在するすべての LegacySettings ノードは削除されます。 - - - - RunSettings does not contain an embedded testSettings, not migrating. - RunSettings には埋め込み testSettings が含まれていないため、移行されません。 - - - - The migrated RunSettings file has been created at: {0} - 移行された RunSettings ファイルは次の場所に作成されました: {0} - - - - The attributes agentNotRespondingTimeout, deploymentTimeout, scriptTimeout of Timeouts node are not supported, so these will not be migrated. - Timeouts ノードの agentNotRespondingTimeout、deploymentTimeout、scriptTimeout 属性はサポートされていないため、これらは移行されません。 - - - - Valid usage: -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> <Full path to runsettings file to be created> -Examples: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - 有効な使用法: -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> <Full path to testsettings file or runsettings file to be migrated> -例: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - - - - - \ No newline at end of file diff --git a/src/SettingsMigrator/Resources/xlf/Resources.ko.xlf b/src/SettingsMigrator/Resources/xlf/Resources.ko.xlf deleted file mode 100644 index 4428f36393..0000000000 --- a/src/SettingsMigrator/Resources/xlf/Resources.ko.xlf +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - Any LegacySettings node already present in the runsettings will be removed. - runsettings에 이미 존재하는 LegacySettings 노드가 제거됩니다. - - - - RunSettings does not contain an embedded testSettings, not migrating. - RunSettings에 포함된 testSettings이 없으며 마이그레이션되지 않습니다. - - - - The migrated RunSettings file has been created at: {0} - 마이그레이션된 RunSettings 파일은 {0}에 생성되었습니다. - - - - The attributes agentNotRespondingTimeout, deploymentTimeout, scriptTimeout of Timeouts node are not supported, so these will not be migrated. - 시간 제한 노드의 agentNotRespondingTimeout, deploymentTimeout, scriptTimeout 특성은 지원되지 않으므로 마이그레이션되지 않습니다. - - - - Valid usage: -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> <Full path to runsettings file to be created> -Examples: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - 유효한 사용법: -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> <Full path to runsettings file to be created> -Examples: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - - - - - \ No newline at end of file diff --git a/src/SettingsMigrator/Resources/xlf/Resources.pl.xlf b/src/SettingsMigrator/Resources/xlf/Resources.pl.xlf deleted file mode 100644 index 4f824d09fe..0000000000 --- a/src/SettingsMigrator/Resources/xlf/Resources.pl.xlf +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - Any LegacySettings node already present in the runsettings will be removed. - Wszelkie węzły LegacySettings już istniejące w pliku runsettings zostaną usunięte. - - - - RunSettings does not contain an embedded testSettings, not migrating. - Plik RunSettings nie zawiera osadzonego elementu testSettings, migracja nie jest wykonywana. - - - - The migrated RunSettings file has been created at: {0} - Zmigrowany plik RunSettings został utworzony w: {0} - - - - The attributes agentNotRespondingTimeout, deploymentTimeout, scriptTimeout of Timeouts node are not supported, so these will not be migrated. - Atrybuty agentNotRespondingTimeout, deploymentTimeout i scriptTimeout węzła Timeouts nie są obsługiwane, więc nie zostaną zmigrowane. - - - - Valid usage: -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> <Full path to runsettings file to be created> -Examples: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - Prawidłowe użycie: -SettingsMigrator.exe <pełna ścieżka do pliku testsettings lub runsettings do zmigrowania> -SettingsMigrator.exe <pełna ścieżka do pliku testsettings lub runsettings do zmigrowania> <pełna ścieżka do pliku runsettings do utworzenia> -Przykłady: -SettingsMigrator.exe E:\MójTest\UstawieniaMojegoTestu.testsettings -SettingsMigrator.exe E:\MójTest\UstawieniaMojegoStaregoPrzebiegu.runsettings -SettingsMigrator.exe E:\MójTest\UstawieniaMojegoTestu.testsettings E:\MójTest\UstawieniaMojegoNowegoPrzebiegu.runsettings -SettingsMigrator.exe E:\MójTest\UstawieniaMojegoStaregoPrzebiegu.runsettings E:\MójTest\UstawieniaMojegoNowegoPrzebiegu.runsettings - - - - - \ No newline at end of file diff --git a/src/SettingsMigrator/Resources/xlf/Resources.pt-BR.xlf b/src/SettingsMigrator/Resources/xlf/Resources.pt-BR.xlf deleted file mode 100644 index 6245aad7cb..0000000000 --- a/src/SettingsMigrator/Resources/xlf/Resources.pt-BR.xlf +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - Any LegacySettings node already present in the runsettings will be removed. - Qualquer nó LegacySettings já presente em runsettings será removido. - - - - RunSettings does not contain an embedded testSettings, not migrating. - O RunSettings que não contém um testSettings incorporado não migrará. - - - - The migrated RunSettings file has been created at: {0} - O arquivo RunSettings migrado foi criado em: {0} - - - - The attributes agentNotRespondingTimeout, deploymentTimeout, scriptTimeout of Timeouts node are not supported, so these will not be migrated. - Os atributos agentNotRespondingTimeout, deploymentTimeout, scriptTimeout do nó Timeouts não têm suporte, portanto, não serão migrados. - - - - Valid usage: -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> <Full path to runsettings file to be created> -Examples: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - Uso válido: -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> <Full path to runsettings file to be created> -Examples: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - - - - - \ No newline at end of file diff --git a/src/SettingsMigrator/Resources/xlf/Resources.ru.xlf b/src/SettingsMigrator/Resources/xlf/Resources.ru.xlf deleted file mode 100644 index b7fc9ca6de..0000000000 --- a/src/SettingsMigrator/Resources/xlf/Resources.ru.xlf +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - Any LegacySettings node already present in the runsettings will be removed. - Любые узлы LegacySettings в runsettings будут удалены. - - - - RunSettings does not contain an embedded testSettings, not migrating. - Файл RunSettings не содержит внутри себя testSettings. Перенос выполняться не будет. - - - - The migrated RunSettings file has been created at: {0} - Перенесенный файл RunSettings создан в {0} - - - - The attributes agentNotRespondingTimeout, deploymentTimeout, scriptTimeout of Timeouts node are not supported, so these will not be migrated. - Атрибуты agentNotRespondingTimeout, deploymentTimeout, scriptTimeout узла Timeouts не поддерживаются и перенесены не будут. - - - - Valid usage: -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> <Full path to runsettings file to be created> -Examples: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - Допустимое использование: -SettingsMigrator.exe <полный путь к переносимому файлу TestSettings или RunSettings> -SettingsMigrator.exe <полный путь к переносимому файлу TestSettings или RunSettings> <полный путь к создаваемому файлу RunSettings> -Примеры: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - - - - - \ No newline at end of file diff --git a/src/SettingsMigrator/Resources/xlf/Resources.tr.xlf b/src/SettingsMigrator/Resources/xlf/Resources.tr.xlf deleted file mode 100644 index 16b557ad45..0000000000 --- a/src/SettingsMigrator/Resources/xlf/Resources.tr.xlf +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - Any LegacySettings node already present in the runsettings will be removed. - Runsettings içinde zaten mevcut olan tüm Any LegacySettings düğümleri kaldırılacak. - - - - RunSettings does not contain an embedded testSettings, not migrating. - RunSettings, ekli bir testSettings içermiyor ve geçirilmiyor. - - - - The migrated RunSettings file has been created at: {0} - Geçirilen RunSettings dosyası şu konumda oluşturuldu: {0} - - - - The attributes agentNotRespondingTimeout, deploymentTimeout, scriptTimeout of Timeouts node are not supported, so these will not be migrated. - Zaman aşımları düğümünün agentNotRespondingTimeout, deploymentTimeout, scriptTimeout öznitelikleri desteklenmediğinden bunlar geçirilmeyecek. - - - - Valid usage: -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> <Full path to runsettings file to be created> -Examples: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - Geçerli kullanım: -SettingsMigrator.exe <Geçirilecek olan testsettings veya runsettings dosyasının tam yolu> -SettingsMigrator.exe <Geçirilecek olan testsettings veya runsettings dosyasının tam yolu> <Oluşturulacak olan runsettings dosyasının tam yolu> -Örnekler: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - - - - - \ No newline at end of file diff --git a/src/SettingsMigrator/Resources/xlf/Resources.xlf b/src/SettingsMigrator/Resources/xlf/Resources.xlf deleted file mode 100644 index ae68935d4d..0000000000 --- a/src/SettingsMigrator/Resources/xlf/Resources.xlf +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - Any LegacySettings node already present in the runsettings will be removed. - Any LegacySettings node already present in the runsettings will be removed. - - - - RunSettings does not contain an embedded testSettings, not migrating. - RunSettings does not contain an embedded testSettings, not migrating. - - - - The migrated RunSettings file has been created at: {0} - The migrated RunSettings file has been created at: {0} - - - - The attributes agentNotRespondingTimeout, deploymentTimeout, scriptTimeout of Timeouts node are not supported, so these will not be migrated. - The attributes agentNotRespondingTimeout, deploymentTimeout, scriptTimeout are not supported, so these will not be migrated. - - - - Valid usage: -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> <Full path to runsettings file to be created> -Examples: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - Valid usage: SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> <Full path to new runsettings file> -Example: SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyRunSettings.runsettings -Example: SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyRunSettings.runsettings - - - - - diff --git a/src/SettingsMigrator/Resources/xlf/Resources.zh-Hans.xlf b/src/SettingsMigrator/Resources/xlf/Resources.zh-Hans.xlf deleted file mode 100644 index 79ef44f17d..0000000000 --- a/src/SettingsMigrator/Resources/xlf/Resources.zh-Hans.xlf +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - Any LegacySettings node already present in the runsettings will be removed. - 已经存在于 runsettings 中的任何 LegacySettings 节点都将被删除。 - - - - RunSettings does not contain an embedded testSettings, not migrating. - RunSettings 不包含嵌入的 testSettings,不会迁移。 - - - - The migrated RunSettings file has been created at: {0} - 已迁移的 RunSettings 文件已在 {0} 中创建 - - - - The attributes agentNotRespondingTimeout, deploymentTimeout, scriptTimeout of Timeouts node are not supported, so these will not be migrated. - Timeouts 节点的属性 agentNotRespondingTimeout、deploymentTimeout、scriptTimeout 不受支持,因此不会迁移它们。 - - - - Valid usage: -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> <Full path to runsettings file to be created> -Examples: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - 有效用法: -SettingsMigrator.exe<Full path to testsettings file or runsettings file to be migrated> -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> <Full path to runsettings file to be created> -Examples: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - - - - - \ No newline at end of file diff --git a/src/SettingsMigrator/Resources/xlf/Resources.zh-Hant.xlf b/src/SettingsMigrator/Resources/xlf/Resources.zh-Hant.xlf deleted file mode 100644 index 00a73dac4d..0000000000 --- a/src/SettingsMigrator/Resources/xlf/Resources.zh-Hant.xlf +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - Any LegacySettings node already present in the runsettings will be removed. - 所有出現在 runsettings 中的 LegacySettings 節點,都將移除。 - - - - RunSettings does not contain an embedded testSettings, not migrating. - RunSettings 並不包含內嵌的 testSettings,所以未移轉。 - - - - The migrated RunSettings file has been created at: {0} - 移轉的 RunSettings 檔案已於 {0} 建立 - - - - The attributes agentNotRespondingTimeout, deploymentTimeout, scriptTimeout of Timeouts node are not supported, so these will not be migrated. - 不支援 Timeouts 節點的屬性 agentNotRespondingTimeout、deploymentTimeout、scriptTimeout,所以這些將不會移轉。 - - - - Valid usage: -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> -SettingsMigrator.exe <Full path to testsettings file or runsettings file to be migrated> <Full path to runsettings file to be created> -Examples: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - 有效的用法: -SettingsMigrator.exe <testsettings 檔案或要移轉的 runsettings 檔案的完整路徑> -SettingsMigrator.exe <testsettings 檔案或要移轉的 runsettings 檔案的完整路徑> <要建立的 runsettings 檔案的完整路徑> -範例: -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyTestSettings.testsettings E:\MyTest\MyNewRunSettings.runsettings -SettingsMigrator.exe E:\MyTest\MyOldRunSettings.runsettings E:\MyTest\MyNewRunSettings.runsettings - - - - - \ No newline at end of file diff --git a/src/SettingsMigrator/SettingsMigrator.csproj b/src/SettingsMigrator/SettingsMigrator.csproj deleted file mode 100644 index e87d54f8dc..0000000000 --- a/src/SettingsMigrator/SettingsMigrator.csproj +++ /dev/null @@ -1,61 +0,0 @@ - - - - - SettingsMigrator - - $(NetFrameworkRunnerTargetFramework) - Exe - AnyCPU - false - true - - - win7-x64 - - - - - - - - - - - True - True - NullableHelpers.tt - - - True - True - Resources.resx - - - - - ResXFileCodeGenerator - Resources.Designer.cs - - - - - - - - - - - - - NullableHelpers.cs - TextTemplatingFileGenerator - - - - - - - diff --git a/src/SettingsMigrator/TestSettingsNodes.cs b/src/SettingsMigrator/TestSettingsNodes.cs deleted file mode 100644 index d2b6ce1934..0000000000 --- a/src/SettingsMigrator/TestSettingsNodes.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System.Xml; - -namespace Microsoft.VisualStudio.TestPlatform.SettingsMigrator; - -/// -/// Contains the test settings nodes that need to be converted. -/// -public class TestSettingsNodes -{ - public XmlNode? Deployment { get; set; } - - public XmlNode? Script { get; set; } - - public XmlNode? WebSettings { get; set; } - - public XmlNodeList? Datacollectors { get; set; } - - public XmlNode? Timeout { get; set; } - - public XmlNode? UnitTestConfig { get; set; } - - public XmlNode? Hosts { get; set; } - - public XmlNode? Execution { get; set; } -} diff --git a/src/package/Microsoft.TestPlatform/Microsoft.TestPlatform.csproj b/src/package/Microsoft.TestPlatform/Microsoft.TestPlatform.csproj index 540e0910ea..a97d3a2e5c 100644 --- a/src/package/Microsoft.TestPlatform/Microsoft.TestPlatform.csproj +++ b/src/package/Microsoft.TestPlatform/Microsoft.TestPlatform.csproj @@ -59,7 +59,6 @@ - - - @@ -308,9 +303,6 @@ false - - false - false diff --git a/test/SettingsMigrator.UnitTests/MigratorTests.cs b/test/SettingsMigrator.UnitTests/MigratorTests.cs deleted file mode 100644 index f0b9b437e5..0000000000 --- a/test/SettingsMigrator.UnitTests/MigratorTests.cs +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System.IO; -using System.Xml; - -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Microsoft.VisualStudio.TestPlatform.SettingsMigrator.UnitTests; - -[TestClass] -public class MigratorTests -{ - private const string InvalidSettings = ""; - - private const string OldRunSettings = "" + - "" + - "true" + - "" + - "" + - ""; - - private readonly Migrator _migrator; - private readonly string _newRunsettingsPath; - - private string _oldTestsettingsPath; - private string _oldRunsettingsPath; - - public MigratorTests() - { - _migrator = new Migrator(); - _newRunsettingsPath = Path.Combine(Path.GetTempPath(), "generatedRunsettings.runsettings"); - _oldTestsettingsPath = Path.GetFullPath(Path.Combine(".", "oldTestsettings.testsettings")); - _oldRunsettingsPath = Path.Combine(Path.GetTempPath(), "oldRunsettings.runsettings"); - } - - [TestCleanup] - public void TestCleanup() - { - if (File.Exists(_newRunsettingsPath)) - { - File.Delete(_newRunsettingsPath); - } - } - - [TestMethod] - public void NonRootedPathIsNotMigrated() - { - _migrator.Migrate("asda", _newRunsettingsPath); - - Assert.IsFalse(File.Exists(_newRunsettingsPath), "Run settings should not be generated."); - } - - [TestMethod] - public void MigratorGeneratesCorrectRunsettingsForEmbeddedTestSettings() - { - var doc = new XmlDocument(); - doc.LoadXml(OldRunSettings); - Assert.IsNotNull(doc.DocumentElement); - var settingsnode = doc.DocumentElement.SelectSingleNode(@"/RunSettings/MSTest/SettingsFile"); - Assert.IsNotNull(settingsnode); - settingsnode.InnerText = _oldTestsettingsPath; - File.WriteAllText(_oldRunsettingsPath, doc.InnerXml); - - _migrator.Migrate(_oldRunsettingsPath, _newRunsettingsPath); - - Validate(_newRunsettingsPath); - - File.Delete(_oldRunsettingsPath); - } - - [TestMethod] - public void MigratorGeneratesCorrectRunsettingsForEmbeddedTestSettingsOfRelativePath() - { - _oldRunsettingsPath = Path.GetFullPath(Path.Combine(".", "oldRunSettingsWithEmbeddedSettings.runSEttings")); - - _migrator.Migrate(_oldRunsettingsPath, _newRunsettingsPath); - Validate(_newRunsettingsPath); - } - - [TestMethod] - public void MigratorGeneratesCorrectRunsettingsWithDc() - { - _oldRunsettingsPath = Path.GetFullPath(Path.Combine(".", "oldRunSettingsWithDataCollector.runsettings")); - - _migrator.Migrate(_oldRunsettingsPath, _newRunsettingsPath); - - using XmlTextReader reader = new(_newRunsettingsPath); - reader.Namespaces = false; - var document = new XmlDocument(); - document.Load(reader); - var root = document.DocumentElement; - Assert.IsNotNull(root); - var dataCollectorNode = root.SelectNodes(@"/RunSettings/DataCollectionRunSettings/DataCollectors/DataCollector"); - Assert.IsNotNull(dataCollectorNode); - Assert.AreEqual(2, dataCollectorNode.Count, "Data collector is missing"); - } - - [TestMethod] - public void MigratorGeneratesCorrectRunsettingsForTestSettings() - { - _migrator.Migrate(_oldTestsettingsPath, _newRunsettingsPath); - - Validate(_newRunsettingsPath); - } - - [TestMethod] - public void InvalidSettingsThrowsException() - { - _oldTestsettingsPath = Path.Combine(Path.GetTempPath(), "oldTestsettings.testsettings"); - try - { - File.WriteAllText(_oldTestsettingsPath, InvalidSettings); - File.WriteAllText(_newRunsettingsPath, string.Empty); - - Assert.ThrowsExactly(() => _migrator.Migrate(_oldTestsettingsPath, _newRunsettingsPath)); - } - finally - { - if (File.Exists(_oldRunsettingsPath)) - { - File.Delete(_oldRunsettingsPath); - } - } - } - - [TestMethod] - public void InvalidPathThrowsException() - { - string oldTestsettingsPath = @"X:\generatedRun,settings.runsettings"; - - // On some systems this throws file not found, on some it throws directory not found, - // I don't know why and it does not matter for the test. As long as it throws. - Assert.Throws(() => _migrator.Migrate(oldTestsettingsPath, _newRunsettingsPath)); - } - - private static void Validate(string newRunsettingsPath) - { - Assert.IsTrue(File.Exists(newRunsettingsPath), "Run settings should be generated."); - - using XmlTextReader reader = new(newRunsettingsPath); - reader.Namespaces = false; - - var document = new XmlDocument(); - document.Load(reader); - var root = document.DocumentElement; - Assert.IsNotNull(root); - - Assert.IsNotNull(root.SelectSingleNode(@"/RunSettings/WebTestRunConfiguration/Browser/Headers/Header"), "There should be a WebTestRunConfiguration node"); - Assert.IsNotNull(root.SelectSingleNode(@"/RunSettings/LegacySettings"), "There should be a LegacySettings node"); - Assert.IsNotNull(root.SelectSingleNode(@"/RunSettings/LegacySettings/Deployment/DeploymentItem"), "There should be a DeploymentItem node"); - - var scriptNode = root.SelectSingleNode(@"/RunSettings/LegacySettings/Scripts"); - Assert.IsNotNull(scriptNode, "There should be a WebTestRunConfiguration node"); - Assert.IsNotNull(scriptNode.Attributes); - Assert.AreEqual(".\\setup.bat", scriptNode.Attributes["setupScript"]!.Value, "setupScript does not match."); - Assert.AreEqual(".\\cleanup.bat", scriptNode.Attributes["cleanupScript"]!.Value, "cleanupScript does not match."); - - var forcedLegacyNode = root.SelectSingleNode(@"/RunSettings/MSTest/ForcedLegacyMode"); - Assert.IsNotNull(forcedLegacyNode, "ForcedLegacy node should be present"); - Assert.AreEqual("true", forcedLegacyNode.InnerText, "Forced legacy should be true"); - - var executionNode = root.SelectSingleNode(@" / RunSettings/LegacySettings/Execution"); - Assert.IsNotNull(executionNode, "There should be a Execution node"); - Assert.IsNotNull(executionNode.Attributes); - Assert.AreEqual("2", executionNode.Attributes["parallelTestCount"]!.Value, "parallelTestCount value does not match."); - Assert.AreEqual("MSIL", executionNode.Attributes["hostProcessPlatform"]!.Value, "hostProcessPlatform value does not match."); - - Assert.IsNotNull(root.SelectSingleNode(@"/RunSettings/LegacySettings/Execution/Hosts"), "There should be a Hosts node"); - - var timeoutNode = root.SelectSingleNode(@"/RunSettings/LegacySettings/Execution/Timeouts"); - Assert.IsNotNull(timeoutNode, "There should be a Timeouts node"); - Assert.IsNotNull(timeoutNode.Attributes); - Assert.AreEqual("120000", timeoutNode.Attributes["testTimeout"]!.Value, "testTimeout value does not match."); - - Assert.IsNotNull(root.SelectSingleNode(@"/RunSettings/LegacySettings/Execution/TestTypeSpecific/UnitTestRunConfig/AssemblyResolution/TestDirectory"), "There should be a Assembly resolution node"); - - var testSessionTimeoutNode = root.SelectSingleNode(@"/RunSettings/RunConfiguration/TestSessionTimeout"); - Assert.IsNotNull(testSessionTimeoutNode, "There should be a TestSessionTimeout node"); - Assert.AreEqual("60000", testSessionTimeoutNode.InnerText, "Timeout value does not match."); - - var dataCollectorNode = root.SelectSingleNode(@"/RunSettings/DataCollectionRunSettings/DataCollectors/DataCollector"); - Assert.IsNotNull(dataCollectorNode, "There should be a DataCollector node"); - Assert.IsNotNull(dataCollectorNode.Attributes); - Assert.AreEqual("Event Log", dataCollectorNode.Attributes["friendlyName"]!.Value, "Data collector does not match."); - } -} diff --git a/test/SettingsMigrator.UnitTests/PathResolverTests.cs b/test/SettingsMigrator.UnitTests/PathResolverTests.cs deleted file mode 100644 index 678865ddd4..0000000000 --- a/test/SettingsMigrator.UnitTests/PathResolverTests.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System; -using System.Globalization; -using System.IO; - -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Microsoft.VisualStudio.TestPlatform.SettingsMigrator.UnitTests; - -[TestClass] -public class PathResolverTests -{ - private readonly PathResolver _pathResolver; - - public PathResolverTests() - { - _pathResolver = new PathResolver(); - } - - [TestMethod] - public void PathResolverShouldReturnNullForEmptyArguments() - { - var newFilePath = _pathResolver.GetTargetPath([]); - Assert.IsNull(newFilePath, "Empty arguments should return null"); - } - - [TestMethod] - public void PathResolverShouldReturnNullForInvalidArguments() - { - var newFilePath = _pathResolver.GetTargetPath(["asd", "asd", "asd"]); - Assert.IsNull(newFilePath, "Invalid arguments should return null"); - } - - [TestMethod] - public void PathResolverShouldReturnNullForRelativePaths() - { - var newFilePath = _pathResolver.GetTargetPath(["asd.testsettings"]); - Assert.IsNull(newFilePath, "Relative paths should return null"); - } - - [TestMethod] - public void PathResolverShouldReturnNullForRelativePathsWithTwoArguments() - { - var newFilePath = _pathResolver.GetTargetPath(["asd.Testsettings", "C:\\asd.runsettings"]); - Assert.IsNull(newFilePath, "Relative paths should return null"); - } - - [TestMethod] - public void PathResolverShouldNotReturnNullForPathsWithExtensionInCapitals() - { - var newFilePath = _pathResolver.GetTargetPath(["C:\\asd.TestSEettings", "C:\\asd.RuNSettings"]); - Assert.IsNotNull(newFilePath, "Relative paths should not return null"); - } - - [TestMethod] - public void PathResolverShouldReturnNullForRelativePathsForRunsettings() - { - var newFilePath = _pathResolver.GetTargetPath(["C:\\asd.testsettings", "asd.runsettings"]); - Assert.IsNull(newFilePath, "Relative paths should return null"); - } - - [TestMethod] - public void PathResolverShouldReturnRunsettingsPathOfSameLocationAsTestSettings() - { - var newFilePath = _pathResolver.GetTargetPath(["C:\\asd.testsettings"]); - Assert.IsNotNull(newFilePath, "File path should not be null."); - Assert.IsTrue(string.Equals(Path.GetExtension(newFilePath), ".runsettings"), "File path should be .runsettings"); - Assert.IsTrue(newFilePath!.Contains("C:\\asd_"), "File should be of same name as testsettings"); - var time = newFilePath.Substring(7, 19); - Assert.IsTrue(DateTime.TryParseExact(time, "MM-dd-yyyy_hh-mm-ss", CultureInfo.CurrentCulture, DateTimeStyles.None, out _), "File name should have datetime"); - } -} diff --git a/test/SettingsMigrator.UnitTests/ProgramTests.cs b/test/SettingsMigrator.UnitTests/ProgramTests.cs deleted file mode 100644 index 9e4ef90675..0000000000 --- a/test/SettingsMigrator.UnitTests/ProgramTests.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Microsoft.VisualStudio.TestPlatform.SettingsMigrator.UnitTests; - -[TestClass] -public class ProgramTests -{ - [TestMethod] - public void MoreThanTwoArgumentsShouldNotBeAccepted() - { - int returnCode = Program.Main(["asd", "asd", "asd"]); - Assert.AreEqual(1, returnCode, "More than 2 arguments should not be accepted."); - } - - [TestMethod] - public void NoArgumentsShouldNotBeAccepted() - { - int returnCode = Program.Main([]); - Assert.AreEqual(1, returnCode, "No arguments should not be accepted."); - } -} diff --git a/test/SettingsMigrator.UnitTests/SettingsMigrator.UnitTests.csproj b/test/SettingsMigrator.UnitTests/SettingsMigrator.UnitTests.csproj deleted file mode 100644 index 03f7b9ec40..0000000000 --- a/test/SettingsMigrator.UnitTests/SettingsMigrator.UnitTests.csproj +++ /dev/null @@ -1,28 +0,0 @@ - - - - true - true - false - Exe - - - - - net48 - SettingsMigrator.UnitTests - - - - - - - - - - - - - - - diff --git a/test/SettingsMigrator.UnitTests/oldRunSettingsWithDataCollector.runsettings b/test/SettingsMigrator.UnitTests/oldRunSettingsWithDataCollector.runsettings deleted file mode 100644 index 539396df11..0000000000 --- a/test/SettingsMigrator.UnitTests/oldRunSettingsWithDataCollector.runsettings +++ /dev/null @@ -1,11 +0,0 @@ - - - true - .\oldTestsettings.testsettings - - - - - - - \ No newline at end of file diff --git a/test/SettingsMigrator.UnitTests/oldRunSettingsWithEmbeddedSettings.runsettings b/test/SettingsMigrator.UnitTests/oldRunSettingsWithEmbeddedSettings.runsettings deleted file mode 100644 index 510c693ede..0000000000 --- a/test/SettingsMigrator.UnitTests/oldRunSettingsWithEmbeddedSettings.runsettings +++ /dev/null @@ -1,6 +0,0 @@ - - - true - .\oldTestsettings.testsettings - - \ No newline at end of file diff --git a/test/SettingsMigrator.UnitTests/oldTestSettings.testsettings b/test/SettingsMigrator.UnitTests/oldTestSettings.testsettings deleted file mode 100644 index f83a5d86f0..0000000000 --- a/test/SettingsMigrator.UnitTests/oldTestSettings.testsettings +++ /dev/null @@ -1,42 +0,0 @@ - - - These are default test settings for a local test run. - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
- - - - - - - - - - - - - \ No newline at end of file From f5b2ce5a71e7050562bf7f5a1421029825ed1c74 Mon Sep 17 00:00:00 2001 From: nohwnd Date: Fri, 20 Mar 2026 17:41:42 +0100 Subject: [PATCH 2/3] Add SettingsMigrator code-to-skill coverage analysis Documents how every code path, test scenario, and XML mapping from the removed SettingsMigrator tool is accounted for in the replacement skill. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/settings-migrator-coverage-analysis.md | 212 ++++++++++++++++++++ 1 file changed, 212 insertions(+) create mode 100644 docs/settings-migrator-coverage-analysis.md diff --git a/docs/settings-migrator-coverage-analysis.md b/docs/settings-migrator-coverage-analysis.md new file mode 100644 index 0000000000..6b363efca2 --- /dev/null +++ b/docs/settings-migrator-coverage-analysis.md @@ -0,0 +1,212 @@ +# SettingsMigrator Code → Skill Coverage Analysis + +This document maps every code path, branch, and test scenario from the removed +`SettingsMigrator` tool to the corresponding section in the replacement skill +(`SKILL.md`). Purpose: verify nothing was lost in the migration. + +## Legend + +| Symbol | Meaning | +|--------|---------| +| ✅ | Fully covered in SKILL.md | +| ⚠️ | Covered but with differences (documented below) | +| ❌ | Not covered — needs attention | +| 🚫 | Intentionally omitted (CLI-only concern, not relevant for a skill) | + +--- + +## 1. Program.cs — Entry Point + +| Code (line) | Behavior | Skill Coverage | +|---|---|---| +| `PathResolver.GetTargetPath(args)` (L24-25) | Validate args, resolve output path | 🚫 CLI path resolution is not needed — the skill user provides source and destination directly | +| `migrator.Migrate(oldFilePath, newFilePath)` (L30-31) | Delegate to Migrator | ✅ Covered by "Step-by-Step Migration" section | +| `Console.WriteLine(ValidUsage); return 1` (L35-36) | Print usage on bad args | 🚫 No CLI usage message needed in a skill | + +## 2. PathResolver.cs — Argument Validation + +| Code (line) | Behavior | Skill Coverage | +|---|---|---| +| `args.Length < 1 \|\| !Path.IsPathRooted(args[0])` (L27) | Reject non-rooted paths | 🚫 CLI validation — user provides file directly | +| `args.Length == 1` → generate timestamped output name (L32-36) | Auto-generate output filename: `{name}_{MM-dd-yyyy_hh-mm-ss}.runsettings` | 🚫 CLI convenience feature, not relevant | +| `args.Length == 2` → validate second arg is rooted `.runsettings` (L38-44) | Validate output path | 🚫 CLI validation | + +## 3. Migrator.cs — Core Migration Logic + +### 3.1 Migrate() — Dispatcher (L68-87) + +| Code (line) | Behavior | Skill Coverage | +|---|---|---| +| `!Path.IsPathRooted(oldFilePath)` → print usage (L70-73) | Redundant path validation | 🚫 CLI concern | +| Extension = `.testsettings` → `MigrateTestSettings()` (L75-77) | Route to .testsettings handler | ✅ "Step 1: Identify the Source File Type" → "Migrate from .testsettings" | +| Extension = `.runsettings` → `MigrateRunSettings()` (L79-81) | Route to .runsettings handler | ✅ "Step 1: Identify the Source File Type" → "Migrate Embedded .testsettings" | +| Neither extension → print usage (L83-86) | Reject unknown extensions | 🚫 CLI error handling | + +### 3.2 MigrateRunSettings() — Embedded .testsettings (L94-130) + +| Code (line) | Behavior | Skill Coverage | +|---|---|---| +| Read `.runsettings` with `XmlTextReader`, `Namespaces = false` (L97-101) | Load existing runsettings | ✅ "Migrate Embedded .testsettings" step 1 | +| `SelectSingleNode(@"/RunSettings/MSTest/SettingsFile")` (L104) | Find embedded .testsettings path | ✅ Step 2: "Find `` node" | +| If `testSettingsPath` is not whitespace (L110) | Guard: only migrate if path exists | ✅ Implicit in skill — "if embedded reference exists" | +| `!Path.IsPathRooted` → resolve relative to .runsettings location (L113-115) | Relative path resolution | ✅ Step 2: "If the path is relative, resolve it relative to the .runsettings file location" | +| `RemoveEmbeddedTestSettings()` (L119) | Remove `` node | ✅ Step 3: "Remove the `` node" | +| `MigrateTestSettingsNodesToRunSettings()` (L121) | Apply transformation | ✅ Steps 4-5 | +| `runSettingsXmlDoc.Save(newRunSettingsPath)` (L123) | Write output | ✅ Step 7: "Save the output file" | +| `Console.WriteLine(RunSettingsCreated)` (L124) | Print success message | 🚫 CLI console output | +| `else Console.WriteLine(NoEmbeddedSettings)` (L128) | No embedded settings found | 🚫 CLI message — skill would simply have nothing to do | + +### 3.3 MigrateTestSettings() — Standalone .testsettings (L137-146) + +| Code (line) | Behavior | Skill Coverage | +|---|---|---| +| `LoadXml(SampleRunSettingsContent)` → start with `` (L139-140) | Create fresh runsettings | ✅ Step 3: "Start with a minimal .runsettings skeleton" | +| `MigrateTestSettingsNodesToRunSettings()` (L142) | Apply transformation | ✅ Step 3 sub-rules | +| Save and print (L144-145) | Output | ✅ "Migrate from .testsettings" step 3 | + +### 3.4 MigrateTestSettingsNodesToRunSettings() — Node Transformation (L153-207) + +| Code (line) | Behavior | Skill Coverage | +|---|---|---| +| `ReadTestSettingsNodes(testSettingsPath)` (L155) | Parse .testsettings into struct | ✅ "Step 2: Read the .testsettings File" — extraction table | +| Extract `testTimeout` from `Timeouts` (L159-163) | Read testTimeout attribute | ✅ Documented in 3b: "testTimeout goes into ``" | +| Extract `runTimeout` from `Timeouts` (L165-169) | Read runTimeout attribute | ✅ Documented in 3c: "TestSessionTimeout" | +| Extract `parallelTestCount` from `Execution` (L175-178) | Read execution attribute | ✅ Documented in 3b: "parallelTestCount...attributes on the `` element" | +| Extract `hostProcessPlatform` from `Execution` (L180-183) | Read execution attribute | ✅ Documented in 3b: "hostProcessPlatform" | +| `WebSettings != null` → append to root (L188-191) | WebTestRunConfiguration top-level | ✅ Section 3a: "WebTestRunConfiguration (top-level)" | +| `AddLegacyNodes()` (L194) | Create LegacySettings | ✅ Section 3b: "LegacySettings Node" | +| `!runTimeout.IsNullOrEmpty()` → `AddRunTimeoutNode()` (L197-199) | TestSessionTimeout | ✅ Section 3c: "TestSessionTimeout" | +| `Datacollectors != null && Count > 0` → `AddDataCollectorNodes()` (L202-206) | DataCollectors | ✅ Section 3d: "DataCollectors" | + +### 3.5 ReadTestSettingsNodes() — XPath Extraction (L209-241) + +| Code (line) | XPath | Property | Skill Coverage | +|---|---|---|---| +| L222 | `/TestSettings/Deployment` | Deployment | ✅ Row 1 of extraction table | +| L223 | `/TestSettings/Scripts` | Script | ✅ Row 2 | +| L224 | `/TestSettings/Execution/TestTypeSpecific/WebTestRunConfiguration` | WebSettings | ✅ Row 3 | +| L225 | `/TestSettings/Execution/AgentRule/DataCollectors/DataCollector` | Datacollectors | ✅ Row 4 | +| L226 | `/TestSettings/Execution/Timeouts` | Timeout | ✅ Row 5 | +| L227 | `/TestSettings/Execution/TestTypeSpecific/UnitTestRunConfig` | UnitTestConfig | ✅ Row 6 | +| L228 | `/TestSettings/Execution/Hosts` | Hosts | ✅ Row 7 | +| L229 | `/TestSettings/Execution` | Execution | ✅ Row 8 | +| L231-237 | Check for unsupported timeout attrs → `Console.WriteLine(UnsupportedAttributes)` | Warning | ✅ Section 3e: "Unsupported Attributes" | + +### 3.6 RemoveEmbeddedTestSettings() (L247-254) + +| Code (line) | Behavior | Skill Coverage | +|---|---|---| +| Select `/RunSettings/MSTest/SettingsFile`, remove from parent (L249-253) | Remove SettingsFile reference | ✅ "Migrate Embedded .testsettings" step 3 | + +### 3.7 AddLegacyNodes() (L264-370) + +| Code (line) | Behavior | Skill Coverage | +|---|---|---| +| Guard: all null/empty → return (L266-275) | Skip LegacySettings if nothing to add | ✅ 3b: "If **any** of these are present" implies skip otherwise | +| Create/find `` node (L283-294) | Ensure MSTest node exists | ✅ Implicit in 3b output XML | +| Create/find `` → set to "true" (L296-304) | Set ForcedLegacyMode | ✅ 3b: "`true`" | +| Remove existing `` if present (L307-312) | Replace existing LegacySettings | ✅ "Migrate Embedded" step 6: "If there's already a `` node...remove it first" | +| `Console.WriteLine(IgnoringLegacySettings)` (L310) | Warn about replacement | 🚫 Console message — skill says "remove it first (it will be replaced)" | +| Append `Deployment` to LegacySettings (L316-319) | Copy deployment | ✅ 3b XML shows `` | +| Append `Script` to LegacySettings (L321-324) | Copy scripts | ✅ 3b XML shows `` | +| Build `` node with attributes + children (L327-367) | Complex Execution node | ✅ 3b "Rules for the Execution sub-node" — all 5 rules | +| `parallelTestCount` as attribute (L331-336) | Execution attribute | ✅ Rule: "parallelTestCount...attributes on ``" | +| `hostProcessPlatform` as attribute (L338-343) | Execution attribute | ✅ Rule: "hostProcessPlatform" | +| `testTimeout` → `` (L345-352) | Timeout child element | ✅ Rule: "testTimeout goes into ``" | +| `Hosts` → child element (L354-357) | Hosts node | ✅ Rule: "Hosts is copied as a child element" | +| `UnitTestConfig` → wrap in `` (L359-364) | TestTypeSpecific wrapper | ✅ Rule: "UnitTestRunConfig is wrapped in ``" | +| Append LegacySettings to root (L369) | Final append | ✅ Implicit in output structure | + +### 3.8 AddDataCollectorNodes() (L377-400) + +| Code (line) | Behavior | Skill Coverage | +|---|---|---| +| Create `` if missing (L384-385) | Ensure parent node | ✅ 3d XML shows the full structure | +| Create `` if missing (L387-393) | Ensure DataCollectors container | ✅ | +| Foreach DataCollector → import (L396-399) | Copy each DataCollector | ✅ "each DataCollector copied as-is" | + +### 3.9 AddRunTimeoutNode() (L407-422) + +| Code (line) | Behavior | Skill Coverage | +|---|---|---| +| Create `` if missing (L414-415) | Ensure RunConfiguration node | ✅ 3c XML shows `` | +| Create `` with value (L417-418) | Map runTimeout | ✅ "`VALUE`" | + +## 4. TestSettingsNodes.cs — Data Container + +| Property | Skill Coverage | +|---|---| +| `Deployment` | ✅ Extraction table row 1 | +| `Script` | ✅ Extraction table row 2 | +| `WebSettings` | ✅ Extraction table row 3 | +| `Datacollectors` | ✅ Extraction table row 4 | +| `Timeout` | ✅ Extraction table row 5 | +| `UnitTestConfig` | ✅ Extraction table row 6 | +| `Hosts` | ✅ Extraction table row 7 | +| `Execution` | ✅ Extraction table row 8 | + +## 5. Unit Tests — Scenario Coverage + +| Test | What It Verifies | Skill Coverage | +|---|---|---| +| `NonRootedPathIsNotMigrated` | CLI rejects non-absolute paths | 🚫 CLI validation, not relevant | +| `MigratorGeneratesCorrectRunsettingsForEmbeddedTestSettings` | Full migration from .runsettings with embedded .testsettings (absolute path) | ✅ "Migrate Embedded .testsettings" section | +| `MigratorGeneratesCorrectRunsettingsForEmbeddedTestSettingsOfRelativePath` | Relative .testsettings path resolution | ✅ Step 2: "resolve it relative to the .runsettings file location" | +| `MigratorGeneratesCorrectRunsettingsWithDc` | Data collectors migrated (2 DCs preserved) | ✅ Section 3d | +| `MigratorGeneratesCorrectRunsettingsForTestSettings` | Full migration from standalone .testsettings | ✅ "Migrate from .testsettings" section | +| `InvalidSettingsThrowsException` | Malformed XML throws XmlException | 🚫 Error handling — AI/human will naturally get XML parse errors | +| `InvalidPathThrowsException` | Non-existent drive throws IOException | 🚫 Error handling | + +### Test Validate() Assertions Breakdown + +The `Validate()` helper in `MigratorTests.cs` checks these specific output nodes: + +| Assertion (line) | What It Checks | Skill Coverage | +|---|---|---| +| `WebTestRunConfiguration/Browser/Headers/Header` (L149) | WebTestRunConfiguration migrated | ✅ 3a | +| `LegacySettings` exists (L150) | LegacySettings node created | ✅ 3b | +| `LegacySettings/Deployment/DeploymentItem` (L151) | Deployment copied into LegacySettings | ✅ 3b | +| `LegacySettings/Scripts[@setupScript=".\\setup.bat"]` (L153-157) | Scripts with attributes preserved | ✅ 3b | +| `MSTest/ForcedLegacyMode = "true"` (L159-161) | ForcedLegacyMode set | ✅ 3b | +| `LegacySettings/Execution[@parallelTestCount="2"]` (L163-166) | parallelTestCount as Execution attribute | ✅ 3b rule 2 | +| `LegacySettings/Execution[@hostProcessPlatform="MSIL"]` (L167) | hostProcessPlatform as Execution attribute | ✅ 3b rule 2 | +| `LegacySettings/Execution/Hosts` (L169) | Hosts node present | ✅ 3b rule 4 | +| `LegacySettings/Execution/Timeouts[@testTimeout="120000"]` (L171-174) | testTimeout in Timeouts child | ✅ 3b rule 3 | +| `LegacySettings/Execution/TestTypeSpecific/UnitTestRunConfig/AssemblyResolution/TestDirectory` (L176) | UnitTestRunConfig wrapped in TestTypeSpecific | ✅ 3b rule 5 | +| `RunConfiguration/TestSessionTimeout = "60000"` (L178-180) | runTimeout → TestSessionTimeout | ✅ 3c | +| `DataCollectionRunSettings/DataCollectors/DataCollector[@friendlyName="Event Log"]` (L182-185) | DataCollector migrated | ✅ 3d | + +## 6. Localization Resources + +| Resource Key | Message | Skill Coverage | +|---|---|---| +| `ValidUsage` | CLI usage instructions | 🚫 Not needed — no CLI | +| `RunSettingsCreated` | "The migrated RunSettings file has been created at: {0}" | 🚫 Console output | +| `NoEmbeddedSettings` | "RunSettings does not contain an embedded testSettings, not migrating." | ⚠️ Skill doesn't explicitly say "do nothing if no embedded settings found" — implicit in step 2 logic | +| `IgnoringLegacySettings` | "Any LegacySettings node already present...will be removed." | ✅ Step 6: "remove it first (it will be replaced)" | +| `UnsupportedAttributes` | Warning about agentNotRespondingTimeout, deploymentTimeout, scriptTimeout | ✅ Section 3e | + +--- + +## Summary + +| Category | Total | ✅ Covered | 🚫 Intentionally Omitted | ⚠️ Minor Gap | +|---|---|---|---|---| +| Code paths in Migrator.cs | 28 | 23 | 4 (console messages) | 1 | +| Code paths in PathResolver.cs | 3 | 0 | 3 (CLI arg validation) | 0 | +| Code paths in Program.cs | 3 | 1 | 2 (CLI entry/exit) | 0 | +| TestSettingsNodes properties | 8 | 8 | 0 | 0 | +| Unit test scenarios | 7 | 5 | 2 (error handling) | 0 | +| Validate() assertions | 12 | 12 | 0 | 0 | +| Localization resources | 5 | 2 | 2 (CLI messages) | 1 | +| **Total** | **66** | **51 (77%)** | **13 (20%)** | **2 (3%)** | + +### ⚠️ Minor Gaps + +1. **"No embedded settings" message**: The skill doesn't explicitly say "if no `` node is found, there's nothing to migrate" — it's implicit in the conditional flow. **Verdict: acceptable** — the step says "Find ``" which naturally produces nothing if absent. + +2. **"IgnoringLegacySettings" detail**: The skill says "remove it first" but doesn't explicitly note that this means the old LegacySettings content is lost. **Verdict: acceptable** — "remove it first (it will be replaced)" is clear enough. + +### 🚫 Intentional Omissions + +All 13 omitted items are CLI-specific concerns (argument parsing, exit codes, console output messages) that don't apply to a skill/documentation context. A human following the skill instructions handles I/O themselves. From e722f6bd644281c8a293e8a2210cb887524ce152 Mon Sep 17 00:00:00 2001 From: nohwnd Date: Mon, 23 Mar 2026 19:15:32 +0100 Subject: [PATCH 3/3] Add settings migrator analysis report with telemetry info Reports which .testsettings properties require legacy mode (most of them) and documents existing telemetry metrics for measuring feature usage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/settings-migrator-report.md | 156 +++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 docs/settings-migrator-report.md diff --git a/docs/settings-migrator-report.md b/docs/settings-migrator-report.md new file mode 100644 index 0000000000..b41b434789 --- /dev/null +++ b/docs/settings-migrator-report.md @@ -0,0 +1,156 @@ +# SettingsMigrator Report: What It Actually Does + +## Summary + +The SettingsMigrator reads 8 categories of settings from `.testsettings` files. +**6 out of 8 go into `` and force `true`.** +Only 2 settings get truly native runsettings placement (+ 1 that goes top-level for web tests). + +**Verdict: If your .testsettings uses Deployment, Scripts, Hosts, UnitTestRunConfig, +parallelTestCount, hostProcessPlatform, or testTimeout — the tool forces legacy mode, +making it essentially useless as a "migration" tool. It just wraps the old settings +in a `` envelope.** + +--- + +## Property Migration Map + +### ❌ Properties that REQUIRE Legacy Mode + +These go into `` and set `true`: + +| .testsettings XPath | Destination in .runsettings | Notes | +|---|---|---| +| `/TestSettings/Deployment` | `` | Copied as-is | +| `/TestSettings/Scripts` | `` | Copied with attributes (setupScript, etc.) | +| `/TestSettings/Execution` attr `parallelTestCount` | `` | Attribute on Execution element | +| `/TestSettings/Execution` attr `hostProcessPlatform` | `` | Attribute on Execution element | +| `/TestSettings/Execution/Timeouts` attr `testTimeout` | `` | Child of Execution | +| `/TestSettings/Execution/Hosts` | `...` | Copied as-is | +| `/TestSettings/Execution/TestTypeSpecific/UnitTestRunConfig` | `...` | Wrapped in TestTypeSpecific | + +If **any** of the above are present → the tool creates `` node and forces legacy mode. + +### ✅ Properties that get NATIVE runsettings placement + +| .testsettings XPath | Destination in .runsettings | Notes | +|---|---|---| +| `/TestSettings/Execution/Timeouts` attr `runTimeout` | `value` | Truly native, no legacy needed | +| `/TestSettings/Execution/AgentRule/DataCollectors/DataCollector` | `` | Each DataCollector copied as-is | + +### ⚠️ Top-level (not legacy, but niche) + +| .testsettings XPath | Destination in .runsettings | Notes | +|---|---|---| +| `/TestSettings/Execution/TestTypeSpecific/WebTestRunConfiguration` | Top-level `` under `` | Only relevant for web/load tests | + +### 🚫 Unsupported (dropped with a warning) + +| .testsettings XPath | Result | +|---|---| +| `Timeouts/@agentNotRespondingTimeout` | Dropped, warning printed | +| `Timeouts/@deploymentTimeout` | Dropped, warning printed | +| `Timeouts/@scriptTimeout` | Dropped, warning printed | + +--- + +## Example Output Structure + +For a typical .testsettings file that uses Deployment, Scripts, Timeouts, Hosts, +UnitTestRunConfig, and DataCollectors, the migrator produces: + +```xml + + + + + true + + + + + + + + + + + ... + + + + + + + + + + + + + 60000 + + + + + + + + + + + + + +
+ + + + +``` + +--- + +## Bottom Line + +| Question | Answer | +|---|---| +| Does the tool truly migrate settings to native runsettings? | **Mostly no.** Only `runTimeout` → `TestSessionTimeout` and DataCollectors get native placement. | +| Does it require legacy mode? | **Yes**, for 7 out of 10 property categories. Any .testsettings using Deployment, Scripts, Hosts, UnitTestRunConfig, parallelTestCount, hostProcessPlatform, or testTimeout will force `true`. | +| Is the tool useful if legacy mode makes it useless? | **No.** For any real-world .testsettings file (which almost always has at least Deployment or testTimeout), this tool just wraps old settings in `` XML — it doesn't actually migrate them to modern equivalents. | + +--- + +## Existing Telemetry + +There is telemetry already in place to measure usage of these features. Query your +telemetry backend for these metrics to decide if removal is safe. + +### Telemetry Constants (`TelemetryDataConstants.cs`) + +| Metric Name | What It Tracks | +|---|---| +| `VS.TestRun.IsTestSettingsUsed` | Whether a `.testsettings` file is active in the run | +| `VS.TestRun.LegacySettings.Elements` | Which LegacySettings child elements are present (Deployment, Scripts, etc.) | +| `VS.TestRun.LegacySettings.DeploymentAttributes` | Attributes on the `` node | +| `VS.TestRun.LegacySettings.ExecutionAttributes` | Attributes on the `` node (parallelTestCount, hostProcessPlatform) | + +### Collection Flow + +1. **`TestRequestManager.LogTelemetryForLegacySettings()`** — called during `RunTests()` when telemetry is opted in +2. Calls **`InferRunSettingsHelper.TryGetLegacySettingElements()`** which inspects the runsettings XML for: + - `/RunSettings/LegacySettings` child elements + - `/RunSettings/LegacySettings/Execution/TestTypeSpecific/UnitTestRunConfig/AssemblyResolution` + - `/RunSettings/LegacySettings/Execution/Timeouts` + - `/RunSettings/LegacySettings/Execution/Hosts` + - Deployment and Execution attributes +3. All metrics are published as part of the **`vs/testplatform/testrunsession`** event + +### What to Query + +| Question | Query | +|---|---| +| How many users still use .testsettings? | `VS.TestRun.IsTestSettingsUsed = true` | +| Which legacy features are in use? | `VS.TestRun.LegacySettings.Elements` values | +| Is Deployment used? | `VS.TestRun.LegacySettings.DeploymentAttributes` is non-empty | +| Is parallelTestCount/hostProcessPlatform used? | `VS.TestRun.LegacySettings.ExecutionAttributes` is non-empty |