Based on some testing, it appears that xunit does not support using a class that implements ICollectionFixture<FixtureType> from another assembly. This seems reasonable, because test collections are confined to a single assembly; and supporting discovery in any available assembly will almost surely have an undesirable perf impact.
Given this limitation, there will be cases where the collection fixture class is duplicated in multiple test projects - same signature, possibly same name, different namespace. In order to avoid conflicts, it would be nice if internal collection fixture classes could be used (they cannot currently be used). This seems consistent with the definition of a test collection to always be within an assembly. Eg:
[CollectionDefinition("MyTestCollection")]
internal class MyTests() {
....
Alternatively, it would be nice to link to the collection definition type from the test class (instead of using string matching), eg:
[CollectionDefinition(typeof(DatabaseIntegrationTestCollection))]
public class MyTests() {
....
which would presumably allow using test collection fixture definitions from other assemblies.
Based on some testing, it appears that xunit does not support using a class that implements
ICollectionFixture<FixtureType>from another assembly. This seems reasonable, because test collections are confined to a single assembly; and supporting discovery in any available assembly will almost surely have an undesirable perf impact.Given this limitation, there will be cases where the collection fixture class is duplicated in multiple test projects - same signature, possibly same name, different namespace. In order to avoid conflicts, it would be nice if internal collection fixture classes could be used (they cannot currently be used). This seems consistent with the definition of a test collection to always be within an assembly. Eg:
Alternatively, it would be nice to link to the collection definition type from the test class (instead of using string matching), eg:
which would presumably allow using test collection fixture definitions from other assemblies.