Test Case Exception |
Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException was unhandled by user code
Test case does not run to the end.
Example of exception message:
Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException was unhandled by user code HResult=-2146233088 Message=Fehler bei "Assert.Fail". Source=Microsoft.VisualStudio.QualityTools.UnitTestFramework StackTrace: bei Microsoft.VisualStudio.TestTools.UnitTesting.Assert.HandleFailure(String assertionName, String message) bei Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Fail(String message) bei SIC.Test.Helper.Log.Result()
Eventually a command will be used that is not stable in the test environment.
For example: The DateTime.Now.ToString() command triggers this exception.
Check the test case for these commands and replace them.
For example: DateTime.Now.ToString() replace with this.Log.GetTimeStamp