Reqnroll icon indicating copy to clipboard operation
Reqnroll copied to clipboard

Improve SystemTests execution time

Open obligaron opened this issue 5 months ago • 16 comments

🤔 What's changed?

This PR improves the execution time of Reqnroll.SystemTests.

This is mainly done by two changes.

1. Use global nuget cache by default

Currently the execution of SystemTests uses a custom local nuget cache. This results in ~600MB being copied on each SystemTests run (once for all tests). This is necessary because we create a new nuget package with the same version after each build. But the global nuget cache doesn't allow to remove a specific nuget package.

Based on https://www.nyckel.com/blog/nuget-packages a custom build target has been introduced to remove the Reqnroll nuget packages from the nuget cache. This allows us to still use the default nuget cache and avoid copying ~600MB.

This results in a speedup from ~1.4 minutes to ~1.2 minutes on my machine.

The old behavior can be enabled by a setting (PerRunNuGetPackages config switch).

2. Allow method-level parallelization

This change allows multiple tests in a class to run in parallel.

This results in a speedup from ~1.2 minutes to ~51 seconds on my machine.

⚡️ What's your motivation?

When contributing

🏷️ What kind of change is this?

  • :bank: Refactoring/debt/DX (improvement to code design, tooling, etc. without changing behaviour)

♻️ Anything particular you want feedback on?

I'm not sure if this change should be included in the CHANGELOG.md since it only affects Reqnroll contributors.

Also, during testing, I had some sporadic occurrence of #249,

📋 Checklist:

  • [ ] Users should know about my change
    • [ ] I have added an entry to the "[vNext]" section of the CHANGELOG, linking to this pull request & included my GitHub handle to the release contributors list.

obligaron avatar Sep 08 '24 14:09 obligaron