Test helper classes should be in (a) separate project(s)
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 21m
- Merged PRs (30d)
- 79
Description
**Is your feature request related to a problem? Please describe.**
The `dotnet test` command can take a while to run, especially in CI. This is caused in part by there being a lot of tests, but it is also partly due to the way our test projects depend on one another. `dotnet test` will operate on a .sln by performing a topological sort, then building and executing the tests for each project whose dependencies have already been processed.
For example, `Bicep.LangServer.IntegrationTests` depends on helper classes from `Bicep.Core.UnitTests`, and `Bicep.LangServer.UnitTests` depends on helper classes from `Bicep.LangServer.IntegrationTests`, so a `dotnet test` run currently must take at least as long as it takes to build and test `Bicep.Core.Units`, `Bicep.LangServer.IntegrationTests`, and then `Bicep.LangServer.UnitTests` _sequentially_.
**Describe the solution you'd like**
If the helper classes were moved to a non-test project, `Bicep.Core.Units`, `Bicep.LangServer.IntegrationTests`, and then `Bicep.LangServer.UnitTests` could be executed in parallel rather than one by one by `dotnet test`.
Contributor guide
Research direction
Start by mapping the dependencies among Bicep.Core.UnitTests, Bicep.LangServer.IntegrationTests, and Bicep.LangServer.UnitTests, focusing on which helper classes cross project boundaries. Determine how to place those helpers in non-test project(s), then verify that dotnet test can execute the three test projects in parallel rather than sequentially.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system, testing-qa
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100