Verisoft.TestInfrastructure
1.9.0-preview.1
dotnet add package Verisoft.TestInfrastructure --version 1.9.0-preview.1
NuGet\Install-Package Verisoft.TestInfrastructure -Version 1.9.0-preview.1
<PackageReference Include="Verisoft.TestInfrastructure" Version="1.9.0-preview.1" />
<PackageVersion Include="Verisoft.TestInfrastructure" Version="1.9.0-preview.1" />
<PackageReference Include="Verisoft.TestInfrastructure" />
paket add Verisoft.TestInfrastructure --version 1.9.0-preview.1
#r "nuget: Verisoft.TestInfrastructure, 1.9.0-preview.1"
#:package Verisoft.TestInfrastructure@1.9.0-preview.1
#addin nuget:?package=Verisoft.TestInfrastructure&version=1.9.0-preview.1&prerelease
#tool nuget:?package=Verisoft.TestInfrastructure&version=1.9.0-preview.1&prerelease
Verisoft.TestInfrastructure
Verisoft's C# (net8.0) test-automation infrastructure for NUnit 4 + Selenium / Appium, shipped as a NuGet package.
- Driver injection:
[AutofacTest]creates a freshVerisoftDriver/VerisoftMobileDriver/VerisoftWincoreDriverper test from a capabilities factory, and quits it afterwards. - Lifecycle extensions:
[UseExtension(typeof(X))]on a fixture attaches Allure, ReportPortal, screenshot / page-source on failure, Xray JSON, an Appium server per test, property loading. - Report bus:
Report.Info(...)fans out to console, NLog, Allure and ReportPortal observers; pass aScreenshotto attach an image. - Toolkit:
Asserts/SoftAsserts,Retry,Waits,ExpectedConditions,Property/FrameworkConfig, thread-local and globalStore. - Reqnroll (Cucumber) mode: the same infra driven from hooks instead of attributes.
Install
dotnet add package Verisoft.TestInfrastructure
dotnet add package Microsoft.NET.Test.Sdk
dotnet add package NUnit3TestAdapter --version 5.2.0 # keep on 5.x, see Pitfalls
The package brings NUnit 4.6, Allure.NUnit 2.15, ReportPortal.NUnit 4.9 (including its build targets, so ReportPortal.addins is generated in your output), Appium.WebDriver 8.3, Selenium.Support 4.45, Autofac, NLog, WebDriverManager and ChromeDriver. It does not bring Microsoft.NET.Test.Sdk, NUnit3TestAdapter or Moq.
Claude Code plugin
Consumers using Claude Code can install the plugin that ships in this repository. It knows the whole API, its rules and its footguns, and can bootstrap a project (/verisoft-setup) or review tests (verisoft-test-reviewer agent):
/plugin marketplace add https://bitbucket.org/verisoft-ai/verisharp-infra.git
/plugin install verisoft-testinfra@verisharp-infra
Details: plugins/verisoft-testinfra/README.md.
Minimal project
MyTests.csproj (full version with every config file: plugin template):
<ItemGroup>
<PackageReference Include="Verisoft.TestInfrastructure" Version="1.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.7.0" />
<PackageReference Include="NUnit3TestAdapter" Version="5.2.0" />
<Using Include="NUnit.Framework" />
</ItemGroup>
<ItemGroup>
<Content Include="ReportPortal.config.json" CopyToOutputDirectory="PreserveNewest" />
<Content Include="allureConfig.json" CopyToOutputDirectory="PreserveNewest" />
<Content Include="NLog.config" CopyToOutputDirectory="PreserveNewest" />
<Content Include="src\test\resources\root.config.properties" Link="root.config.properties" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
TestAssemblySetup.cs — mandatory. The library's own [SetUpFixture] lives in a referenced DLL and NUnit never runs it in your assembly:
using NUnit.Framework;
using Verisoft.TestInfrastructure.Extensions;
using Verisoft.TestInfrastructure.Reporting;
[SetUpFixture] // no namespace → applies to the whole assembly
public class TestAssemblySetup
{
[OneTimeSetUp] public void Up() => new PropertyLoaderExtension().BeforeSuite(); // *.properties → env vars
[OneTimeTearDown] public void Down() => BaseObserver.DisposeObservers();
}
BrowserFactories.cs — a public static parameterless method per browser configuration:
using OpenQA.Selenium.Chrome;
public static class BrowserFactories
{
public static ChromeOptions Chrome_Local_Headless()
{
var o = new ChromeOptions();
o.AddArgument("--headless=new");
return o;
}
}
HomePageTests.cs:
using OpenQA.Selenium;
using Verisoft.TestInfrastructure.DriverInjection; // the only namespace for driver attributes
using Verisoft.TestInfrastructure.Drivers;
using Verisoft.TestInfrastructure.Extensions;
using Verisoft.TestInfrastructure.Lifecycle;
using Verisoft.TestInfrastructure.Reporting;
using Verisoft.TestInfrastructure.Utils;
[TestFixture]
[Category("Browser")]
[UseExtension(typeof(LogExtension))] // registers console + NLog observers for Report.*
[UseExtension(typeof(ScreenshotExtension))] // PNG of every driver on failure
public class HomePageTests
{
[AutofacTest] // replaces [Test]; injects and quits the driver
[DriverCapabilities(typeof(BrowserFactories), nameof(BrowserFactories.Chrome_Local_Headless))]
public void Title_IsNotEmpty(VerisoftDriver driver) // void, never async Task
{
driver.Navigate().GoToUrl("https://example.test");
Waits.PageToFullyLoad(driver, 10);
Report.Info("Title: " + driver.Title);
Assert.That(driver.Title, Is.Not.Empty);
}
}
Run:
dotnet test --filter "TestCategory=Browser"
Feature map
| Area | Types | Sample |
|---|---|---|
| Driver injection | [AutofacTest], [DriverCapabilities], [DriverUrl], [UseAppiumServer], [DriverNameParameter], CommandExecutorRegistry, DriverProvider |
Verisoft.TestInfrastructure.Sample/WebTests.cs, Tests/ParameterizedDriverTests.cs, Tests/MultipleDriversTests.cs, Tests/CalculatorTests.cs |
| Drivers | VerisoftDriver, VerisoftMobileDriver, VerisoftWincoreDriver, VerisoftDriverManager, IWebDriverListener |
Tests/ListenersExampleTest.cs, Tests/VerisoftDriverE2ETests.cs |
| Extensions | AllureExtension, ReportPortalExtension, ScreenshotExtension, PageSourceExtension, PropertyLoaderExtension, AppiumServerExtension, XrayPluginExtension + [XrayIdentifier], LogExtension |
Tests/SampleTest.cs, Tests/AndroidSettingsExtensionTests.cs |
| Report | Report, BaseObserver, ConsoleReportObserver, LogObserver, AllureReportObserver, ReportPortalReportObserver |
Verisoft.TestInfrastructure.Cucumber/Support/CapturingObserver.cs |
| Asserts | Asserts, SoftAsserts (+ AssertAll()) |
Cucumber/StepDefinitions/AssertSteps.cs |
| Utils | Retry / IAttemptable, Waits, ExpectedConditions, PropertiesFile, Property, FrameworkConfig |
Sample/Tests/Utils/*.cs |
| Store | StoreManager, StoreType, Store |
Cucumber/StepDefinitions/StoreSteps.cs |
| Reqnroll mode | hooks in Cucumber/Hooks/*.cs replace [AutofacTest] and [UseExtension] |
Verisoft.TestInfrastructure.Cucumber/ |
Detailed, source-cited documentation for each area: plugins/verisoft-testinfra/skills/verisoft-testinfra/references/. Architecture: docs/ARCHITECTURE.md. Step by step: docs/GETTING_STARTED.md.
Pitfalls (top 10)
- No
VerisoftBaseTest. It was removed long ago; use[AutofacTest]+[UseExtension]. - Add your own
[SetUpFixture](above). Without it properties are never loaded and observers never disposed. - Keep
NUnit3TestAdapteron 5.x. 6.x loads tests in an isolatedAssemblyLoadContextand the ReportPortal engine extension silently never runs. - Only
Verisoft.TestInfrastructure.DriverInjectionattributes work. TheDrivers.Attributes/Drivers.Factorycopies are[Obsolete]. [AutofacTest]tests must bevoid. Anasync Taskis not awaited and passes instantly.- Missing browser or unreachable grid → test Ignored, not failed. Assert on the pass count in CI.
- Data-driven only via
[TestCase]/[TestCaseSource](driver asnullplaceholder or optional last parameter).[Values]/[Range]/[Random]are rejected. - Everything driver-related is keyed by thread id. After an
awaitor in Reqnroll steps calldriver.EnsureRegistered(). SoftAssertsneedsAssertAll(), otherwise failures are dropped; it throwsSoftAssertionError(NUnit Error, not Failure).- Config files are not in the package.
ReportPortal.config.json,allureConfig.json,NLog.config,capabilities.json,*.propertiesmust be copied to the output directory; the ReportPortal API key goes in theReportPortal_Server_ApiKeyenvironment variable.
Full list with evidence: gotchas.md.
Repository layout
| Path | What |
|---|---|
Verisoft.TestInfrastructure/ |
the library (this package) |
Verisoft.TestInfrastructure.Tests/ |
its unit tests (TestCategory=Unit) |
Verisoft.TestInfrastructure.Sample/ |
NUnit consumer: browser, Appium, Wincore samples |
Verisoft.TestInfrastructure.Cucumber/ |
Reqnroll consumer: the same infra from feature files + hooks |
plugins/verisoft-testinfra/ |
Claude Code plugin (skills, reviewer agent, templates, evals) |
ci/ |
parallel.runsettings (4 workers) and sequential.runsettings (1 worker: Unit, Appium) |
docs/ |
architecture, getting started, research notes |
dotnet build Verisoft.TestInfrastructure.sln -c Release
dotnet test Verisoft.TestInfrastructure.sln -c Release --filter "TestCategory=Unit" --settings ci/sequential.runsettings
dotnet test Verisoft.TestInfrastructure.Sample/Verisoft.TestInfrastructure.Sample.csproj -c Release --filter "TestCategory=Browser" --settings ci/parallel.runsettings
License
MIT — see LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net8.0
- Allure.Net.Commons (>= 2.15.0)
- Allure.NUnit (>= 2.15.0)
- Appium.WebDriver (>= 8.3.0)
- Autofac (>= 9.3.0)
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.9)
- NLog (>= 6.1.3)
- NUnit (>= 4.6.1)
- ReportPortal.NUnit (>= 4.9.0)
- Selenium.Support (>= 4.45.0)
- Selenium.WebDriver.ChromeDriver (>= 150.0.7871.4600)
- WebDriverManager (>= 2.17.7)
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 |
|---|---|---|
| 1.9.0-preview.1 | 35 | 9/24/2026 |
| 1.8.0 | 91 | 9/17/2026 |
| 1.7.2 | 96 | 9/14/2026 |
| 1.7.1 | 115 | 8/24/2026 |
| 1.7.0 | 117 | 8/10/2026 |
| 1.6.3 | 125 | 7/30/2026 |
| 1.6.2 | 112 | 7/22/2026 |
| 1.6.1 | 125 | 7/22/2026 |
| 1.6.0 | 121 | 7/21/2026 |
| 1.5.0 | 132 | 7/20/2026 |
| 1.4.0 | 113 | 7/14/2026 |
| 1.3.0 | 121 | 7/14/2026 |
| 1.2.0 | 128 | 6/25/2026 |
| 1.1.0 | 133 | 4/13/2026 |
| 1.0.0 | 617 | 12/1/2025 |
1.9.0: The package no longer ships the library's own unit tests and no longer pulls Moq, Microsoft.NET.Test.Sdk, NUnit3TestAdapter, NUnit.Analyzers, JunitXml.TestLogger or coverlet into consumers (tests moved to the Verisoft.TestInfrastructure.Tests project). Consumers reference Microsoft.NET.Test.Sdk and NUnit3TestAdapter 5.x directly, as `dotnet new nunit` already does; NUnit3TestAdapter 6.x breaks the ReportPortal engine extension. ReportPortal.NUnit build assets now flow to NuGet consumers, so ReportPortal.addins is generated in the test project output and launches reach ReportPortal (previously only ProjectReference consumers got this). Drivers.Attributes.DriverCapabilities, Drivers.Attributes.DriverUrl and Drivers.Factory.DriverProvider are [Obsolete]; use the DriverInjection equivalents. README and docs rewritten for the current API; a Claude Code plugin for consumers ships in the repository (plugins/verisoft-testinfra). 1.8.0: VerisoftDesktopDriver renamed to VerisoftWincoreDriver to match appium-wincore-driver (automationName "Wincore", ms:waitForAppLaunch capability). 1.7.2: ListenerWebElement implements ITakesScreenshot; Report.* attaches a Screenshot payload; VerisoftDriver has full WebDriver interface parity. 1.7.0: [AutofacTest] works with [TestCaseSource] and [TestCase]; [Values]/[Range]/[Random] report a clear message.