ProtoTest.Templates
1.0.1
dotnet new install ProtoTest.Templates@1.0.1
This package contains a .NET Template Package you can call from the shell/command line.
ProtoTest.Templates
dotnet new templates for ProtoTest: a starter solution that is already composed, so the first test runs in one command.
dotnet new install ProtoTest.Templates
Quick start
dotnet new prototest -n Shop
cd Shop
dotnet test
The generated Shop.slnx contains two projects:
- Shop.Api — a small ASP.NET Core API for orders.
- Shop.Tests — an NUnit suite that hosts the API in-process, calls it over REST, asserts with shapes and writes a trace and an HTML report on every run.
What it adds
- The
prototesttemplate — a working end-to-end suite:ProtoTestAssemblysetup, an in-processAddAspNetCoreServer<Program>, REST and shape assertions, and an HTML report sink. - Ready composition — the API and its tests share one host, so the first run already produces
TestResults/Starter.prototraceandTestResults/Starter.html. - Framework choice —
--framework net8.0,net9.0or the defaultnet10.0. - Restore control — pass
--no-restoreto skip the post-create restore. - Version pinning — the generated projects reference the ProtoTest version the template shipped with.
- Structure —
Shop.slnx,Shop.Api/Program.cswith a small orders API, andShop.Tests/Setup.csderiving fromProtoTestAssemblywithShop.Tests/OrderTests.cs. - Coverage — the REST client registers
RestCoverageCollector, so the report lists the endpoints the tests exercised. - Help and updates —
dotnet new prototest --helplists the parameters; rundotnet new install ProtoTest.Templatesagain after a new release to update it.
The template requires the .NET SDK for its target framework; -n Shop names the solution and both projects through the Starter source name.
The suite is CI-friendly: dotnet test restores, builds and writes its artifacts under TestResults. Uninstall with dotnet new uninstall ProtoTest.Templates.
Learn more
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.