Skip to content

Commit 582ac6b

Browse files
authored
Merge branch 'main' into Enji/classcleanup
2 parents edf66c6 + d177974 commit 582ac6b

21 files changed

+216
-111
lines changed

eng/Version.Details.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
<Uri>https://github.com/dotnet/arcade</Uri>
1414
<Sha>2fb543a45580400a559b5ae41c96a815ea14dac5</Sha>
1515
</Dependency>
16-
<Dependency Name="Microsoft.Testing.Extensions.CodeCoverage" Version="17.12.0-preview.24281.3">
16+
<Dependency Name="Microsoft.Testing.Extensions.CodeCoverage" Version="17.12.0-preview.24368.5">
1717
<Uri>https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage</Uri>
18-
<Sha>fbc5c8316febc4897fe37cb6a1bb20a998917a87</Sha>
18+
<Sha>7f5a7d212e980136deb8a2f84aaa555bad41d310</Sha>
1919
</Dependency>
20-
<Dependency Name="Microsoft.Testing.Internal.Framework" Version="1.3.0-preview.24367.1">
20+
<Dependency Name="Microsoft.Testing.Internal.Framework" Version="1.3.0-preview.24368.1">
2121
<Uri>https://github.com/microsoft/testanywhere</Uri>
22-
<Sha>408cea3fc46ab35d71bd0a5f9527f34f0e431961</Sha>
22+
<Sha>d1b56a6cd2cd9cf5557a3dea6e0bf61040c401ca</Sha>
2323
</Dependency>
24-
<Dependency Name="MSTest.Engine" Version="1.0.0-alpha.24367.1">
24+
<Dependency Name="MSTest.Engine" Version="1.0.0-alpha.24368.1">
2525
<Uri>https://github.com/microsoft/testanywhere</Uri>
26-
<Sha>408cea3fc46ab35d71bd0a5f9527f34f0e431961</Sha>
26+
<Sha>d1b56a6cd2cd9cf5557a3dea6e0bf61040c401ca</Sha>
2727
</Dependency>
2828
</ToolsetDependencies>
2929
</Dependencies>

eng/Versions.props

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
</PropertyGroup>
99
<PropertyGroup Label="MSTest prod dependencies - darc updated">
1010
<MicrosoftDotNetBuildTasksTemplatingPackageVersion>8.0.0-beta.24367.1</MicrosoftDotNetBuildTasksTemplatingPackageVersion>
11-
<MicrosoftTestingExtensionsCodeCoverageVersion>17.12.0-preview.24281.3</MicrosoftTestingExtensionsCodeCoverageVersion>
11+
<MicrosoftTestingExtensionsCodeCoverageVersion>17.12.0-preview.24368.5</MicrosoftTestingExtensionsCodeCoverageVersion>
1212
<!-- comment to facilitate merge conflicts -->
13-
<MicrosoftTestingInternalFrameworkVersion>1.3.0-preview.24367.1</MicrosoftTestingInternalFrameworkVersion>
14-
<MSTestEngineVersion>1.0.0-alpha.24367.1</MSTestEngineVersion>
13+
<MicrosoftTestingInternalFrameworkVersion>1.3.0-preview.24368.1</MicrosoftTestingInternalFrameworkVersion>
14+
<MSTestEngineVersion>1.0.0-alpha.24368.1</MSTestEngineVersion>
1515
</PropertyGroup>
1616
</Project>

samples/Playground/Playground.csproj

+6
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,10 @@
3333
</None>
3434
</ItemGroup>
3535

36+
<ItemGroup>
37+
<ProjectCapability Include="DiagnoseCapabilities" />
38+
<ProjectCapability Include="TestingPlatformServer" />
39+
<ProjectCapability Include="TestContainer" />
40+
</ItemGroup>
41+
3642
</Project>

src/Platform/Microsoft.Testing.Extensions.VSTestBridge/ObjectModel/RunContextAdapter.cs

+31-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System.Text;
66
using System.Xml.Linq;
77

