Welcome to the Bot Framework SDK for .NET repository, which is the home for the libraries and packages that enable developers to build sophisticated bot applications using .NET.
When we refactored our tests to xUnit we moved some expensive logic to static constructors (e.g.: see SchemaMergeTests.cs.
VS Test Explorer executes these static constructors when attempting to enumerate the tests which recreates files and also starts the ComsbosDB emulator resulting in slow IDE performance.
For the case of tests.schema and tests.uischema, this may also change those files and the output may be different than what we have in git if you don't have the latest CLI version.
To Reproduce
Steps to reproduce the behavior:
Open the solution in visual studio.
Open the test explorer window
While the tests are being discovered, you'll see CosmosDB starting up and you'll notice that tests.schema and tests.uischema are being updated (sometimes with different results based on the version of the CLI you are running)
Expected behavior
I would expect the schemas would only be updated if I am running tests related to schemas and that the CosmosDB and Azure Storage emulators would run only if I am running tests related to them.
Screenshots
If applicable, add screenshots to help explain your problem.
Version
4.10.x.
Describe the bug
When we refactored our tests to xUnit we moved some expensive logic to static constructors (e.g.: see SchemaMergeTests.cs.
VS Test Explorer executes these static constructors when attempting to enumerate the tests which recreates files and also starts the ComsbosDB emulator resulting in slow IDE performance.
For the case of tests.schema and tests.uischema, this may also change those files and the output may be different than what we have in git if you don't have the latest CLI version.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect the schemas would only be updated if I am running tests related to schemas and that the CosmosDB and Azure Storage emulators would run only if I am running tests related to them.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
We should probably remove these static constructors and refactor the tests to use Class Fixtures or Collection Fixtures
See also XUnit comparison to MS Tests for more info the alternative for ClassInitialize