Avoid more overhead of assembly initialize #4349
Build #20241213.38 had test failures
Details
- Failed: 4 (0.01%)
- Passed: 28,537 (99.99%)
- Other: 0 (0.00%)
- Total: 28,541
- 93169 of 145973 blocks covered (63.83%)
- 65418 of 103618 lines covered (63.13%)
Annotations
Check failure on line 0 in VSTest
azure-pipelines / microsoft.testfx
VSTest#L0
VSTest(0,0): error : (NETCORE_ENGINEERING_TELEMETRY=Build) Tests failed: D:\a\_work\1\s\artifacts\TestResults\Debug\MSTest.VstestConsoleWrapper.IntegrationTests_net462_x64.html [net462|x64]
Check failure on line 0 in VSTest
azure-pipelines / microsoft.testfx
VSTest#L0
VSTest(0,0): error : (NETCORE_ENGINEERING_TELEMETRY=Build) Tests failed: D:\a\_work\1\s\artifacts\TestResults\Release\MSTest.VstestConsoleWrapper.IntegrationTests_net462_x64.html [net462|x64]
azure-pipelines / microsoft.testfx
MSTest.VstestConsoleWrapper.IntegrationTests.FixturesTests.AssemblyInitialize_Fails_TestMethod_Class_Skipped
Error during test: Expected collection to contain 1 item(s), but found 4: {Test Passed, [AssemblyCleanup] AssemblyCleanup Passed, [ClassInitialize] ClassInitialize(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext) Passed, [ClassCleanup] ClassCleanup Passed}.
Raw output
at FluentAssertions.Execution.FallbackTestFramework.Throw(String message)
at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
at FluentAssertions.Collections.GenericCollectionAssertions`3.HaveCount(Int32 expected, String because, Object[] becauseArgs)
at Microsoft.MSTestV2.CLIAutomation.CLITestBase.ValidatePassedTestsCount(Int32 expectedPassedTestsCount) in /_/test/Utilities/Automation.CLI/CLITestBase.e2e.cs:line 139
at Microsoft.MSTestV2.CLIAutomation.CLITestBase.ValidatePassedTests(String[] passedTests) in /_/test/Utilities/Automation.CLI/CLITestBase.e2e.cs:line 133
at MSTest.VstestConsoleWrapper.IntegrationTests.FixturesTests.AssemblyInitialize_Fails_TestMethod_Class_Skipped() in /_/test/IntegrationTests/MSTest.VstestConsoleWrapper.IntegrationTests/FixturesTests.cs:line 63
azure-pipelines / microsoft.testfx
MSTest.VstestConsoleWrapper.IntegrationTests.FixturesTests.ClassInitialize_OnlyFails_ClassInitialize
Error during test: Expected collection to contain 3 item(s), but found 2: {PassingTest Failed
Message: Class Initialization method FixturesTestProject1.UnitTest1.ClassInitialize threw exception. Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException: Assert.IsTrue failed. .
StackTrace:
at FixturesTestProject1.UnitTest1.ClassInitialize(TestContext testContext) in /_/test/IntegrationTests/TestAssets/FixturesTestProject/UnitTest1.cs:line 32
, [ClassInitialize] ClassInitialize(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext) Failed
Message: }.
Raw output
at FluentAssertions.Execution.FallbackTestFramework.Throw(String message)
at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
at FluentAssertions.Collections.GenericCollectionAssertions`3.HaveCount(Int32 expected, String because, Object[] becauseArgs)
at Microsoft.MSTestV2.CLIAutomation.CLITestBase.ValidateFailedTestsCount(Int32 expectedFailedTestsCount) in /_/test/Utilities/Automation.CLI/CLITestBase.e2e.cs:line 176
at Microsoft.MSTestV2.CLIAutomation.CLITestBase.ValidateFailedTests(Boolean validateStackTraceInfo, String[] failedTests) in /_/test/Utilities/Automation.CLI/CLITestBase.e2e.cs:line 166
at MSTest.VstestConsoleWrapper.IntegrationTests.FixturesTests.ClassInitialize_OnlyFails_ClassInitialize() in /_/test/IntegrationTests/MSTest.VstestConsoleWrapper.IntegrationTests/FixturesTests.cs:line 83
azure-pipelines / microsoft.testfx
MSTest.VstestConsoleWrapper.IntegrationTests.FixturesTests.ClassInitialize_OnlyFails_ClassInitialize
Error during test: Expected collection to contain 3 item(s), but found 2: {PassingTest Failed
Message: Class Initialization method FixturesTestProject1.UnitTest1.ClassInitialize threw exception. Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException: Assert.IsTrue failed. .
StackTrace:
at FixturesTestProject1.UnitTest1.ClassInitialize(TestContext testContext) in /_/test/IntegrationTests/TestAssets/FixturesTestProject/UnitTest1.cs:line 33
, [ClassInitialize] ClassInitialize(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext) Failed
Message: }.
Raw output
at FluentAssertions.Execution.FallbackTestFramework.Throw(String message)
at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
at FluentAssertions.Collections.GenericCollectionAssertions`3.HaveCount(Int32 expected, String because, Object[] becauseArgs)
at MSTest.VstestConsoleWrapper.IntegrationTests.FixturesTests.ClassInitialize_OnlyFails_ClassInitialize() in /_/test/IntegrationTests/MSTest.VstestConsoleWrapper.IntegrationTests/FixturesTests.cs:line 83
azure-pipelines / microsoft.testfx
MSTest.VstestConsoleWrapper.IntegrationTests.FixturesTests.AssemblyInitialize_Fails_TestMethod_Class_Skipped
Error during test: Expected collection to contain 1 item(s), but found 4: {Test Passed, [AssemblyCleanup] AssemblyCleanup Passed, [ClassInitialize] ClassInitialize(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext) Passed, [ClassCleanup] ClassCleanup Passed}.
Raw output
at FluentAssertions.Execution.FallbackTestFramework.Throw(String message)
at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
at FluentAssertions.Collections.GenericCollectionAssertions`3.HaveCount(Int32 expected, String because, Object[] becauseArgs)
at MSTest.VstestConsoleWrapper.IntegrationTests.FixturesTests.AssemblyInitialize_Fails_TestMethod_Class_Skipped() in /_/test/IntegrationTests/MSTest.VstestConsoleWrapper.IntegrationTests/FixturesTests.cs:line 63