Apply structured assertion messages (RFC 012) to Assert.Fail / Assert.Inconclusive #8296
Build Windows Debug failed
Annotations
Check failure on line 175 in src/TestFramework/TestFramework/Assertions/Assert.IsTrue.cs
azure-pipelines / microsoft.testfx (Build Windows Debug)
src/TestFramework/TestFramework/Assertions/Assert.IsTrue.cs#L175
src/TestFramework/TestFramework/Assertions/Assert.IsTrue.cs(175,1): error : [TestDifferentGenericMethodTestCases] [net11.0] Assertion failed. Expected condition to be true.
Expression 'AssertOutputMatchesRegex' failed for member 'TestDifferentGenericMethodTestCases' at line 21 of file '/_/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/GenericTestMethodTests.cs'. Output of the test host is:
Command: D:\a\_work\1\s\artifacts\tmp\Debug\testsuite\HjcBC\GenericTestMethodTests\bin\Release\net10.0\GenericTestMethodTests.exe
====================
ExitCode: 2
====================
StandardOutput:
MSTest v4.3.0-ci (UTC 5/16/2026) [win-x64 - .NET 10.0.8]
failed AMethodWithBadConstraints (0) (43ms)
GenericArguments[0], 'System.Int32', on 'Void AMethodWithBadConstraints[T](T)' violates the constraint of type 'T'.
at System.RuntimeType.ValidateGenericArguments(MemberInfo definition, RuntimeType[] genericArguments, Exception e)
at System.Reflection.RuntimeMethodInfo.MakeGenericMethod(Type[] methodInstantiation)
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Extensions.MethodInfoExtensions.ConstructGenericMethod(MethodInfo methodInfo, Object[] arguments) in /_/src/Adapter/MSTestAdapter.PlatformServices/Extensions/MethodInfoExtensions.cs:305
failed NonParameterizedTestMethod (1ms)
The generic test method 'NonParameterizedTestMethod' doesn't have arguments, so the generic parameter cannot be inferred.
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Extensions.MethodInfoExtensions.ConstructGenericMethod(MethodInfo methodInfo, Object[] arguments) in /_/src/Adapter/MSTestAdapter.PlatformServices/Extensions/MethodInfoExtensions.cs:252
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Extensions.MethodInfoExtensions.GetInvokeResultAsync(MethodInfo methodInfo, Object classInstance, Object[] arguments) in /_/src/Adapter/MSTestAdapter.PlatformServices/Extensions/MethodInfoExtensions.cs:163
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodInfo.ExecuteInternalAsync(Object[] arguments, CancellationTokenSource timeoutTokenSource) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodInfo.Execution.cs:126
failed ParameterizedMethodSimple (1) (7ms)
Assertion failed.
Test method 'ParameterizedMethodSimple' did run with parameter '1' and type 'System.Byte'.
at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Fail(String message) in /_/src/TestFramework/TestFramework/Assertions/Assert.Fail.cs:30
at TestClass.ParameterizedMethodSimple[T](T parameter) in D:\a\_work\1\s\artifacts\tmp\Debug\testsuite\HjcBC\GenericTestMethodTests\UnitTest1.cs:23
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
failed ParameterizedMethodSimple (2) (0ms)
Assertion failed.
Test method 'ParameterizedMethodSimple' did run with parameter '2' and type 'System.Int32'.
at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Fail(String message) in /_/src/TestFramework/TestFramework/Assertions/Assert.Fail.cs:30
at TestClass.ParameterizedMethodSimple[T](T parameter) in D:\a\_work\1\s\artifacts\tmp\Debug\testsuite\HjcBC\GenericTestMethodTests\UnitTest1.cs:23
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
failed ParameterizedMethodSimple ("Hello world") (0ms)
Assertion failed.
Test method 'ParameterizedMethodSimple' did run with parameter 'Hello world' and type 'System.String'.
at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Fail(String message) in /_/src/TestFramework/TestFramework/Assertions/Assert.Fail.cs:30
at TestClass.ParameterizedMethodSimple[T](T parameter) in D:\a\_work\1\s\artifacts\tmp\Debug\testsuite\HjcBC\GenericTestMethodTests\UnitTest1.cs:23
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
failed ParameterizedMethodSimple (null) (1ms)
Test method TestClass.ParameterizedMethodSimple threw exception:
System.InvalidOperationException: The type of the generic parameter 'T' could not be inferred.
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Extensions.MethodInfoExtensions.ConstructGenericMethod(MethodInfo methodInfo, Object[] arguments) in /_/src/Adapter/MSTestAdapter.PlatformServices/Extensions/MethodInfoExtensions.cs:299
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Extensions.MethodInfoExtensions.GetInvokeResultAsync(MethodInfo methodInfo, Object classInstance, Object[] arguments) in /_/src/Adapter/MSTestAdapter.PlatformServices/Extensions/MethodInfoExtensions.cs:163
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodInfo.ExecuteInternalAsync(Object[] arguments, CancellationTokenSource timeoutTokenSource) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodInfo.Execution.cs:126
failed ParameterizedMethodTwoGenericParametersAndFourMethodParameters (1,"Hello world",2,3) (0ms)
Test method TestClass.ParameterizedMethodTwoGenericParametersAndFourMethodParameters threw exception:
System.InvalidOperationException: Found two conflicting types for generic parameter 'T2'. The conflicting types are 'System.Byte' and 'System.Int32'.
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Extensions.MethodInfoExtensions.ConstructGenericMethod(MethodInfo methodInfo, Object[] arguments) in /_/src/Adapter/MSTestAdapter.PlatformServices/Extensions/MethodInfoExtensions.cs:288
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Extensions.MethodInfoExtensions.GetInvokeResultAsync(MethodInfo methodInfo, Object classInstance, Object[] arguments) in /_/src/Adapter/MSTestAdapter.PlatformServices/Extensions/MethodInfoExtensions.cs:163
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodInfo.ExecuteInternalAsync(Object[] arguments, CancellationTokenSource timeoutTokenSource) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodInfo.Execution.cs:126
failed ParameterizedMethodTwoGenericParametersAndFourMethodParameters (null,"Hello world","Hello again",3) (0ms)
Assertion failed.
Test method 'ParameterizedMethodTwoGenericParametersAndFourMethodParameters' did run with parameters '<null>', 'Hello world', 'Hello again', '3' and generic types 'System.Int32', 'System.String'.
at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Fail(String message) in /_/src/TestFramework/TestFramework/Assertions/Assert.Fail.cs:30
at TestClass.ParameterizedMethodTwoGenericParametersAndFourMethodParameters[T1,T2](T2 p1, String p2, T2 p3, T1 p4) in D:\a\_work\1\s\artifacts\tmp\Debug\testsuite\HjcBC\GenericTestMethodTests\UnitTest1.cs:31
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
failed ParameterizedMethodTwoGenericParametersAndFourMethodParameters ("Hello hello","Hello world",null,null) (0ms)
Test method TestClass.ParameterizedMethodTwoGenericParametersAndFourMethodParameters threw exception:
System.InvalidOperationException: The type of the generic parameter 'T1' could not be inferred.
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Extensions.MethodInfoExtensions.ConstructGenericMethod(MethodInfo methodInfo, Object[] arguments) in /_/src/Adapter/MSTestAdapter.PlatformServices/Extensions/MethodInfoExtensions.cs:299
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Extensions.MethodInfoExtensions.GetInvokeResultAsync(MethodInfo methodInfo, Object classInstance, Object[] arguments) in /_/src/Adapter/MSTestAdapter.PlatformServices/Extensions/MethodInfoExtensions.cs:163
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodInfo.ExecuteInternalAsync(Object[] arguments, CancellationTokenSource timeoutTokenSource) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodInfo.Execution.cs:126
failed ParameterizedMethodTwoGenericParametersAndFourMethodParameters (null,null,null,null) (0ms)
Test method TestClass.ParameterizedMethodTwoGenericParametersAndFourMethodParameters threw exception:
System.InvalidOperationException: The type of the generic parameter 'T1' could not be inferred.
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Extensions.MethodInfoExtensions.ConstructGenericMethod(MethodInfo methodInfo, Object[] arguments) in /_/src/Adapter/MSTestAdapter.PlatformServices/Extensions/MethodInfoExtensions.cs:299
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Extensions.MethodInfoExtensions.GetInvokeResultAsync(MethodInfo methodInfo, Object classInstance, Object[] arguments) in /_/src/Adapter/MSTestAdapter.PlatformServices/Extensions/MethodInfoExtensions.cs:163
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodInfo.ExecuteInternalAsync(Object[] arguments, CancellationTokenSource timeoutTokenSource) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodInfo.Execution.cs:126
failed ParameterizedMethodSimpleParams (1) (0ms)
Cannot create an instance of T[] because Type.ContainsGenericParameters is true.
at System.RuntimeType.CreateInstanceCheckThis()
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
at System.Activator.CreateInstance(Type type, Object[] args)
at Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.ReflectionOperations.CreateInstance(Type type, Object[] parameters) in /_/src/Adapter/MSTestAdapter.PlatformServices/Services/ReflectionOperations.cs:87
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodInfo.ResolveArguments(Object[] arguments) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodInfo.ArgumentResolution.cs:55
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodInfo.SetArguments(Object[] arguments) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodInfo.ArgumentResolution.cs:9
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodRunner.ExecuteTestWithDataSourceAsync(ITestDataSource testDataSource, Object[] data, Boolean actualDataAlreadyHandledDuringDiscovery) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodRunner.cs:355
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodRunner.RunTestMethodAsync() in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodRunner.cs:126
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodRunner.ExecuteAsync(String initializationLogs, String initializationErrorLogs, String initializationTrace, String initializationTestContextMessages) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodRunner.cs:72
failed ParameterizedMethodSimpleParams (1,2) (0ms)
Cannot create an instance of T[] because Type.ContainsGenericParameters is true.
at System.RuntimeType.CreateInstanceCheckThis()
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
at System.Activator.CreateInstance(Type type, Object[] args)
at Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.ReflectionOperations.CreateInstance(Type type, Object[] parameters) in /_/src/Adapter/MSTestAdapter.PlatformServices/Services/ReflectionOperations.cs:87
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodInfo.ResolveArguments(Object[] arguments) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodInfo.ArgumentResolution.cs:55
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodInfo.SetArguments(Object[] arguments) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodInfo.ArgumentResolution.cs:9
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodRunner.ExecuteTestWithDataSourceAsync(ITestDataSource testDataSource, Object[] data, Boolean actualDataAlreadyHandledDuringDiscovery) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodRunner.cs:355
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodRunner.RunTestMethodAsync() in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodRunner.cs:126
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodRunner.ExecuteAsync(String initializationLogs, String initializationErrorLogs, String initializationTrace, String initializationTestContextMessages) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodRunner.cs:72
failed ParameterizedMethodSimpleParams ("Hello world") (0ms)
Cannot create an instance of T[] because Type.ContainsGenericParameters is true.
at System.RuntimeType.CreateInstanceCheckThis()
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
at System.Activator.CreateInstance(Type type, Object[] args)
at Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.ReflectionOperations.CreateInstance(Type type, Object[] parameters) in /_/src/Adapter/MSTestAdapter.PlatformServices/Services/ReflectionOperations.cs:87
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodInfo.ResolveArguments(Object[] arguments) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodInfo.ArgumentResolution.cs:55
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodInfo.SetArguments(Object[] arguments) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodInfo.ArgumentResolution.cs:9
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodRunner.ExecuteTestWithDataSourceAsync(ITestDataSource testDataSource, Object[] data, Boolean actualDataAlreadyHandledDuringDiscovery) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodRunner.cs:355
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodRunner.RunTestMethodAsync() in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodRunner.cs:126
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodRunner.ExecuteAsync(String initializationLogs, String initializationErrorLogs, String initializationTrace, String initializationTestContextMessages) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodRunner.cs:72
failed ParameterizedMethodSimpleParams (null) (0ms)
Cannot create an instance of T[] because Type.ContainsGenericParameters is true.
at System.RuntimeType.CreateInstanceCheckThis()
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
at System.Activator.CreateInstance(Type type, Object[] args)
at Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.ReflectionOperations.CreateInstance(Type type, Object[] parameters) in /_/src/Adapter/MSTestAdapter.PlatformServices/Services/ReflectionOperations.cs:87
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodInfo.ResolveArguments(Object[] arguments) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodInfo.ArgumentResolution.cs:55
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodInfo.SetArguments(Object[] arguments) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodInfo.ArgumentResolution.cs:9
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodRunner.ExecuteTestWithDataSourceAsync(ITestDataSource testDataSource, Object[] data, Boolean actualDataAlreadyHandledDuringDiscovery) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodRunner.cs:355
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodRunner.RunTestMethodAsync() in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodRunner.cs:126
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodRunner.ExecuteAsync(String initializationLogs, String initializationErrorLogs, String initializationTrace, String initializationTestContextMessages) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodRunner.cs:72
failed ParameterizedMethodSimpleParams (null,"Hello world") (0ms)
Cannot create an instance of T[] because Type.ContainsGenericParameters is true.
at System.RuntimeType.CreateInstanceCheckThis()
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
at System.Activator.CreateInstance(Type type, Object[] args)
at Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.ReflectionOperations.CreateInstance(Type type, Object[] parameters) in /_/src/Adapter/MSTestAdapter.PlatformServices/Services/ReflectionOperations.cs:87
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodInfo.ResolveArguments(Object[] arguments) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodInfo.ArgumentResolution.cs:55
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodInfo.SetArguments(Object[] arguments) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodInfo.ArgumentResolution.cs:9
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodRunner.ExecuteTestWithDataSourceAsync(ITestDataSource testDataSource, Object[] data, Boolean actualDataAlreadyHandledDuringDiscovery) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodRunner.cs:355
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodRunner.RunTestMethodAsync() in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodRunner.cs:126
at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodRunner.ExecuteAsync(String initializationLogs, String initializationErrorLogs, String initializationTrace, String initializationTestContextMessages) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodRunner.cs:72
failed ParameterizedMethodWithNestedGeneric (System.Collections.Generic.List`1[System.String],System.Collections.Generic.List`1[System.String]) (1ms)
Assertion failed.
Test method 'ParameterizedMethodWithNestedGeneric' did run with first list [Hello, World] and second list [Unit, Testing]
at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Fail(String message) in /_/src/TestFramework/TestFramework/Assertions/Assert.Fail.cs:30
at TestClass.ParameterizedMethodWithNestedGeneric[T](List`1 a, List`1 b) in D:\a\_work\1\s\artifacts\tmp\Debug\testsuite\HjcBC\GenericTestMethodTests\UnitTest1.cs:48
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
failed ParameterizedMethodWithNestedGeneric (System.Collections.Generic.List`1[System.Int32],System.Collections.Generic.List`1[System.Int32]) (0ms)
Assertion failed.
Test method 'ParameterizedMethodWithNestedGeneric' did run with first list [0, 1] and second list [2, 3]
at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Fail(String message) in /_/src/TestFramework/TestFramework/Assertions/Assert.Fail.cs:30
at TestClass.ParameterizedMethodWithNestedGeneric[T](List`1 a, List`1 b) in D:\a\_work\1\s\artifacts\tmp\Debug\testsuite\HjcBC\GenericTestMethodTests\UnitTest1.cs:48
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
Test run summary: Failed! - D:\a\_work\1\s\artifacts\tmp\Debug\testsuite\HjcBC\GenericTestMethodTests\bin\Release\net10.0\GenericTestMethodTests.dll (net10.0|x64)
total: 17
failed: 17
succeeded: 0
skipped: 0
duration: 400ms
====================
StandardError:
actual: false
Assert.IsTrue(Regex.IsMatch(testHostResult.StandardOutput, pattern, regexOptions))
Check failure on line 29 in test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RetryTests.cs
azure-pipelines / microsoft.testfx (Build Windows Debug)
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RetryTests.cs#L29
test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RetryTests.cs(29,1): error : [BasicRetryScenarioTest] [net11.0] Assert.Contains failed. String 'MSTest v4.3.0-ci (UTC 5/16/2026) [win-x64 - .NET 10.0.8]
TestMethod1 executed 1 time.
TestMethod2 executed 2 times.
TestMethod3 executed 3 times.
TestMethod4 executed 4 times.
TestMethod5 executed 4 times.
failed TestMethod5 (0ms)
Assertion failed.
Failing TestMethod4. Attempts: 4 (from TestContext: 4)
at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Fail(String message) in /_/src/TestFramework/TestFramework/Assertions/Assert.Fail.cs:30
at UnitTest1.TestMethod5() in D:\a\_work\1\s\artifacts\tmp\Debug\testsuite\mpEtN\RetryTests\UnitTest1.cs:57
at InvokeStub_UnitTest1.TestMethod5(Object, Object, IntPtr*)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Test run summary: Failed! - D:\a\_work\1\s\artifacts\tmp\Debug\testsuite\mpEtN\RetryTests\bin\Release\net10.0\RetryTests.dll (net10.0|x64)
total: 5
failed: 1
succeeded: 4
skipped: 0
duration: 405ms' does not contain string 'Assertion failed.
Failing TestMethod4. Attempts: 4 (from TestContext: 4)'. 'substring' expression: 'value', 'value' expression: 'testHostResult.StandardOutput'. Expression 'AssertOutputContains' failed for member 'BasicRetryScenarioTest' at line 29 of file '/_/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RetryTests.cs'. Output of the test host is:
Command: D:\a\_work\1\s\artifacts\tmp\Debug\testsuite\mpEtN\RetryTests\bin\Release\net10.0\RetryTests.exe --settings my.runsettings
====================
ExitCode: 2
====================
StandardOutput:
MSTest v4.3.0-ci (UTC 5/16/2026) [win-x64 - .NET 10.0.8]
TestMethod1 executed 1 time.
TestMethod2 executed 2 times.
TestMethod3 executed 3 times.
TestMethod4 executed 4 times.
TestMethod5 executed 4 times.
failed TestMethod5 (0ms)
Assertion failed.
Failing TestMethod4. Attempts: 4 (from TestContext: 4)
at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Fail(String message) in /_/src/TestFramework/TestFramework/Assertions/Assert.Fail.cs:30
at UnitTest1.TestMethod5() in D:\a\_work\1\s\artifacts\tmp\Debug\testsuite\mpEtN\RetryTests\UnitTest1.cs:57
at InvokeStub_UnitTest1.TestMethod5(Object, Object, IntPtr*)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Test run summary: Failed! - D:\a\_work\1\s\artifacts\tmp\Debug\testsuite\mpEtN\RetryTests\bin\Release\net10.0\RetryTests.dll (net10.0|x64)
total: 5
failed: 1
succeeded: 4
skipped: 0
duration: 405ms
====================
StandardError:
.
Check failure on line 175 in src/TestFramework/TestFramework/Assertions/Assert.IsTrue.cs
azure-pipelines / microsoft.testfx (Build Windows Debug)
src/TestFramework/TestFramework/Assertions/Assert.IsTrue.cs#L175
src/TestFramework/TestFramework/Assertions/Assert.IsTrue.cs(175,1): error : [AssertFailIsHardFailure_ThrowsImmediately] [net11.0] Assertion failed. Expected condition to be true.
Expression 'AssertOutputMatchesRegex' failed for member 'AssertFailIsHardFailure_ThrowsImmediately' at line 56 of file '/_/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/SoftAssertionTests.cs'. Output of the test host is:
Command: D:\a\_work\1\s\artifacts\tmp\Debug\testsuite\UmEaU\SoftAssertionTests\bin\Release\net10.0\SoftAssertionTests.exe --filter AssertFailIsHardFailure
====================
ExitCode: 2
====================
StandardOutput:
MSTest v4.3.0-ci (UTC 5/16/2026) [win-x64 - .NET 10.0.8]
failed AssertFailIsHardFailure (55ms)
Assertion failed.
hard failure
at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Fail(String message) in /_/src/TestFramework/TestFramework/Assertions/Assert.Fail.cs:30
at UnitTest1.AssertFailIsHardFailure() in D:\a\_work\1\s\artifacts\tmp\Debug\testsuite\UmEaU\SoftAssertionTests\UnitTest1.cs:41
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Test run summary: Failed! - D:\a\_work\1\s\artifacts\tmp\Debug\testsuite\UmEaU\SoftAssertionTests\bin\Release\net10.0\SoftAssertionTests.dll (net10.0|x64)
total: 1
failed: 1
succeeded: 0
skipped: 0
duration: 517ms
====================
StandardError:
actual: false
Assert.IsTrue(Regex.IsMatch(testHostResult.StandardOutput, pattern))
Check failure on line 28994 in Build log
azure-pipelines / microsoft.testfx (Build Windows Debug)
Build log #L28994
Cmd.exe exited with code '2'.