HardPoint.Testing
0.1.0-preview.1
See the version list below for details.
dotnet add package HardPoint.Testing --version 0.1.0-preview.1
NuGet\Install-Package HardPoint.Testing -Version 0.1.0-preview.1
<PackageReference Include="HardPoint.Testing" Version="0.1.0-preview.1" />
<PackageVersion Include="HardPoint.Testing" Version="0.1.0-preview.1" />
<PackageReference Include="HardPoint.Testing" />
paket add HardPoint.Testing --version 0.1.0-preview.1
#r "nuget: HardPoint.Testing, 0.1.0-preview.1"
#:package HardPoint.Testing@0.1.0-preview.1
#addin nuget:?package=HardPoint.Testing&version=0.1.0-preview.1&prerelease
#tool nuget:?package=HardPoint.Testing&version=0.1.0-preview.1&prerelease
HardPoint.Testing
Playwright, MSTest and Reqnroll building blocks for a browser and API test suite: a per-scenario driver, JSON configuration with environment overrides, ExtentReports integration, and scenario hooks that open the application and capture failure artifacts.
Install
dotnet add package HardPoint.Testing --prerelease
pwsh bin/Debug/net10.0/playwright.ps1 install chromium
The package depends on Microsoft.Playwright, Reqnroll.MSTest and ExtentReports.
Target framework is net10.0.
What it provides
| Type | Purpose |
|---|---|
PlaywrightDriver |
One instance per scenario, resolved by Reqnroll's DI container. Exposes Page, Browser, BrowserContext, ApiRequestContext, tracing and screenshots. |
BaseHook |
[Binding] that validates scenario tags, starts the Extent report node, opens the application for @ui scenarios, records failure traces and screenshots, and disposes the report and driver after the run. Derive from it in your own hooks class. |
BasePage |
Base class for page objects with ARIA-role locators. |
ConfigReader |
Reads TestSettings from JSON, with TEST_-prefixed environment overrides. |
ScenarioTags |
The @ui / @api test-type tags and the @local / @dev / @qa / @stage / @prod environment tags. |
ArtifactDirectory |
Resolves where the report, traces, screenshots and HAR files are written. |
Configuration contract
The framework reads appsettings.json from the test output directory. appsettings.CI.json
is used instead when the CI environment variable is true or 1 and that file exists.
Copy both with CopyToOutputDirectory=PreserveNewest.
{
"browserType": "chromium",
"applicationUrl": "http://localhost:5168",
"enforceScenarioTags": false,
"outputDirectory": "",
"browserOptions": { "headless": true },
"apiOptions": { "BaseURL": "http://localhost:5044/api/", "IgnoreHTTPSErrors": true }
}
| Key | Meaning |
|---|---|
browserType |
chromium, firefox or webkit. Required. |
applicationUrl |
URL opened before each @ui scenario. Required. |
enforceScenarioTags |
Reject a scenario that has no test-type tag (@ui/@api) or no environment tag, before it runs. Default false, so the package imposes no tagging policy unless you ask for it. |
outputDirectory |
Directory for TestReports.html, traces/, screenshots/ and sut-*.har. Empty means the test output directory; a relative path resolves against it. |
browserOptions |
Passed to IBrowserType.LaunchAsync. |
apiOptions |
Passed to APIRequest.NewContextAsync. |
TEST_-prefixed environment variables override the file: TEST_Headless=true matches the
headless key wherever it appears, and TEST_APIRequestNewContextOptions__BaseURL=...
addresses a nested setting by its property path (__ separates levels). TEST_CONFIG_FILE
replaces the file entirely; a relative value is resolved against the test output directory.
An override can only change a key that the file already contains.
A missing or malformed file fails with a message naming the resolved path and the remedy.
Requirements on the consuming test assembly
Parallelism is not inherited from the package. Assembly-level attributes configure the assembly that declares them, so declare it in your test project:
[assembly: Parallelize(Scope = ExecutionScope.MethodLevel)]Bindings.
BaseHookcarries[Binding]and Reqnroll discovers it from the package reference with only"bindingAssemblies": [](verified with Reqnroll 3.3.4). If a future Reqnroll version stops scanning package assemblies, add the framework assembly:{ "bindingAssemblies": ["HardPoint.Testing"] }
Artifacts
TestReports.html is written to the artifact directory at the end of the run. traces/
holds a Playwright trace archive per failed @ui scenario; open one with
playwright show-trace <file>.zip. screenshots/ holds screenshots attached to the report.
ArtifactDirectory is public if your own hooks need the same paths.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- ExtentReports (>= 5.0.4)
- Microsoft.Playwright (>= 1.63.0)
- Reqnroll.MSTest (>= 3.3.4)
- Reqnroll.Tools.MsBuild.Generation (>= 3.3.4)
- System.Drawing.Common (>= 10.0.13)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-preview.2 | 104 | 10/31/2026 |
| 0.1.0-preview.1 | 68 | 10/29/2026 |