AutoForge/docs/build-and-test.md

95 lines
4.1 KiB
Markdown

# Build and test
## Prerequisites
- Windows x64, .NET SDK 10.0.402 with its approved .NET 10 patch roll-forward.
- Windows 10 SDK 10.0.26100.0 and the MAUI Windows workload (10.0.110).
- Microsoft Edge WebView2 Runtime for launching the native Blazor Hybrid Client.
The Client targets `net10.0-windows10.0.26100.0` and `win-x64`. The Core,
Application, UI, Components and test projects target portable `net10.0`. Headless
tests therefore do not require MAUI or WebView2. The solution uses centralized
package versions; change direct dependencies only through the central package
file and validate the resulting restore.
## Restore and build
From the repository root in PowerShell:
```powershell
dotnet restore .\src\AutoForge.slnx
dotnet build .\src\AutoForge.slnx --configuration Release
```
For an explicit Windows runtime pack restore or native Client build:
```powershell
dotnet restore .\src\AutoForge.Client\AutoForge.Client.csproj --runtime win-x64
dotnet build .\src\AutoForge.Client\AutoForge.Client.csproj --configuration Release --framework net10.0-windows10.0.26100.0 --no-restore
```
Run the app on Windows:
```powershell
dotnet run --project .\src\AutoForge.Client\AutoForge.Client.csproj --configuration Release --framework net10.0-windows10.0.26100.0
```
The app is a native MAUI window containing the actual `AutoForge.UI` routes in a
BlazorWebView. Its initial provider registration is empty by design. Startup and
selection remain useful to exercise the honest `ProviderNotRegistered` result;
they do not require a backend, a database or vehicle hardware.
## Automated verification
Run the focused portable suites:
```powershell
dotnet test .\src\tests\AutoForge.UnitTests\AutoForge.UnitTests.csproj --configuration Release
dotnet test .\src\tests\AutoForge.IntegrationTests\AutoForge.IntegrationTests.csproj --configuration Release
```
Unit tests cover Core/Application behavior and rendered reusable components.
Integration tests cover actual dependency-injection composition, rendered UI
routes with the real Application resolver, and the project-reference graph.
`ProjectGraphTests` reads the project manifests; it guards the production
dependency direction rather than relying on a diagram.
At Step-01A implementation verification, the full Release solution build and the
direct native Client build completed with zero warnings and errors. The portable
suite results were 39 unit tests and 26 integration tests passed (65 total).
All 54 Step-01 tests remain in the expanded suites.
## Native smoke checks
Run the Client on Windows and verify:
1. The native window opens with the AutoForge home route and no unhandled-error
banner.
2. Navigation reaches `/execution-targets` and displays the explicit
`ProviderNotRegistered` empty-provider state.
3. The UI states that selection is metadata-only and does not connect to a
vehicle or authorize operations.
4. Submitting a valid, explicit provider identifier and defined target kind
returns the honest not-registered result; it does not fall back to another
kind or invent a provider.
5. An unmatched path displays the explicit not-found presentation.
6. Components RCL scoped-style assets load in the WebView.
Automated rendered-route tests cover the route/component/Application behavior;
they are not evidence of native WebView startup. Record the native Client build,
window, route interactions and style asset verification separately in the
Step-01A execution report.
## Guardrails and limitations
- Selection is explicit registered **metadata** only. It is not a connection,
detected capability, health result or authorization.
- The Client's empty provider registry is deliberate. Do not add a fabricated
provider to make the screen look populated.
- No HTTP server, browser-only host, database, cloud service, simulation engine,
diagnostic engine or hardware driver is part of this foundation.
- Keep the native Client dependency and platform surface isolated; preserve
portable testability for UI, Components, Application and Core.
- Step-02 remains held for orchestrator acceptance; completing this build guide
does not authorize later roadmap work.