Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions MSTest.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"samples\\Playground\\Playground.csproj",
"src\\Adapter\\MSTest.Engine\\MSTest.Engine.csproj",
"src\\Adapter\\MSTest.TestAdapter\\MSTest.TestAdapter.csproj",
"src\\Adapter\\MSTestAdapter.PlatformServices\\MSTestAdapter.PlatformServices.csproj",
"src\\Adapter\\MSTest.PlatformServices\\MSTest.PlatformServices.csproj",
"src\\Analyzers\\MSTest.Analyzers.CodeFixes\\MSTest.Analyzers.CodeFixes.csproj",
"src\\Analyzers\\MSTest.Analyzers.Package\\MSTest.Analyzers.Package.csproj",
"src\\Analyzers\\MSTest.Analyzers\\MSTest.Analyzers.csproj",
Expand Down Expand Up @@ -49,10 +49,10 @@
"test\\IntegrationTests\\TestAssets\\TimeoutTestProject\\TimeoutTestProject.csproj",
"test\\Performance\\MSTest.Performance.Runner\\MSTest.Performance.Runner.csproj",
"test\\UnitTests\\MSTest.Analyzers.UnitTests\\MSTest.Analyzers.UnitTests.csproj",
"test\\UnitTests\\MSTestAdapter.PlatformServices.UnitTests\\MSTestAdapter.PlatformServices.UnitTests.csproj",
"test\\UnitTests\\MSTestAdapter.UnitTests\\MSTestAdapter.UnitTests.csproj",
"test\\UnitTests\\MSTest.PlatformServices.UnitTests\\MSTest.PlatformServices.UnitTests.csproj",
"test\\UnitTests\\MSTest.TestAdapter.UnitTests\\MSTest.TestAdapter.UnitTests.csproj",
"test\\UnitTests\\MSTest.SelfRealExamples.UnitTests\\MSTest.SelfRealExamples.UnitTests.csproj",
"test\\UnitTests\\TestFramework.UnitTests\\TestFramework.UnitTests.csproj",
"test\\UnitTests\\MSTest.TestFramework.UnitTests\\MSTest.TestFramework.UnitTests.csproj",
"test\\Utilities\\Automation.CLI\\Automation.CLI.csproj",
"test\\Utilities\\Microsoft.Testing.TestInfrastructure\\Microsoft.Testing.TestInfrastructure.csproj",
"test\\Utilities\\TestFramework.ForTestingMSTest\\TestFramework.ForTestingMSTest.csproj"
Expand Down
2 changes: 1 addition & 1 deletion NonWindowsTests.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"projects": [
"src\\Adapter\\MSTest.Engine\\MSTest.Engine.csproj",
"src\\Adapter\\MSTest.TestAdapter\\MSTest.TestAdapter.csproj",
"src\\Adapter\\MSTestAdapter.PlatformServices\\MSTestAdapter.PlatformServices.csproj",
"src\\Adapter\\MSTest.PlatformServices\\MSTest.PlatformServices.csproj",
"src\\Analyzers\\MSTest.Analyzers.CodeFixes\\MSTest.Analyzers.CodeFixes.csproj",
"src\\Analyzers\\MSTest.Analyzers.Package\\MSTest.Analyzers.Package.csproj",
"src\\Analyzers\\MSTest.Analyzers\\MSTest.Analyzers.csproj",
Expand Down
10 changes: 5 additions & 5 deletions TestFx.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<Folder Name="/src/2 - Adapter/" Id="f7cf448e-306d-5d9b-7166-fa7205a8989c">
<Project Path="src/Adapter/MSTest.Engine/MSTest.Engine.csproj" />
<Project Path="src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.csproj" />
<Project Path="src/Adapter/MSTestAdapter.PlatformServices/MSTestAdapter.PlatformServices.csproj" />
<Project Path="src/Adapter/MSTest.PlatformServices/MSTest.PlatformServices.csproj" />
</Folder>
<Folder Name="/src/3 - TestFramework/" Id="f28cc185-255f-b581-6ed3-c247f7096eb1">
<Project Path="src/TestFramework/TestFramework.Extensions/TestFramework.Extensions.csproj" />
Expand Down Expand Up @@ -78,7 +78,7 @@
<Project Path="test/IntegrationTests/MSTest.Acceptance.IntegrationTests/MSTest.Acceptance.IntegrationTests.csproj" />
<Project Path="test/IntegrationTests/MSTest.IntegrationTests/MSTest.IntegrationTests.csproj" />
<Project Path="test/IntegrationTests/MSTest.VstestConsoleWrapper.IntegrationTests/MSTest.VstestConsoleWrapper.IntegrationTests.csproj" />
<Project Path="test/IntegrationTests/PlatformServices.Desktop.IntegrationTests/PlatformServices.Desktop.IntegrationTests.csproj" />
<Project Path="test/IntegrationTests/MSTest.PlatformServices.IntegrationTests/MSTest.PlatformServices.IntegrationTests.csproj" />
</Folder>
<Folder Name="/test/IntegrationTests/TestAssets/" Id="05959510-e531-ecb6-7089-da3b202e43db">
<File Path="test/IntegrationTests/TestAssets/Directory.Build.targets" />
Expand Down Expand Up @@ -127,8 +127,8 @@
<Project Path="test/UnitTests/MSTest.Engine.UnitTests/MSTest.Engine.UnitTests.csproj" />
<Project Path="test/UnitTests/MSTest.SelfRealExamples.UnitTests/MSTest.SelfRealExamples.UnitTests.csproj" />
<Project Path="test/UnitTests/MSTest.SourceGeneration.UnitTests/MSTest.SourceGeneration.UnitTests.csproj" />
<Project Path="test/UnitTests/MSTestAdapter.PlatformServices.UnitTests/MSTestAdapter.PlatformServices.UnitTests.csproj" />
<Project Path="test/UnitTests/MSTestAdapter.UnitTests/MSTestAdapter.UnitTests.csproj" />
<Project Path="test/UnitTests/TestFramework.UnitTests/TestFramework.UnitTests.csproj" />
<Project Path="test/UnitTests/MSTest.PlatformServices.UnitTests/MSTest.PlatformServices.UnitTests.csproj" />
<Project Path="test/UnitTests/MSTest.TestAdapter.UnitTests/MSTest.TestAdapter.UnitTests.csproj" />
<Project Path="test/UnitTests/MSTest.TestFramework.UnitTests/MSTest.TestFramework.UnitTests.csproj" />
</Folder>
</Solution>
2 changes: 1 addition & 1 deletion eng/install-access-database-engine.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This is required for DataSourceTests
# Otherwise, the tests will fail with:
# The unit test adapter failed to connect to the data source or to read the data. For more information on troubleshooting this error, see "Troubleshooting Data-Driven Unit Tests" (http://go.microsoft.com/fwlink/?LinkId=62412) in the MSDN Library. Error details: The 'Microsoft.Ace.OLEDB.12.0' provider is not registered on the local machine.
# at Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.TestDataSource.GetData(ITestMethod testMethodInfo, ITestContext testContext) in /_/src/Adapter/MSTestAdapter.PlatformServices/Services/TestDataSource.cs:84
# at MSTest.PlatformServices.TestDataSource.GetData(ITestMethod testMethodInfo, ITestContext testContext) in /_/src/Adapter/MSTest.PlatformServices/Services/TestDataSource.cs:84
# The direct download link originates from https://www.microsoft.com/en-us/download/details.aspx?id=54920&msockid=01fa77be234c617f31936293223560aa
Invoke-RestMethod https://download.microsoft.com/download/3/5/C/35C84C36-661A-44E6-9324-8786B8DBE231/accessdatabaseengine_X64.exe -OutFile ./accessdatabaseengine_X64.exe
Start-Process ./accessdatabaseengine_X64.exe -Wait -ArgumentList "/quiet /passive /norestart"
2 changes: 2 additions & 0 deletions samples/Playground/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
using Microsoft.Testing.Platform.Messages;
#if NETCOREAPP
using Microsoft.Testing.Platform.ServerMode.IntegrationTests.Messages.V100;

using MSTest.Acceptance.IntegrationTests.Messages.V100;

#endif
using Microsoft.Testing.Platform.TestHost;
using Microsoft.VisualStudio.TestTools.UnitTesting;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices;
namespace MSTest.PlatformServices;

/// <summary>
/// Helps resolve MSTestFramework assemblies for CLR loader.
Expand Down Expand Up @@ -57,7 +57,7 @@ class AssemblyResolver :
/// saying we could not find en-gb resource dll which is normal. For more information,
/// <see href="https://github.com/microsoft/testfx/issues/1598" />.
/// </remarks>
private const string PlatformServicesResourcesName = "Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources";
private const string PlatformServicesResourcesName = "MSTest.PlatformServices.resources";

/// <summary>
/// This will have the list of all directories read from runsettings.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Data;
namespace MSTest.PlatformServices.Data;

/// <summary>
/// Utility classes to access databases, and to handle quoted strings etc for comma separated value files.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Data;
namespace MSTest.PlatformServices.Data;

/// <summary>
/// Utility classes to access databases, and to handle quoted strings etc for ODBC.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Data;
namespace MSTest.PlatformServices;

/// <summary>
/// Utility classes to access databases, and to handle quoted strings etc for OLE DB.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Data;
namespace MSTest.PlatformServices;

/// <summary>
/// Utility classes to access databases, and to handle quoted strings etc for SQL Server.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Data;
namespace MSTest.PlatformServices;

/// <summary>
/// This used to be "DataUtility", a helper class to handle quoted strings etc for different
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Data;
using MSTest.PlatformServices.Data;

namespace MSTest.PlatformServices;

/// <summary>
/// Defines a class that creates TestDataConnection instances to connect to data sources.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Data;
using MSTest.PlatformServices.Data;

namespace MSTest.PlatformServices;

/// <summary>
/// Data connections based on direct DB implementations all derive from this one.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Data;
namespace MSTest.PlatformServices.Data;

/// <summary>
/// Utility classes to access databases, and to handle quoted strings etc for XML data.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

#if NETFRAMEWORK

using Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Utilities;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Deployment;
using MSTest.PlatformServices.Utilities;

namespace MSTest.PlatformServices;

/*
* /!\ WARNING /!\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Deployment;
namespace MSTest.PlatformServices;

/// <summary>
/// Specifies type of deployment item origin, where the item comes from.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Deployment;
namespace MSTest.PlatformServices.Deployment;

/// <summary>
/// The test run directories.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// 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.TestPlatform.MSTest.TestAdapter.ObjectModel;
using MSTest.PlatformServices.ObjectModel;

namespace Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Discovery;
namespace MSTest.PlatformServices.Discovery;

/// <summary>
/// Helps us communicate results that were created inside of AppDomain, when AppDomains are available and enabled.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
using System.Runtime.Serialization;
using System.Security;

using Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution;
using Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Helpers;
using Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.ObjectModel;
using Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices;
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting.Internal;

namespace Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Discovery;
using MSTest.PlatformServices.Execution;
using MSTest.PlatformServices.Helpers;
using MSTest.PlatformServices.ObjectModel;

namespace MSTest.PlatformServices.Discovery;

/// <summary>
/// Enumerates through all types in the assembly in search of valid test methods.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// 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.TestPlatform.MSTest.TestAdapter.ObjectModel;
using Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Discovery;
using MSTest.PlatformServices.Interface;
using MSTest.PlatformServices.ObjectModel;

namespace MSTest.PlatformServices.Discovery;

/// <summary>
/// Enumerates through an assembly to get a set of test methods.
Expand Down Expand Up @@ -84,12 +85,12 @@ internal sealed class AssemblyEnumeratorWrapper

private static AssemblyEnumerationResult GetTestsInIsolation(string fullFilePath, IRunSettings? runSettings)
{
using MSTestAdapter.PlatformServices.Interface.ITestSourceHost isolationHost = PlatformServiceProvider.Instance.CreateTestSourceHost(fullFilePath, runSettings, frameworkHandle: null);
using MSTest.PlatformServices.Interface.ITestSourceHost isolationHost = PlatformServiceProvider.Instance.CreateTestSourceHost(fullFilePath, runSettings, frameworkHandle: null);

// Create an instance of a type defined in adapter so that adapter gets loaded in the child app domain
var assemblyEnumerator = (AssemblyEnumerator)isolationHost.CreateInstanceForType(typeof(AssemblyEnumerator), [MSTestSettings.CurrentSettings])!;

// This might not be supported if an older version of Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices
// This might not be supported if an older version of MSTest.PlatformServices
// assembly is already loaded into the App Domain.
string? xml = null;
try
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// 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.TestPlatform.MSTest.TestAdapter.Execution;
using MSTest.PlatformServices.Execution;

namespace Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Discovery;
namespace MSTest.PlatformServices.Discovery;

internal readonly struct DiscoveryTestMethodInfo
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// 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.TestPlatform.MSTest.TestAdapter.Extensions;
using Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Helpers;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Discovery;
using MSTest.PlatformServices.Extensions;
using MSTest.PlatformServices.Helpers;

namespace MSTest.PlatformServices.Discovery;

/// <summary>
/// Determines if a method is a valid test method.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@

using Microsoft.TestPlatform.AdapterUtilities;
using Microsoft.TestPlatform.AdapterUtilities.ManagedNameUtilities;
using Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Extensions;
using Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Helpers;
using Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.ObjectModel;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Discovery;
using MSTest.PlatformServices.Extensions;
using MSTest.PlatformServices.Helpers;
using MSTest.PlatformServices.ObjectModel;

namespace MSTest.PlatformServices.Discovery;

/// <summary>
/// Enumerates through the type looking for Valid Test Methods to execute.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// 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.TestPlatform.MSTest.TestAdapter.Helpers;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Discovery;
using MSTest.PlatformServices.Helpers;

namespace MSTest.PlatformServices.Discovery;

/// <summary>
/// Determines whether a type is a valid test class for this adapter.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// 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.TestPlatform.MSTest.TestAdapter.Discovery;
using Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.ObjectModel;
using Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices;
using Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface;
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter;
using MSTest.PlatformServices.Discovery;
using MSTest.PlatformServices.Interface;
using MSTest.PlatformServices.ObjectModel;

namespace MSTest.PlatformServices;

[SuppressMessage("Performance", "CA1852: Seal internal types", Justification = "Overrides required for testability")]
internal class UnitTestDiscoverer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using Microsoft.VisualStudio.TestPlatform.ObjectModel;

namespace Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices;
namespace MSTest.PlatformServices;

internal static class EngineConstants
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// 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.TestPlatform.MSTest.TestAdapter.ObjectModel;
using Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution;
using MSTest.PlatformServices.ObjectModel;

namespace MSTest.PlatformServices.Execution;

internal sealed class ClassCleanupManager
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// 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.TestPlatform.MSTestAdapter.PlatformServices;

namespace Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution;
namespace MSTest.PlatformServices.Execution;

internal sealed class ConsoleErrorRouter : TextWriter
{
Expand Down
Loading
Loading