Using justfile as a command runner
- just
- Justfile Cheat Sheet
- Installation
- Linux:
curl -sSL instl.sh/casey/just/linux | bash - Windows:
winget install --id Casey.Just --exact
- Linux:
- Install dotnet's tools, i.e.
dotnet-efin localjust dotnet-tools
- Via
appsettings.json - Then load via
Program.csbuilder.WebHost.ConfigureKestrel(options => { options.AddServerHeader = false; options.Configure(builder.Configuration.GetSection("Kestrel")); });
- Use bundle migration
- And Data Seeding
-
Using xUnitV3
-
Using Testcontainers.XunitV3
-
Using Testcontainers.MsSql
-
Highlighted:
AssemblyFixtureas a Shared Context between Tests in which the database and application are created only once for all tests, which improves performance and reduces resource usage.- Memory Configuration Provider to dynamically change the settings for integration tests without modifying existing code
- By using
WebApplicationFactory, we can create a test server that runs the application in memory, which allows us to test the application without having to deploy it to a real server.
-
Run tests via
justjust ms-test
Or
just test
If you liked this project or if it helped you, please give a star 🌟 for this repository. Thank you!!!