Benchmark and improve shared `RequestDelegateCreation` test infrastructure
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
The RequestDelegateGenerator uses Roslyn's testing APIs to validate the compile time and runtime behavior of RDG-enabled apps in tests.
As part of the work to share tests between the two implementations, we migrated RDF tests to use the same infrastructure.
The benefit of shared testing infrastructure comes with some downsides as we migrate more tests to the shared infrastructure. Some ideas that we can consider to improve test perf:
- Use a single shared compilation for all unit tests with a unique source file per test
- Remove unneeded baseline asserts to avoid the read/write of baseline text files
- Move the loading of symbols for generated code behind a developer enabled flag like `RegenerateBaselines`
Update: profiling locally suggests that we can save a fair bit by avoiding the multiple calls to `GetCompilationAsync` and the loading of assembly references into the compilation.
Contributor guide
Assessment
This issue has not been assessed yet.