Skip to content

Commit

Permalink
Merge branch 'main' into Enji/shadwing
Browse files Browse the repository at this point in the history
  • Loading branch information
engyebrahim authored Aug 19, 2024
2 parents 8f98ea7 + 84396bc commit c8942d6
Show file tree
Hide file tree
Showing 51 changed files with 144 additions and 119 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace TestingPlatformExplorer.InProcess;

internal class DisplayCompositeExtensionFactorySample : ITestSessionLifetimeHandler, IDataConsumer, IOutputDeviceDataProducer
internal sealed class DisplayCompositeExtensionFactorySample : ITestSessionLifetimeHandler, IDataConsumer, IOutputDeviceDataProducer
{
private readonly IOutputDevice _outputDevice;
private int _testNodeUpdateMessageCount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Microsoft.Testing.Platform.OutputDevice;

namespace TestingPlatformExplorer.InProcess;
internal class DisplayDataConsumer : IDataConsumer, IOutputDeviceDataProducer
internal sealed class DisplayDataConsumer : IDataConsumer, IOutputDeviceDataProducer
{
private readonly IOutputDevice _outputDevice;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.Testing.Platform.OutputDevice;

namespace TestingPlatformExplorer.InProcess;
internal class DisplayTestApplicationLifecycleCallbacks : ITestApplicationLifecycleCallbacks, IOutputDeviceDataProducer
internal sealed class DisplayTestApplicationLifecycleCallbacks : ITestApplicationLifecycleCallbacks, IOutputDeviceDataProducer
{
private readonly IOutputDevice _outputDevice;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Microsoft.Testing.Platform.TestHost;

namespace TestingPlatformExplorer.InProcess;
internal class DisplayTestSessionLifeTimeHandler : ITestSessionLifetimeHandler,
internal sealed class DisplayTestSessionLifeTimeHandler : ITestSessionLifetimeHandler,
IOutputDeviceDataProducer,
IAsyncInitializableExtension,
IAsyncCleanableExtension,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace TestingPlatformExplorer.OutOfProcess;

internal class MonitorTestHost : ITestHostProcessLifetimeHandler, IOutputDeviceDataProducer
internal sealed class MonitorTestHost : ITestHostProcessLifetimeHandler, IOutputDeviceDataProducer
{
private readonly IOutputDevice _outputDevice;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace TestingPlatformExplorer.OutOfProcess;

internal class SetEnvironmentVariableForTestHost : ITestHostEnvironmentVariableProvider
internal sealed class SetEnvironmentVariableForTestHost : ITestHostEnvironmentVariableProvider
{
public string Uid => nameof(SetEnvironmentVariableForTestHost);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Text;

Expand Down Expand Up @@ -109,6 +110,15 @@ public async Task ExecuteRequestAsync(ExecuteRequestContext context)
Properties = new PropertyBag(DiscoveredTestNodeStateProperty.CachedInstance),
};

TestMethodIdentifierProperty testMethodIdentifierProperty = new(test.DeclaringType!.Assembly!.FullName!,
test.DeclaringType!.Namespace!,
test.DeclaringType.Name!,
test.Name,
test.GetParameters().Select(x => x.ParameterType.FullName).ToArray()!,
test.ReturnType.FullName!);

testNode.Properties.Add(testMethodIdentifierProperty);

await context.MessageBus.PublishAsync(this, new TestNodeUpdateMessage(discoverTestExecutionRequest.Session.SessionUid, testNode));
}
}
Expand All @@ -132,6 +142,14 @@ public async Task ExecuteRequestAsync(ExecuteRequestContext context)
List<Task> results = new();
foreach (MethodInfo test in tests)
{
if (runTestExecutionRequest.Filter is TestNodeUidListFilter filter)
{
if (!filter.TestNodeUids.Any(testId => testId == $"{test.DeclaringType!.FullName}.{test.Name}"))
{
continue;
}
}

if (test.GetCustomAttribute<SkipAttribute>() != null)
{
var skippedTestNode = new TestNode()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<ItemGroup>
<!-- Update to the last version if needed -->
<PackageReference Include="Microsoft.Testing.Platform" Version="1.2.0" />
<PackageReference Include="Microsoft.Testing.Platform" Version="1.4.0-preview.24415.5" />
</ItemGroup>

<ItemGroup>
Expand All @@ -20,4 +20,10 @@
</None>
</ItemGroup>

<ItemGroup>
<ProjectCapability Include="DiagnoseCapabilities" />
<ProjectCapability Include="TestingPlatformServer" />
<ProjectCapability Include="TestContainer" />
</ItemGroup>

</Project>
20 changes: 10 additions & 10 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24414.3">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24416.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4d15f8d1f2d61f6513b70f0bcd4bd3c1828a3a68</Sha>
<Sha>8fe02bab989df1265eee225df2c28af6dbdccc83</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="9.0.0-beta.24414.3">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="9.0.0-beta.24416.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4d15f8d1f2d61f6513b70f0bcd4bd3c1828a3a68</Sha>
<Sha>8fe02bab989df1265eee225df2c28af6dbdccc83</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="9.0.0-beta.24414.3">
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="9.0.0-beta.24416.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>4d15f8d1f2d61f6513b70f0bcd4bd3c1828a3a68</Sha>
<Sha>8fe02bab989df1265eee225df2c28af6dbdccc83</Sha>
</Dependency>
<Dependency Name="Microsoft.Testing.Extensions.CodeCoverage" Version="17.12.0-preview.24416.1">
<Uri>https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage</Uri>
<Sha>954f288279404085403a2fd0d825300b185684d1</Sha>
</Dependency>
<Dependency Name="Microsoft.Testing.Internal.Framework" Version="1.3.0-preview.24415.3">
<Dependency Name="Microsoft.Testing.Internal.Framework" Version="1.3.0-preview.24416.1">
<Uri>https://github.com/microsoft/testanywhere</Uri>
<Sha>a97cf8276b0a730350abe8033f33a470cb3c200a</Sha>
<Sha>65d83a5f176e82705e096b99f0e40a12c585d72d</Sha>
</Dependency>
<Dependency Name="MSTest.Engine" Version="1.0.0-alpha.24415.3">
<Dependency Name="MSTest.Engine" Version="1.0.0-alpha.24416.1">
<Uri>https://github.com/microsoft/testanywhere</Uri>
<Sha>a97cf8276b0a730350abe8033f33a470cb3c200a</Sha>
<Sha>65d83a5f176e82705e096b99f0e40a12c585d72d</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
</PropertyGroup>
<PropertyGroup Label="MSTest prod dependencies - darc updated">
<MicrosoftDotNetBuildTasksTemplatingPackageVersion>9.0.0-beta.24414.3</MicrosoftDotNetBuildTasksTemplatingPackageVersion>
<MicrosoftDotNetBuildTasksTemplatingPackageVersion>9.0.0-beta.24416.2</MicrosoftDotNetBuildTasksTemplatingPackageVersion>
<MicrosoftTestingExtensionsCodeCoverageVersion>17.12.0-preview.24416.1</MicrosoftTestingExtensionsCodeCoverageVersion>
<!-- comment to facilitate merge conflicts -->
<MicrosoftTestingInternalFrameworkVersion>1.3.0-preview.24415.3</MicrosoftTestingInternalFrameworkVersion>
<MSTestEngineVersion>1.0.0-alpha.24415.3</MSTestEngineVersion>
<MicrosoftTestingInternalFrameworkVersion>1.3.0-preview.24416.1</MicrosoftTestingInternalFrameworkVersion>
<MSTestEngineVersion>1.0.0-alpha.24416.1</MSTestEngineVersion>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"rollForward": "latestFeature"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24414.3",
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24416.2",
"MSBuild.Sdk.Extras": "3.0.44"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
</trans-unit>
<trans-unit id="TestClassShouldBeValidFix">
<source>Fix test class signature</source>
<target state="new">Fix test class signature</target>
<target state="translated">Correction de la signature de classe de test</target>
<note />
</trans-unit>
<trans-unit id="TestContextShouldBeValidFix">
<source>Fix test context</source>
<target state="new">Fix test context</target>
<target state="translated">Corriger le contexte de test</target>
<note />
</trans-unit>
<trans-unit id="TestMethodShouldBeValidFix">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
</trans-unit>
<trans-unit id="TestClassShouldBeValidFix">
<source>Fix test class signature</source>
<target state="new">Fix test class signature</target>
<target state="translated">Correggi la firma della classe di test</target>
<note />
</trans-unit>
<trans-unit id="TestContextShouldBeValidFix">
<source>Fix test context</source>
<target state="new">Fix test context</target>
<target state="translated">Correggi il contesto di test</target>
<note />
</trans-unit>
<trans-unit id="TestMethodShouldBeValidFix">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
</trans-unit>
<trans-unit id="TestClassShouldBeValidFix">
<source>Fix test class signature</source>
<target state="new">Fix test class signature</target>
<target state="translated">テスト クラスのシグネチャの修正</target>
<note />
</trans-unit>
<trans-unit id="TestContextShouldBeValidFix">
<source>Fix test context</source>
<target state="new">Fix test context</target>
<target state="translated">テスト コンテキストの修正</target>
<note />
</trans-unit>
<trans-unit id="TestMethodShouldBeValidFix">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
</trans-unit>
<trans-unit id="TestClassShouldBeValidFix">
<source>Fix test class signature</source>
<target state="new">Fix test class signature</target>
<target state="translated">Napraw podpis klasy testowej</target>
<note />
</trans-unit>
<trans-unit id="TestContextShouldBeValidFix">
<source>Fix test context</source>
<target state="new">Fix test context</target>
<target state="translated">Napraw kontekst testu</target>
<note />
</trans-unit>
<trans-unit id="TestMethodShouldBeValidFix">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
</trans-unit>
<trans-unit id="TestClassShouldBeValidFix">
<source>Fix test class signature</source>
<target state="new">Fix test class signature</target>
<target state="translated">Correção da assinatura de classe do teste</target>
<note />
</trans-unit>
<trans-unit id="TestContextShouldBeValidFix">
<source>Fix test context</source>
<target state="new">Fix test context</target>
<target state="translated">Correção de contexto do teste</target>
<note />
</trans-unit>
<trans-unit id="TestMethodShouldBeValidFix">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
</trans-unit>
<trans-unit id="TestClassShouldBeValidFix">
<source>Fix test class signature</source>
<target state="new">Fix test class signature</target>
<target state="translated">Исправить подпись класса теста</target>
<note />
</trans-unit>
<trans-unit id="TestContextShouldBeValidFix">
<source>Fix test context</source>
<target state="new">Fix test context</target>
<target state="translated">Исправить контекст теста</target>
<note />
</trans-unit>
<trans-unit id="TestMethodShouldBeValidFix">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
</trans-unit>
<trans-unit id="TestClassShouldBeValidFix">
<source>Fix test class signature</source>
<target state="new">Fix test class signature</target>
<target state="translated">Test sınıfı imzasını düzeltme</target>
<note />
</trans-unit>
<trans-unit id="TestContextShouldBeValidFix">
<source>Fix test context</source>
<target state="new">Fix test context</target>
<target state="translated">Test bağlamını düzeltme</target>
<note />
</trans-unit>
<trans-unit id="TestMethodShouldBeValidFix">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
</trans-unit>
<trans-unit id="TestClassShouldBeValidFix">
<source>Fix test class signature</source>
<target state="new">Fix test class signature</target>
<target state="translated">修复测试类签名</target>
<note />
</trans-unit>
<trans-unit id="TestContextShouldBeValidFix">
<source>Fix test context</source>
<target state="new">Fix test context</target>
<target state="translated">修复测试上下文</target>
<note />
</trans-unit>
<trans-unit id="TestMethodShouldBeValidFix">
Expand Down
4 changes: 2 additions & 2 deletions src/Analyzers/MSTest.Analyzers/xlf/Resources.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -464,12 +464,12 @@ Le type doit être une classe
</trans-unit>
<trans-unit id="TestClassShouldBeValidMessageFormat">
<source>Test class '{0}' should be valid</source>
<target state="new">Test class '{0}' should be valid</target>
<target state="translated">La classe de test « {0} » doit être valide</target>
<note />
</trans-unit>
<trans-unit id="TestContextShouldBeValidMessageFormat">
<source>Property 'TestContext' should be valid</source>
<target state="new">Property 'TestContext' should be valid</target>
<target state="translated">La propriété « TestContext » doit être valide</target>
<note />
</trans-unit>
<trans-unit id="TestMethodShouldBeValidMessageFormat">
Expand Down
4 changes: 2 additions & 2 deletions src/Analyzers/MSTest.Analyzers/xlf/Resources.ja.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -464,12 +464,12 @@ The type declaring these methods should also respect the following rules:
</trans-unit>
<trans-unit id="TestClassShouldBeValidMessageFormat">
<source>Test class '{0}' should be valid</source>
<target state="new">Test class '{0}' should be valid</target>
<target state="translated">テスト クラス '{0}' は有効である必要があります</target>
<note />
</trans-unit>
<trans-unit id="TestContextShouldBeValidMessageFormat">
<source>Property 'TestContext' should be valid</source>
<target state="new">Property 'TestContext' should be valid</target>
<target state="translated">プロパティ 'TestContext' は有効である必要があります</target>
<note />
</trans-unit>
<trans-unit id="TestMethodShouldBeValidMessageFormat">
Expand Down
4 changes: 2 additions & 2 deletions src/Analyzers/MSTest.Analyzers/xlf/Resources.ko.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -464,12 +464,12 @@ The type declaring these methods should also respect the following rules:
</trans-unit>
<trans-unit id="TestClassShouldBeValidMessageFormat">
<source>Test class '{0}' should be valid</source>
<target state="new">Test class '{0}' should be valid</target>
<target state="translated">테스트 클래스 '{0}'은(는) 유효해야 합니다.</target>
<note />
</trans-unit>
<trans-unit id="TestContextShouldBeValidMessageFormat">
<source>Property 'TestContext' should be valid</source>
<target state="new">Property 'TestContext' should be valid</target>
<target state="translated">'TestContext' 속성은 유효해야 합니다.</target>
<note />
</trans-unit>
<trans-unit id="TestMethodShouldBeValidMessageFormat">
Expand Down
4 changes: 2 additions & 2 deletions src/Analyzers/MSTest.Analyzers/xlf/Resources.pl.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -464,12 +464,12 @@ Typ deklarujący te metody powinien również przestrzegać następujących regu
</trans-unit>
<trans-unit id="TestClassShouldBeValidMessageFormat">
<source>Test class '{0}' should be valid</source>
<target state="new">Test class '{0}' should be valid</target>
<target state="translated">Klasa testowa „{0}” powinna być prawidłowa</target>
<note />
</trans-unit>
<trans-unit id="TestContextShouldBeValidMessageFormat">
<source>Property 'TestContext' should be valid</source>
<target state="new">Property 'TestContext' should be valid</target>
<target state="translated">Właściwość „TestContext” powinna być prawidłowa</target>
<note />
</trans-unit>
<trans-unit id="TestMethodShouldBeValidMessageFormat">
Expand Down
4 changes: 2 additions & 2 deletions src/Analyzers/MSTest.Analyzers/xlf/Resources.pt-BR.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -464,12 +464,12 @@ O tipo que declara esses métodos também deve respeitar as seguintes regras:
</trans-unit>
<trans-unit id="TestClassShouldBeValidMessageFormat">
<source>Test class '{0}' should be valid</source>
<target state="new">Test class '{0}' should be valid</target>
<target state="translated">A classe de teste ''{0}'' deve ser válida</target>
<note />
</trans-unit>
<trans-unit id="TestContextShouldBeValidMessageFormat">
<source>Property 'TestContext' should be valid</source>
<target state="new">Property 'TestContext' should be valid</target>
<target state="translated">A propriedade ''TestContext'' deve ser válida</target>
<note />
</trans-unit>
<trans-unit id="TestMethodShouldBeValidMessageFormat">
Expand Down
4 changes: 2 additions & 2 deletions src/Analyzers/MSTest.Analyzers/xlf/Resources.ru.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -468,12 +468,12 @@ The type declaring these methods should also respect the following rules:
</trans-unit>
<trans-unit id="TestClassShouldBeValidMessageFormat">
<source>Test class '{0}' should be valid</source>
<target state="new">Test class '{0}' should be valid</target>
<target state="translated">Тестовый класс "{0}" должен быть допустимым</target>
<note />
</trans-unit>
<trans-unit id="TestContextShouldBeValidMessageFormat">
<source>Property 'TestContext' should be valid</source>
<target state="new">Property 'TestContext' should be valid</target>
<target state="translated">Свойство "TestContext" должно быть допустимым</target>
<note />
</trans-unit>
<trans-unit id="TestMethodShouldBeValidMessageFormat">
Expand Down
Loading

0 comments on commit c8942d6

Please sign in to comment.