We use TeamCity as our CI server, and I\'ve just started seeing \"TestFixtureSetUp Failed\"
in the test failure window.
Any idea how I go about debugging th
In case it can help someone: You can catch the exception and write it in the console on the TearDown
Something like :
[SetUpFixture]
public class BaseTest
{
private Exception caughtException = null;
[SetUp]
public void RunBeforeAnyTests()
{
try
{
throw new Exception("On purpose");
}
catch (Exception ex)
{
caughtException = ex;
}
}
[TearDown]
public void RunAfterAnyTests()
{
if (caughtException != null)
{
Console.WriteLine(string.Format("TestFixtureSetUp failed in {0} - {1}", this.GetType(), caughtException.Message));
}
}
}
And the result will be :
TestFixtureSetUp failed in IntegratedTests.Services.BaseTest - On purpose