-
Notifications
You must be signed in to change notification settings - Fork 0
Description
🎯 Goal
Turn the LowlandTech.Testing.Features.Reporter console application into a standalone CLI tool, so it can be distributed without requiring users to build it from source. This will make it easier to ship additional functionality later.
🟢 Tasks
1️⃣ Create a dedicated console project
- Create a new folder:
tools/LowlandTech.Testing.Features.Reporter - Add a
.csproj:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>LowlandTech.Testing.Features.Reporter</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\LowlandTech.Testing.Features\LowlandTech.Testing.Features.csproj" />
</ItemGroup>
</Project>- Move the current
Program.csCLI logic into this project.
2️⃣ Make the CLI accept arguments
Usage pattern:
ltx report <TestAssemblyPath> <OutputMarkdownFile> [ReportTitle]Example:
ltx report ./MyTests.dll ./coverage.md "My Project Coverage"Make sure if ReportTitle is omitted, it falls back to "Feature Coverage Report".
3️⃣ Publish as a self-contained executable
To avoid requiring users to install the .NET runtime, publish as self-contained:
Example:
dotnet publish -c Release -r win-x64 --self-contained true /p:PublishSingleFile=trueThis will create a single .exe like:
bin/Release/net8.0/win-x64/publish/ltx.exe
Also build for linux-x64 and osx-x64:
dotnet publish -c Release -r linux-x64 --self-contained true /p:PublishSingleFile=true
dotnet publish -c Release -r osx-x64 --self-contained true /p:PublishSingleFile=trueThese can be zipped and attached to GitHub Releases.
4️⃣ Document usage
Add a section to the README showing:
./ltx report ./MyTests.dll ./coverage.md "My Project Coverage"and explain:
- How to download binaries from Releases.
- How to execute them on different platforms.
5️⃣ Plan for future commands
Make sure the CLI project is structured so we can later add more subcommands:
Examples:
generate-reportexport-featurevalidate-coverage
🟢 Deliverables
tools/LowlandTech.Testing.Features.Reporterproject- Published binaries for Windows, Linux, and macOS
- Updated README with download and usage instructions
📝 Notes
This approach allows us to avoid the complexity of packaging as a dotnet tool and keeps the workflow simple:
- Download executable
- Run it on any machine
- No build step required
✅ Please comment here if you have any questions or want help structuring the CLI for extensibility.