diff --git a/src/Adapter/MSTest.TestAdapter/Execution/TestMethodRunner.cs b/src/Adapter/MSTest.TestAdapter/Execution/TestMethodRunner.cs index bbc8f4f0a5..cb736eab47 100644 --- a/src/Adapter/MSTest.TestAdapter/Execution/TestMethodRunner.cs +++ b/src/Adapter/MSTest.TestAdapter/Execution/TestMethodRunner.cs @@ -435,10 +435,13 @@ private TestResult[] ExecuteTest(TestMethodInfo testMethodInfo) [ new TestResult() { - // TODO: We need to change the exception type to more specific one. -#pragma warning disable CA2201 // Do not raise reserved exception types - TestFailureException = new Exception(string.Format(CultureInfo.CurrentCulture, Resource.UTA_ExecuteThrewException, ex.Message, ex.StackTrace), ex), -#pragma warning restore CA2201 // Do not raise reserved exception types + TestFailureException = new InvalidOperationException( + string.Format( + CultureInfo.CurrentCulture, + Resource.UTA_ExecuteThrewException, + _testMethodInfo.TestMethodOptions.Executor.GetType().FullName, + ex.ToString()), + ex), }, ]; } diff --git a/src/Adapter/MSTest.TestAdapter/Resources/Resource.Designer.cs b/src/Adapter/MSTest.TestAdapter/Resources/Resource.Designer.cs index c36dc6047b..6f84f352db 100644 --- a/src/Adapter/MSTest.TestAdapter/Resources/Resource.Designer.cs +++ b/src/Adapter/MSTest.TestAdapter/Resources/Resource.Designer.cs @@ -721,7 +721,8 @@ internal static string UTA_ErrorTestPropertyNullOrEmpty { } /// - /// Looks up a localized string similar to Exception thrown while executing test. If using extension of TestMethodAttribute then please contact vendor. Error message: {0}, Stack trace: {1}. + /// Looks up a localized string similar to An unhandled exception was thrown by the 'Execute' method. Please report this error to the author of the attribute '{0}'. + ///{1}. /// internal static string UTA_ExecuteThrewException { get { diff --git a/src/Adapter/MSTest.TestAdapter/Resources/Resource.resx b/src/Adapter/MSTest.TestAdapter/Resources/Resource.resx index 5114079ad8..67131b4985 100644 --- a/src/Adapter/MSTest.TestAdapter/Resources/Resource.resx +++ b/src/Adapter/MSTest.TestAdapter/Resources/Resource.resx @@ -197,7 +197,8 @@ Error: {1} Class Initialization method {0}.{1} threw exception. {2}: {3}. - Exception thrown while executing test. If using extension of TestMethodAttribute then please contact vendor. Error message: {0}, Stack trace: {1} + An unhandled exception was thrown by the 'Execute' method. Please report this error to the author of the attribute '{0}'. +{1} Error in executing test. No result returned by extension. If using extension of TestMethodAttribute then please contact vendor. diff --git a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.cs.xlf b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.cs.xlf index b617109aa8..de02732456 100644 --- a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.cs.xlf +++ b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.cs.xlf @@ -249,9 +249,10 @@ Chyba: {1} - Exception thrown while executing test. If using extension of TestMethodAttribute then please contact vendor. Error message: {0}, Stack trace: {1} - Při provádění testu se vyvolala výjimka. Pokud používáte rozšíření TestMethodAttribute, obraťte se prosím na dodavatele. Chybová zpráva: {0}, trasování zásobníku: {1} - + An unhandled exception was thrown by the 'Execute' method. Please report this error to the author of the attribute '{0}'. +{1} + Při provádění testu se vyvolala výjimka. Pokud používáte rozšíření TestMethodAttribute, obraťte se prosím na dodavatele. Chybová zpráva: {0}, trasování zásobníku: {1} + Error in executing test. No result returned by extension. If using extension of TestMethodAttribute then please contact vendor. diff --git a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.de.xlf b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.de.xlf index 63d2badfb1..b63cbd4d89 100644 --- a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.de.xlf +++ b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.de.xlf @@ -249,9 +249,10 @@ Fehler: {1} - Exception thrown while executing test. If using extension of TestMethodAttribute then please contact vendor. Error message: {0}, Stack trace: {1} - Ausnahme beim Ausführen des Tests. Wenn Sie die Erweiterung "TestMethodAttribute" verwenden, wenden Sie sich an den Hersteller. Fehlermeldung: {0}, Stapelüberwachung: {1} - + An unhandled exception was thrown by the 'Execute' method. Please report this error to the author of the attribute '{0}'. +{1} + Ausnahme beim Ausführen des Tests. Wenn Sie die Erweiterung "TestMethodAttribute" verwenden, wenden Sie sich an den Hersteller. Fehlermeldung: {0}, Stapelüberwachung: {1} + Error in executing test. No result returned by extension. If using extension of TestMethodAttribute then please contact vendor. diff --git a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.es.xlf b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.es.xlf index e154ea5b8f..050186003f 100644 --- a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.es.xlf +++ b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.es.xlf @@ -249,9 +249,10 @@ Error: {1} - Exception thrown while executing test. If using extension of TestMethodAttribute then please contact vendor. Error message: {0}, Stack trace: {1} - Se inició una excepción al ejecutar la prueba. Si usa la extensión de TestMethodAttribute, póngase en contacto con el proveedor. Mensaje de error: {0}, seguimiento: {1} - + An unhandled exception was thrown by the 'Execute' method. Please report this error to the author of the attribute '{0}'. +{1} + Se inició una excepción al ejecutar la prueba. Si usa la extensión de TestMethodAttribute, póngase en contacto con el proveedor. Mensaje de error: {0}, seguimiento: {1} + Error in executing test. No result returned by extension. If using extension of TestMethodAttribute then please contact vendor. diff --git a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.fr.xlf b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.fr.xlf index 297db55777..71952372c1 100644 --- a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.fr.xlf +++ b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.fr.xlf @@ -249,9 +249,10 @@ Erreur : {1} - Exception thrown while executing test. If using extension of TestMethodAttribute then please contact vendor. Error message: {0}, Stack trace: {1} - Exception levée pendant l'exécution du test. Si vous utilisez l'extension de TestMethodAttribute, contactez le fournisseur. Message d'erreur : {0}, Rapport des appels de procédure : {1} - + An unhandled exception was thrown by the 'Execute' method. Please report this error to the author of the attribute '{0}'. +{1} + Exception levée pendant l'exécution du test. Si vous utilisez l'extension de TestMethodAttribute, contactez le fournisseur. Message d'erreur : {0}, Rapport des appels de procédure : {1} + Error in executing test. No result returned by extension. If using extension of TestMethodAttribute then please contact vendor. diff --git a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.it.xlf b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.it.xlf index 6400699fe3..ec560e30dc 100644 --- a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.it.xlf +++ b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.it.xlf @@ -249,9 +249,10 @@ Errore: {1} - Exception thrown while executing test. If using extension of TestMethodAttribute then please contact vendor. Error message: {0}, Stack trace: {1} - È stata generata un'eccezione durante l'esecuzione del test. Se si usa l'estensione di TestMethodAttribute, contattare il fornitore. Messaggio di errore: {0}, analisi dello stack: {1} - + An unhandled exception was thrown by the 'Execute' method. Please report this error to the author of the attribute '{0}'. +{1} + È stata generata un'eccezione durante l'esecuzione del test. Se si usa l'estensione di TestMethodAttribute, contattare il fornitore. Messaggio di errore: {0}, analisi dello stack: {1} + Error in executing test. No result returned by extension. If using extension of TestMethodAttribute then please contact vendor. diff --git a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.ja.xlf b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.ja.xlf index 0653992bae..5c8b9bb5ec 100644 --- a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.ja.xlf +++ b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.ja.xlf @@ -250,9 +250,10 @@ Error: {1} - Exception thrown while executing test. If using extension of TestMethodAttribute then please contact vendor. Error message: {0}, Stack trace: {1} - テストの実行中に例外がスローされました。TestMethodAttribute の拡張クラスを使用している場合は、ベンダーに連絡してください。エラー メッセージ: {0}、スタック トレース: {1} - + An unhandled exception was thrown by the 'Execute' method. Please report this error to the author of the attribute '{0}'. +{1} + テストの実行中に例外がスローされました。TestMethodAttribute の拡張クラスを使用している場合は、ベンダーに連絡してください。エラー メッセージ: {0}、スタック トレース: {1} + Error in executing test. No result returned by extension. If using extension of TestMethodAttribute then please contact vendor. diff --git a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.ko.xlf b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.ko.xlf index 8ba4f31f0d..b3cb1d94dd 100644 --- a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.ko.xlf +++ b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.ko.xlf @@ -249,9 +249,10 @@ Error: {1} - Exception thrown while executing test. If using extension of TestMethodAttribute then please contact vendor. Error message: {0}, Stack trace: {1} - 테스트를 실행하는 동안 예외가 발생했습니다. TestMethodAttribute 확장을 사용하는 경우 공급업체에 문의하세요. 오류 메시지: {0}. 스택 추적: {1} - + An unhandled exception was thrown by the 'Execute' method. Please report this error to the author of the attribute '{0}'. +{1} + 테스트를 실행하는 동안 예외가 발생했습니다. TestMethodAttribute 확장을 사용하는 경우 공급업체에 문의하세요. 오류 메시지: {0}. 스택 추적: {1} + Error in executing test. No result returned by extension. If using extension of TestMethodAttribute then please contact vendor. diff --git a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.pl.xlf b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.pl.xlf index 64cabef2cc..58f9f28734 100644 --- a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.pl.xlf +++ b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.pl.xlf @@ -249,9 +249,10 @@ Błąd: {1} - Exception thrown while executing test. If using extension of TestMethodAttribute then please contact vendor. Error message: {0}, Stack trace: {1} - Zgłoszono wyjątek podczas wykonywania testu. W przypadku korzystania z rozszerzenia atrybutu TestMethodAttribute należy skontaktować się z dostawcą. Komunikat o błędzie: {0}, ślad stosu: {1} - + An unhandled exception was thrown by the 'Execute' method. Please report this error to the author of the attribute '{0}'. +{1} + Zgłoszono wyjątek podczas wykonywania testu. W przypadku korzystania z rozszerzenia atrybutu TestMethodAttribute należy skontaktować się z dostawcą. Komunikat o błędzie: {0}, ślad stosu: {1} + Error in executing test. No result returned by extension. If using extension of TestMethodAttribute then please contact vendor. diff --git a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.pt-BR.xlf b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.pt-BR.xlf index ba1846f2b2..64f35b2cc7 100644 --- a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.pt-BR.xlf +++ b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.pt-BR.xlf @@ -249,9 +249,10 @@ Erro: {1} - Exception thrown while executing test. If using extension of TestMethodAttribute then please contact vendor. Error message: {0}, Stack trace: {1} - Exceção lançada durante a execução do teste. Se estiver usando a extensão de TestMethodAttribute, entre em contato com o fornecedor. Mensagem de erro: {0}, rastreamento de pilha: {1} - + An unhandled exception was thrown by the 'Execute' method. Please report this error to the author of the attribute '{0}'. +{1} + Exceção lançada durante a execução do teste. Se estiver usando a extensão de TestMethodAttribute, entre em contato com o fornecedor. Mensagem de erro: {0}, rastreamento de pilha: {1} + Error in executing test. No result returned by extension. If using extension of TestMethodAttribute then please contact vendor. diff --git a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.ru.xlf b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.ru.xlf index e0288f0d0f..55fd26aba3 100644 --- a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.ru.xlf +++ b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.ru.xlf @@ -249,9 +249,10 @@ Error: {1} - Exception thrown while executing test. If using extension of TestMethodAttribute then please contact vendor. Error message: {0}, Stack trace: {1} - При выполнении теста возникло исключение. Если используется расширение атрибута TestMethodAttribute, обратитесь к поставщику. Сообщение об ошибке: {0}. Трассировка стека: {1} - + An unhandled exception was thrown by the 'Execute' method. Please report this error to the author of the attribute '{0}'. +{1} + При выполнении теста возникло исключение. Если используется расширение атрибута TestMethodAttribute, обратитесь к поставщику. Сообщение об ошибке: {0}. Трассировка стека: {1} + Error in executing test. No result returned by extension. If using extension of TestMethodAttribute then please contact vendor. diff --git a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.tr.xlf b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.tr.xlf index 4b00fbda3a..3676881ed5 100644 --- a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.tr.xlf +++ b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.tr.xlf @@ -249,9 +249,10 @@ Hata: {1} - Exception thrown while executing test. If using extension of TestMethodAttribute then please contact vendor. Error message: {0}, Stack trace: {1} - Test yürütülürken özel durum oluşturuldu. TestMethodAttribute uzantısını kullanıyorsanız lütfen satıcıyla iletişime geçin. Hata mesajı: {0}, Yığın izleme: {1} - + An unhandled exception was thrown by the 'Execute' method. Please report this error to the author of the attribute '{0}'. +{1} + Test yürütülürken özel durum oluşturuldu. TestMethodAttribute uzantısını kullanıyorsanız lütfen satıcıyla iletişime geçin. Hata mesajı: {0}, Yığın izleme: {1} + Error in executing test. No result returned by extension. If using extension of TestMethodAttribute then please contact vendor. diff --git a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.zh-Hans.xlf b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.zh-Hans.xlf index 6a3fcfd0a4..2112a436eb 100644 --- a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.zh-Hans.xlf +++ b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.zh-Hans.xlf @@ -249,9 +249,10 @@ Error: {1} - Exception thrown while executing test. If using extension of TestMethodAttribute then please contact vendor. Error message: {0}, Stack trace: {1} - 执行测试时引发了异常。如果使用的是扩展 TestMethodAttribute,请与供应商联系。错误消息: {0},堆栈跟踪: {1} - + An unhandled exception was thrown by the 'Execute' method. Please report this error to the author of the attribute '{0}'. +{1} + 执行测试时引发了异常。如果使用的是扩展 TestMethodAttribute,请与供应商联系。错误消息: {0},堆栈跟踪: {1} + Error in executing test. No result returned by extension. If using extension of TestMethodAttribute then please contact vendor. diff --git a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.zh-Hant.xlf b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.zh-Hant.xlf index c18f1e45a9..8d5983d93b 100644 --- a/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.zh-Hant.xlf +++ b/src/Adapter/MSTest.TestAdapter/Resources/xlf/Resource.zh-Hant.xlf @@ -249,9 +249,10 @@ Error: {1} - Exception thrown while executing test. If using extension of TestMethodAttribute then please contact vendor. Error message: {0}, Stack trace: {1} - 執行測試時擲回例外狀況。如果您使用 TestMethodAttribute 的擴充功能,請連絡廠商。錯誤訊息: {0},堆疊追蹤: {1} - + An unhandled exception was thrown by the 'Execute' method. Please report this error to the author of the attribute '{0}'. +{1} + 執行測試時擲回例外狀況。如果您使用 TestMethodAttribute 的擴充功能,請連絡廠商。錯誤訊息: {0},堆疊追蹤: {1} + Error in executing test. No result returned by extension. If using extension of TestMethodAttribute then please contact vendor.