-
Notifications
You must be signed in to change notification settings - Fork 311
Description
When developing changes or investigating bugs in SqlClient it is important to be able to run the tests. This can be done from the commandline using complex syntax but most people prefer to be able to use the tests from inside visual studio. If try to run tests inside visual studio you will quickly discover that all tests run regardless of their conditions which means that even on a clean working master build you will wait a long time for test failures and have to sort through which failures are expected because they should not have been run.
A simple example is ConnectivityTest.ConnectionAliasTest
. This is defined as:
[PlatformSpecific(TestPlatforms.Windows)]
[ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup), nameof(DataTestUtility.IsSQLAliasSetup))]
public static void ConnectionAliasTest()
The test should not be executed unless it the IsSQLAliasSetup function returns true. I have not configured the alias, that function never returns true. The test is executed anyway.
I'd like to be able to run tests from inside visual studio and have any applied conditions correctly validated preventing tests that cannot succeed from being executed. Being able to evaluate whether the change i'm working on is breaking other parts of the library will enable much quicker testing allowing less reliance on the, no longer available to contributors, CI.