Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static void AddMSBuild(this ITestApplicationBuilder builder)
serviceProvider.GetConfiguration(),
serviceProvider.GetCommandLineOptions()));

((TestApplicationBuilder)builder).TestHostOrchestrator.AddTestHostOrchestratorApplicationLifetime(
builder.TestHostOrchestrator.AddTestHostOrchestratorApplicationLifetime(
serviceProvider => new MSBuildOrchestratorLifetime(
serviceProvider.GetConfiguration(),
serviceProvider.GetCommandLineOptions()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,6 @@ Moving last attempt asset files to the default result directory
<data name="RetryFailedTestsExtensionDisplayName" xml:space="preserve">
<value>Retry failed tests</value>
</data>
<data name="RetryFailedTestsInvalidTestApplicationBuilderErrorMessage" xml:space="preserve">
<value>Retry failed tests only works with builders of type 'Microsoft.Testing.Platform.Builder.TestApplicationBuilder'</value>
</data>
<data name="RetryExtensionNotSupportedOnBrowserErrorMessage" xml:space="preserve">
<value>The retry extension is not supported on browser platform. Browser-based tests cannot be retried due to platform limitations.</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ Přesouvání souborů prostředků posledního pokusu do výchozího adresáře
<target state="translated">Opakovat neúspěšné testy</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsInvalidTestApplicationBuilderErrorMessage">
<source>Retry failed tests only works with builders of type 'Microsoft.Testing.Platform.Builder.TestApplicationBuilder'</source>
<target state="translated">Opakování neúspěšných testů funguje pouze s tvůrci typu Microsoft.Testing.Platform.Builder.TestApplicationBuilder.</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsMaxPercentageOptionDescription">
<source>Disable retry mechanism if the percentage of failed tests is greater than the specified value</source>
<target state="translated">Zakázat mechanismus opakování, pokud je procento neúspěšných testů větší než zadaná hodnota</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ Medienobjektdateien des letzten Versuchs werden in das Standardergebnisverzeichn
<target state="translated">Tests mit Wiederholungsfehlern</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsInvalidTestApplicationBuilderErrorMessage">
<source>Retry failed tests only works with builders of type 'Microsoft.Testing.Platform.Builder.TestApplicationBuilder'</source>
<target state="translated">Das Wiederholen fehlerhafter Tests funktioniert nur mit Generatoren vom Typ "Microsoft.Testing.Platform.Builder.TestApplicationBuilder".</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsMaxPercentageOptionDescription">
<source>Disable retry mechanism if the percentage of failed tests is greater than the specified value</source>
<target state="translated">Wiederholungsmechanismus deaktivieren, wenn der Prozentsatz fehlerhafter Tests größer als der angegebene Wert ist</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ Moviendo los archivos de recursos del último intento al directorio de resultado
<target state="translated">Reintentar pruebas con errores</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsInvalidTestApplicationBuilderErrorMessage">
<source>Retry failed tests only works with builders of type 'Microsoft.Testing.Platform.Builder.TestApplicationBuilder'</source>
<target state="translated">Reintentar pruebas con errores solo funciona con generadores de tipo "Microsoft.Testing.Platform.Builder.TestApplicationBuilder"</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsMaxPercentageOptionDescription">
<source>Disable retry mechanism if the percentage of failed tests is greater than the specified value</source>
<target state="translated">Deshabilitar el mecanismo de reintento si el porcentaje de pruebas con errores es mayor que el valor especificado</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ Déplacement des fichiers de ressources de la dernière tentative vers le réper
<target state="translated">Nouvelle tentative de tests ayant échoué</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsInvalidTestApplicationBuilderErrorMessage">
<source>Retry failed tests only works with builders of type 'Microsoft.Testing.Platform.Builder.TestApplicationBuilder'</source>
<target state="translated">Les nouvelles tentatives de tests ayant échoué fonctionnent uniquement avec les générateurs de type « Microsoft.Testing.Platform.Builder.TestApplicationBuilder »</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsMaxPercentageOptionDescription">
<source>Disable retry mechanism if the percentage of failed tests is greater than the specified value</source>
<target state="translated">Désactiver le mécanisme de nouvelle tentative si le pourcentage de tests ayant échoué est supérieur à la valeur spécifiée</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ Spostamento dei file di asset dell'ultimo tentativo nella directory dei risultat
<target state="translated">Ripeti i test non riusciti</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsInvalidTestApplicationBuilderErrorMessage">
<source>Retry failed tests only works with builders of type 'Microsoft.Testing.Platform.Builder.TestApplicationBuilder'</source>
<target state="translated">La ripetizione dei test non riusciti funziona solo con i generatori di tipo 'Microsoft.Testing.Platform.Builder.TestApplicationBuilder'.</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsMaxPercentageOptionDescription">
<source>Disable retry mechanism if the percentage of failed tests is greater than the specified value</source>
<target state="translated">Disabilita il meccanismo di ripetizione dei tentativi se la percentuale di test non riusciti è maggiore del valore specificato.</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ Moving last attempt asset files to the default result directory
<target state="translated">失敗したテストの再試行</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsInvalidTestApplicationBuilderErrorMessage">
<source>Retry failed tests only works with builders of type 'Microsoft.Testing.Platform.Builder.TestApplicationBuilder'</source>
<target state="translated">失敗したテストの再試行は、'Microsoft.Testing.Platform.Builder.TestApplicationBuilder' 型のビルダーでのみ機能します</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsMaxPercentageOptionDescription">
<source>Disable retry mechanism if the percentage of failed tests is greater than the specified value</source>
<target state="translated">失敗したテストの割合が指定した値を超える場合は再試行メカニズムを無効にする</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ Moving last attempt asset files to the default result directory
<target state="translated">실패한 테스트 다시 시도</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsInvalidTestApplicationBuilderErrorMessage">
<source>Retry failed tests only works with builders of type 'Microsoft.Testing.Platform.Builder.TestApplicationBuilder'</source>
<target state="translated">실패한 테스트 다시 시도는 'Microsoft.Testing.Platform.Builder.TestApplicationBuilder' 유형의 작성기에서만 작동합니다.</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsMaxPercentageOptionDescription">
<source>Disable retry mechanism if the percentage of failed tests is greater than the specified value</source>
<target state="translated">실패한 테스트의 비율이 지정된 값보다 큰 경우 다시 시도 메커니즘을 사용하지 않도록 설정</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ Przeniesienie plików zasobów ostatniej próby do domyślnego katalogu wyników
<target state="translated">Ponów próbę testów zakończonych niepowodzeniem</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsInvalidTestApplicationBuilderErrorMessage">
<source>Retry failed tests only works with builders of type 'Microsoft.Testing.Platform.Builder.TestApplicationBuilder'</source>
<target state="translated">Ponawianie testów zakończonych niepowodzeniem działa tylko z konstruktorami typu „Microsoft.Testing.Platform.Builder.TestApplicationBuilder”</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsMaxPercentageOptionDescription">
<source>Disable retry mechanism if the percentage of failed tests is greater than the specified value</source>
<target state="translated">Wyłącz mechanizm ponawiania prób, jeśli procent testów zakończonych niepowodzeniem jest większy niż określona wartość</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ Movendo arquivos de ativo da última tentativa para o diretório de resultados p
<target state="translated">Repetir testes com falha</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsInvalidTestApplicationBuilderErrorMessage">
<source>Retry failed tests only works with builders of type 'Microsoft.Testing.Platform.Builder.TestApplicationBuilder'</source>
<target state="translated">A repetição de testes com falha funciona somente com construtores do tipo ''Microsoft.Testing.Platform.Builder.TestApplicationBuilder''</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsMaxPercentageOptionDescription">
<source>Disable retry mechanism if the percentage of failed tests is greater than the specified value</source>
<target state="translated">Desabilitar o mecanismo de repetição se a porcentagem de testes com falha for maior que o valor especificado</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ Moving last attempt asset files to the default result directory
<target state="translated">Включить повтор неудачных тестов</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsInvalidTestApplicationBuilderErrorMessage">
<source>Retry failed tests only works with builders of type 'Microsoft.Testing.Platform.Builder.TestApplicationBuilder'</source>
<target state="translated">Повтор неудачных тестов работает только с построителями типа "Microsoft.Testing.Platform.Builder.TestApplicationBuilder"</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsMaxPercentageOptionDescription">
<source>Disable retry mechanism if the percentage of failed tests is greater than the specified value</source>
<target state="translated">Отключить механизм повторных попыток, если процент неудачных тестов превышает указанное значение</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ Son deneme varlık dosyaları, varsayılan sonuç dizinine taşınıyor
<target state="translated">Başarısız testleri yeniden deneyin</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsInvalidTestApplicationBuilderErrorMessage">
<source>Retry failed tests only works with builders of type 'Microsoft.Testing.Platform.Builder.TestApplicationBuilder'</source>
<target state="translated">Başarısız testleri yeniden deneme yalnızca 'Microsoft.Testing.Platform.Builder.TestApplicationBuilder' türündeki oluşturucularla çalışır</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsMaxPercentageOptionDescription">
<source>Disable retry mechanism if the percentage of failed tests is greater than the specified value</source>
<target state="translated">Başarısız testlerin yüzdesi belirtilen değerden büyükse yeniden deneme mekanizmasını devre dışı bırak</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ Moving last attempt asset files to the default result directory
<target state="translated">重试失败的测试</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsInvalidTestApplicationBuilderErrorMessage">
<source>Retry failed tests only works with builders of type 'Microsoft.Testing.Platform.Builder.TestApplicationBuilder'</source>
<target state="translated">重试失败的测试仅适用于“Microsoft.Testing.Platform.Builder.TestApplicationBuilder”类型的生成器</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsMaxPercentageOptionDescription">
<source>Disable retry mechanism if the percentage of failed tests is greater than the specified value</source>
<target state="translated">如果失败的测试百分比大于指定值,则禁用重试机制</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ Moving last attempt asset files to the default result directory
<target state="translated">重試失敗的測試</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsInvalidTestApplicationBuilderErrorMessage">
<source>Retry failed tests only works with builders of type 'Microsoft.Testing.Platform.Builder.TestApplicationBuilder'</source>
<target state="translated">重試失敗的測試僅適用於類型為 'Microsoft.Testing.Platform.Builder.TestApplicationBuilder' 的建立器</target>
<note />
</trans-unit>
<trans-unit id="RetryFailedTestsMaxPercentageOptionDescription">
<source>Disable retry mechanism if the percentage of failed tests is greater than the specified value</source>
<target state="translated">如果失敗的測試百分比大於指定的值,則停用重試機制</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Microsoft.Testing.Extensions.Policy.Resources;
using Microsoft.Testing.Platform.Builder;
using Microsoft.Testing.Platform.Extensions;
using Microsoft.Testing.Platform.Extensions.TestHostOrchestrator;
using Microsoft.Testing.Platform.TestHost;

namespace Microsoft.Testing.Extensions;
Expand Down Expand Up @@ -37,13 +36,7 @@ CompositeExtensionFactory<RetryDataConsumer> compositeExtensionFactory
builder.TestHost.AddDataConsumer(compositeExtensionFactory);
builder.TestHost.AddTestSessionLifetimeHandler(compositeExtensionFactory);

if (builder is not TestApplicationBuilder testApplicationBuilder)
{
throw new InvalidOperationException(ExtensionResources.RetryFailedTestsInvalidTestApplicationBuilderErrorMessage);
}

// Net yet exposed extension points
((TestHostOrchestratorManager)testApplicationBuilder.TestHostOrchestrator)
builder.TestHostOrchestrator
.AddTestHostOrchestrator(serviceProvider => new RetryOrchestrator(serviceProvider));
((TestHostManager)builder.TestHost)
.AddTestExecutionFilterFactory(serviceProvider => new RetryExecutionFilterFactory(serviceProvider));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Microsoft.Testing.Platform.Logging;
using Microsoft.Testing.Platform.TestHost;
using Microsoft.Testing.Platform.TestHostControllers;
using Microsoft.Testing.Platform.TestHostOrchestrator;

namespace Microsoft.Testing.Platform.Builder;

Expand All @@ -26,6 +27,12 @@ public interface ITestApplicationBuilder
/// </summary>
ITestHostControllersManager TestHostControllers { get; }

/// <summary>
/// Gets the test host orchestrator manager.
/// </summary>
[Experimental("TPEXP", UrlFormat = "https://aka.ms/testingplatform/diagnostics#{0}")]
ITestHostOrchestratorManager TestHostOrchestrator { get; }

/// <summary>
/// Gets the command line manager.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using Microsoft.Testing.Platform.CommandLine;
using Microsoft.Testing.Platform.Configurations;
using Microsoft.Testing.Platform.Extensions.TestFramework;
using Microsoft.Testing.Platform.Extensions.TestHostOrchestrator;
using Microsoft.Testing.Platform.Helpers;
using Microsoft.Testing.Platform.Hosts;
using Microsoft.Testing.Platform.Logging;
Expand All @@ -16,6 +15,7 @@
using Microsoft.Testing.Platform.Telemetry;
using Microsoft.Testing.Platform.TestHost;
using Microsoft.Testing.Platform.TestHostControllers;
using Microsoft.Testing.Platform.TestHostOrchestrator;
using Microsoft.Testing.Platform.Tools;

namespace Microsoft.Testing.Platform.Builder;
Expand Down Expand Up @@ -53,9 +53,13 @@ internal TestApplicationBuilder(

public ITestHostControllersManager TestHostControllers => _testHostBuilder.TestHostControllers;

public ICommandLineManager CommandLine => _testHostBuilder.CommandLine;
[Experimental("TPEXP", UrlFormat = "https://aka.ms/testingplatform/diagnostics#{0}")]
ITestHostOrchestratorManager ITestApplicationBuilder.TestHostOrchestrator => _testHostBuilder.TestHostOrchestrator;

internal ITestHostOrchestratorManager TestHostOrchestrator => _testHostBuilder.TestHostOrchestratorManager;
// Binary backward compatibility: old extensions access this property on the concrete class.
internal Extensions.TestHostOrchestrator.ITestHostOrchestratorManager TestHostOrchestrator => (Extensions.TestHostOrchestrator.ITestHostOrchestratorManager)_testHostBuilder.TestHostOrchestrator;

public ICommandLineManager CommandLine => _testHostBuilder.CommandLine;

[Experimental("TPEXP", UrlFormat = "https://aka.ms/testingplatform/diagnostics#{0}")]
public IConfigurationManager Configuration => _testHostBuilder.Configuration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
using Microsoft.Testing.Platform.Builder;
using Microsoft.Testing.Platform.CommandLine;
using Microsoft.Testing.Platform.Configurations;
using Microsoft.Testing.Platform.Extensions.TestHostOrchestrator;
using Microsoft.Testing.Platform.Helpers;
using Microsoft.Testing.Platform.Logging;
using Microsoft.Testing.Platform.Telemetry;
using Microsoft.Testing.Platform.TestHost;
using Microsoft.Testing.Platform.TestHostControllers;
using Microsoft.Testing.Platform.TestHostOrchestrator;
using Microsoft.Testing.Platform.Tools;

namespace Microsoft.Testing.Platform.Hosts;
Expand All @@ -29,7 +29,7 @@ internal interface ITestHostBuilder

ITestHostControllersManager TestHostControllers { get; }

ITestHostOrchestratorManager TestHostOrchestratorManager { get; }
ITestHostOrchestratorManager TestHostOrchestrator { get; }

ITelemetryManager Telemetry { get; }

Expand Down
Loading
Loading