2

When running tests on our build server a test with an extra attribute gets ignored by the test runner. This is the test:

[Fact]
[UseEmptyDatabase]
public void SutDoesWhatItNeedsToDo()
{
    // test logic
}

The custom attribute DROP CREATEs a local database.

Other information:

  • Running the tests from the console picks up this test on my development server
  • Running the tests from the console (and the TFS build) on the build server does not pick up this test
  • Installing the xunit.runner.visualstudio nuget package does nothing
  • Pointing the test runner to the bin folder with xunit test adapters (from the nuget package) does nothing
  • On my dev server I have TestDriven.NET installed
  • Adding an extra (dummy) test in this class with only a [Fact] attribute gets picked up on the build server (the class is public also)
  • The [UseEmptyDatabase] should fail when running since it would not be able to actually restore a database (but it doesn't get that far)

Does anyone have any idea where to look next? I want to avoid re-writing the attribute setup to something within the scope of the test.

Aage
  • 5,932
  • 2
  • 32
  • 57

0 Answers0