TddBuddy.SpeedySqlLocalDb
1.0.0
See the version list below for details.
dotnet add package TddBuddy.SpeedySqlLocalDb --version 1.0.0
NuGet\Install-Package TddBuddy.SpeedySqlLocalDb -Version 1.0.0
<PackageReference Include="TddBuddy.SpeedySqlLocalDb" Version="1.0.0" />
paket add TddBuddy.SpeedySqlLocalDb --version 1.0.0
#r "nuget: TddBuddy.SpeedySqlLocalDb, 1.0.0"
// Install TddBuddy.SpeedySqlLocalDb as a Cake Addin #addin nuget:?package=TddBuddy.SpeedySqlLocalDb&version=1.0.0 // Install TddBuddy.SpeedySqlLocalDb as a Cake Tool #tool nuget:?package=TddBuddy.SpeedySqlLocalDb&version=1.0.0
A super quick localDb testing framework for use with Entity Framework.
It uses a localDB instance for the entire test run's life.
Each test's execution is wrapped into transaction to avoid test interfering with each other. This means the cost of setting up the DB is only paid once. That is when the first test executes and the EF migrations are run to initialize the DB to the correct state.
This framework was sliced out of from a production project where the test runs where nearing 40 minutes on the CI server. The bulk of the time was take up by 200 repository integration test due to Entity Framework's need to run migrations for each test being executed. This was due to the fact that each test needed its own DB to allow for proper isolation. After implementing the transactional scoping logic the test run time was reduced to 8 minutes. A full 5x speed improvement.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
- EntityFramework (>= 6.1.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
A breaking release.
There is no longer a need to use test setup and tear down.
Just annotate the test class, [SharedSpeedyLocalDb(typeof(ExampleDbContext))], and the heavy lifting is done my automagic.