-
Notifications
You must be signed in to change notification settings - Fork 725
Description
The UnitTests project takes upwards of 5 minutes to complete. We run it across 3 platforms as part of CI/CD and as a result makes workflows way too slow. We must make it faster.
UnitTests is intended just have tests that can't be parallelized because the tests in must rely on static/global state etc...
However, it contains a large number of poorly coded unit tests:
- Some combine the testing of multiple things at once
- Some duplicate other existing unit tests (in
UnitTestsandUnitTests.Parallelizable) - Some use
[AutoInitShutdown],Application, and/orConfigurtionManagerincorrectly. Using these makes tests not be able to be run concurrently. - Some are unit tests, but poorly written such that one test tries to test multiple things.
- Some are not actually unit tests, as they cover large areas of functionality, not discrete units of functionality. They are actually Integration Tests. For this Issue, we are NOT focusing on these.
To address this Issue we need to
-
Identify the tests that are the biggest causes of poor performance of the project when run.
-
Analyze all tests in
UnitTestsandUnitTests.Paralleizableand categorize them according to these buckets:a) Unit tests that must remain non-paralleizable,
b) unit tests that combine multiple unit tests and should be broken apart (and potentially moved toUnitTests.Parallizable,
c) unit tests that are duplicates,
d) unit tests that are actually integration tests. -
Port, rewrite, refactor tests in buckets b and c into
UnitTests.Parallizablethat will have a big increase in test speed
I'm assigning this Issue to CoPilot to get it done. This should be a good set of work an AI can do.
Instructions to CoPilot:
- Follow the coding standards of the project.
- Follow the .NET unit test guidance https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-best-practices
- Avoid using additional libraries or tools beyond what the project already uses. if you believe there is a far better tool, suggest it.
- Study deeply the existing tests in
UnitTests.Paralliazableto understand what can and can't be parrallized befor you begin. Also study the code for[AutoInitShutdown]and[SetupFakeDriver] - Follow the guidance in the parallelizable unit tests project's readme.md.
Metadata
Metadata
Labels
Type
Projects
Status