8-
using Microsoft.Testing.Extensions.VSTestBridge.Resources;
98
using Microsoft.Testing.Platform;
109
using Microsoft.Testing.Platform.CommandLine;
1110
using Microsoft.Testing.Platform.Extensions.Messages;
@@ -62,7 +61,8 @@ public RunContextAdapter(ICommandLineOptions commandLineOptions, IRunSettings ru
6261
/// <inheritdoc />
6362
public IRunSettings? RunSettings { get; }
6463

65-
// We expect only GUID values in the testNodeUids.
64+
// We use heuristic to understand if the filter should be a TestCaseId or FullyQualifiedName.
65+
// We know that in VSTest TestCaseId is a GUID and FullyQualifiedName is a string.
6666
private static string CreateFilter(TestNodeUid[] testNodesUid)
6767
{
6868
StringBuilder filter = new();
@@ -76,7 +76,35 @@ private static string CreateFilter(TestNodeUid[] testNodesUid)
7676
}
7777
else
7878
{
79-
throw new InvalidOperationException(ExtensionResources.InvalidFilterValue);
79+
TestNodeUid currentTestNodeUid = testNodesUid[i];
80+
filter.Append("FullyQualifiedName=");
81+
for (int k = 0; k < currentTestNodeUid.Value.Length; k++)
82+
{
83+
char currentChar = currentTestNodeUid.Value[k];
84+
switch (currentChar)
85+
{
86+
case '\\':
87+
case '(':
88+
case ')':
89+
case '&':
90+
case '|':
91+
case '=':
92+
case '!':
93+
case '~':
94+
// If the symbol is not escaped, add an escape character.
95+
if (i - 1 < 0 || currentTestNodeUid.Value[k - 1] != '\\')
96+
{
97+
filter.Append('\\');
98+
}
99+
100+
filter.Append(currentChar);
101+
break;
102+
103+
default:
104+
filter.Append(currentChar);
105+
break;
106+
}
107+
}
80108
}
81109

82110
if (i != testNodesUid.Length - 1)

src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/ExtensionResources.Designer.cs

-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/ExtensionResources.resx

-3
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,4 @@
138138
<data name="TestRunParameterOptionArgumentIsNotParameter" xml:space="preserve">
139139
<value>argument '{0}' is not a parameter. Parameters arguments are matching the following pattern 'key=value'.</value>
140140
</data>
141-
<data name="InvalidFilterValue" xml:space="preserve">
142-
<value>Current implementation supports only GUID Id, i.e. Id=8b0475fc-ff66-43fb-a8ba-f6def1f78210</value>
143-
</data>
144141
</root>

src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/xlf/ExtensionResources.cs.xlf

-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
33
<file datatype="xml" source-language="en" target-language="cs" original="../ExtensionResources.resx">
44
<body>
5-
<trans-unit id="InvalidFilterValue">
6-
<source>Current implementation supports only GUID Id, i.e. Id=8b0475fc-ff66-43fb-a8ba-f6def1f78210</source>
7-
<target state="new">Current implementation supports only GUID Id, i.e. Id=8b0475fc-ff66-43fb-a8ba-f6def1f78210</target>
8-
<note />
9-
</trans-unit>
105
<trans-unit id="RunSettingsOptionDescription">
116
<source>The path, relative or absolute, to the .runsettings file. For more information and examples on how to configure test run, see https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#the-runsettings-file</source>
127
<target state="translated">Relativní nebo absolutní cesta k souboru .runsettings. Další informace a příklady konfigurace testovacího běhu najdete v tématu https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#the-runsettings-file</target>

src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/xlf/ExtensionResources.de.xlf

-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
33
<file datatype="xml" source-language="en" target-language="de" original="../ExtensionResources.resx">
44
<body>
5-
<trans-unit id="InvalidFilterValue">
6-
<source>Current implementation supports only GUID Id, i.e. Id=8b0475fc-ff66-43fb-a8ba-f6def1f78210</source>
7-
<target state="new">Current implementation supports only GUID Id, i.e. Id=8b0475fc-ff66-43fb-a8ba-f6def1f78210</target>
8-
<note />
9-
</trans-unit>
105
<trans-unit id="RunSettingsOptionDescription">
116
<source>The path, relative or absolute, to the .runsettings file. For more information and examples on how to configure test run, see https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#the-runsettings-file</source>
127
<target state="translated">Der relative oder absolute Pfad zur Datei „.runsettings“. Weitere Informationen und Beispiele zum Konfigurieren des Testlaufs finden Sie unter https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#the-runsettings-file</target>

src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/xlf/ExtensionResources.es.xlf

-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
33
<file datatype="xml" source-language="en" target-language="es" original="../ExtensionResources.resx">
44
<body>
5-
<trans-unit id="InvalidFilterValue">
6-
<source>Current implementation supports only GUID Id, i.e. Id=8b0475fc-ff66-43fb-a8ba-f6def1f78210</source>
7-
<target state="new">Current implementation supports only GUID Id, i.e. Id=8b0475fc-ff66-43fb-a8ba-f6def1f78210</target>
8-
<note />
9-
</trans-unit>
105
<trans-unit id="RunSettingsOptionDescription">
116
<source>The path, relative or absolute, to the .runsettings file. For more information and examples on how to configure test run, see https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#the-runsettings-file</source>
127
<target state="translated">Ruta de acceso, relativa o absoluta, al archivo .runsettings. Para obtener más información y ejemplos sobre cómo configurar la serie de pruebas, consulte https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#the-runsettings-file</target>

src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/xlf/ExtensionResources.fr.xlf

-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
33
<file datatype="xml" source-language="en" target-language="fr" original="../ExtensionResources.resx">
44
<body>
5-
<trans-unit id="InvalidFilterValue">
6-
<source>Current implementation supports only GUID Id, i.e. Id=8b0475fc-ff66-43fb-a8ba-f6def1f78210</source>
7-
<target state="new">Current implementation supports only GUID Id, i.e. Id=8b0475fc-ff66-43fb-a8ba-f6def1f78210</target>
8-
<note />
9-
</trans-unit>
105
<trans-unit id="RunSettingsOptionDescription">
116
<source>The path, relative or absolute, to the .runsettings file. For more information and examples on how to configure test run, see https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#the-runsettings-file</source>
127
<target state="translated">Chemin d’accès, relatif ou absolu, au fichier .runsettings. Pour plus d’informations et d’exemples sur la configuration de la série de tests, consultez https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#the-runsettings-file</target>

src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/xlf/ExtensionResources.it.xlf

-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
33
<file datatype="xml" source-language="en" target-language="it" original="../ExtensionResources.resx">
44
<body>
5-
<trans-unit id="InvalidFilterValue">
6-
<source>Current implementation supports only GUID Id, i.e. Id=8b0475fc-ff66-43fb-a8ba-f6def1f78210</source>
7-
<target state="new">Current implementation supports only GUID Id, i.e. Id=8b0475fc-ff66-43fb-a8ba-f6def1f78210</target>
8-
<note />
9-
</trans-unit>
105
<trans-unit id="RunSettingsOptionDescription">
116
<source>The path, relative or absolute, to the .runsettings file. For more information and examples on how to configure test run, see https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#the-runsettings-file</source>
127
<target state="translated">Percorso, relativo o assoluto, del file con estensione runsettings. Per altre informazioni ed esempi su come configurare l'esecuzione dei test, vedere https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#the-runsettings-file</target>

src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/xlf/ExtensionResources.ja.xlf

-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
33
<file datatype="xml" source-language="en" target-language="ja" original="../ExtensionResources.resx">
44
<body>
5-
<trans-unit id="InvalidFilterValue">
6-
<source>Current implementation supports only GUID Id, i.e. Id=8b0475fc-ff66-43fb-a8ba-f6def1f78210</source>
7-
<target state="new">Current implementation supports only GUID Id, i.e. Id=8b0475fc-ff66-43fb-a8ba-f6def1f78210</target>
8-
<note />
9-
</trans-unit>
105
<trans-unit id="RunSettingsOptionDescription">
116
<source>The path, relative or absolute, to the .runsettings file. For more information and examples on how to configure test run, see https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#the-runsettings-file</source>
127
<target state="translated">.runsettings ファイルへの相対パスまたは絶対パス。テストの実行を構成する方法の詳細と例については、https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#the-runsettings-file を参照してください</target>

src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/xlf/ExtensionResources.ko.xlf

-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
33
<file datatype="xml" source-language="en" target-language="ko" original="../ExtensionResources.resx">
44
<body>
5-
<trans-unit id="InvalidFilterValue">
6-
<source>Current implementation supports only GUID Id, i.e. Id=8b0475fc-ff66-43fb-a8ba-f6def1f78210</source>
7-
<target state="new">Current implementation supports only GUID Id, i.e. Id=8b0475fc-ff66-43fb-a8ba-f6def1f78210</target>
8-
<note />
9-
</trans-unit>
105
<trans-unit id="RunSettingsOptionDescription">
116
<source>The path, relative or absolute, to the .runsettings file. For more information and examples on how to configure test run, see https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#the-runsettings-file</source>
127
<target state="translated">.runsettings 파일에 대한 상대 또는 절대 경로입니다. 테스트 실행을 구성하는 방법에 관한 자세한 내용 및 예시는 https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#the-runsettings-file을 참조하세요.</target>

src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/xlf/ExtensionResources.pl.xlf

-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
33
<file datatype="xml" source-language="en" target-language="pl" original="../ExtensionResources.resx">
44
<body>
5-
<trans-unit id="InvalidFilterValue">
6-
<source>Current implementation supports only GUID Id, i.e. Id=8b0475fc-ff66-43fb-a8ba-f6def1f78210</source>
7-
<target state="new">Current implementation supports only GUID Id, i.e. Id=8b0475fc-ff66-43fb-a8ba-f6def1f78210</target>
8-
<note />
9-
</trans-unit>
105
<trans-unit id="RunSettingsOptionDescription">
116
<source>The path, relative or absolute, to the .runsettings file. For more information and examples on how to configure test run, see https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#the-runsettings-file</source>
127
<target state="translated">Ścieżka względna lub bezwzględna pliku .runsettings. Aby uzyskać więcej informacji i przykładów dotyczących konfigurowania przebiegu testu, zobacz: https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#the-runsettings-file</target>

src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/xlf/ExtensionResources.pt-BR.xlf

-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
33
<file datatype="xml" source-language="en" target-language="pt-BR" original="../ExtensionResources.resx">
44
<body>
5-
<trans-unit id="InvalidFilterValue">
6-
<source>Current implementation supports only GUID Id, i.e. Id=8b0475fc-ff66-43fb-a8ba-f6def1f78210</source>
7-
<target state="new">Current implementation supports only GUID Id, i.e. Id=8b0475fc-ff66-43fb-a8ba-f6def1f78210</target>
8-
<note />
9-
</trans-unit>
105
<trans-unit id="RunSettingsOptionDescription">
116
<source>The path, relative or absolute, to the .runsettings file. For more information and examples on how to configure test run, see https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#the-runsettings-file</source>
127
<target state="translated">O caminho, relativo ou absoluto, para o arquivo .runsettings. Para obter mais informações e exemplos sobre como configurar a execução de teste, consulte https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#the-runsettings-file</target>

src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Resources/xlf/ExtensionResources.ru.xlf

-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
33
<file datatype="xml" source-language="en" target-language="ru" original="../ExtensionResources.resx">
44
<body>
5-
<trans-unit id="InvalidFilterValue">
6-
<source>Current implementation supports only GUID Id, i.e. Id=8b0475fc-ff66-43fb-a8ba-f6def1f78210</source>
7-
<target state="new">Current implementation supports only GUID Id, i.e. Id=8b0475fc-ff66-43fb-a8ba-f6def1f78210</target>
8-
<note />
9-
</trans-unit>
105
<trans-unit id="RunSettingsOptionDescription">
116
<source>The path, relative or absolute, to the .runsettings file. For more information and examples on how to configure test run, see https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#the-runsettings-file</source>
127
<target state="translated">Относительный или абсолютный путь к файлу .runsettings. Дополнительные сведения и примеры настройки тестового запуска см. на странице https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#the-runsettings-file</target>

0 commit comments

Comments
 (0)