Verisoft.TestInfrastructure 1.9.0-preview.1

This is a prerelease version of Verisoft.TestInfrastructure.
dotnet add package Verisoft.TestInfrastructure --version 1.9.0-preview.1
                    
NuGet\Install-Package Verisoft.TestInfrastructure -Version 1.9.0-preview.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Verisoft.TestInfrastructure" Version="1.9.0-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Verisoft.TestInfrastructure" Version="1.9.0-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="Verisoft.TestInfrastructure" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Verisoft.TestInfrastructure --version 1.9.0-preview.1
                    
#r "nuget: Verisoft.TestInfrastructure, 1.9.0-preview.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Verisoft.TestInfrastructure@1.9.0-preview.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Verisoft.TestInfrastructure&version=1.9.0-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Verisoft.TestInfrastructure&version=1.9.0-preview.1&prerelease
                    
Install as a Cake Tool

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 fresh VerisoftDriver / VerisoftMobileDriver / VerisoftWincoreDriver per 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 a Screenshot to attach an image.
  • Toolkit: Asserts / SoftAsserts, Retry, Waits, ExpectedConditions, Property / FrameworkConfig, thread-local and global Store.
  • 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)

  1. No VerisoftBaseTest. It was removed long ago; use [AutofacTest] + [UseExtension].
  2. Add your own [SetUpFixture] (above). Without it properties are never loaded and observers never disposed.
  3. Keep NUnit3TestAdapter on 5.x. 6.x loads tests in an isolated AssemblyLoadContext and the ReportPortal engine extension silently never runs.
  4. Only Verisoft.TestInfrastructure.DriverInjection attributes work. The Drivers.Attributes / Drivers.Factory copies are [Obsolete].
  5. [AutofacTest] tests must be void. An async Task is not awaited and passes instantly.
  6. Missing browser or unreachable grid → test Ignored, not failed. Assert on the pass count in CI.
  7. Data-driven only via [TestCase] / [TestCaseSource] (driver as null placeholder or optional last parameter). [Values] / [Range] / [Random] are rejected.
  8. Everything driver-related is keyed by thread id. After an await or in Reqnroll steps call driver.EnsureRegistered().
  9. SoftAsserts needs AssertAll(), otherwise failures are dropped; it throws SoftAssertionError (NUnit Error, not Failure).
  10. Config files are not in the package. ReportPortal.config.json, allureConfig.json, NLog.config, capabilities.json, *.properties must be copied to the output directory; the ReportPortal API key goes in the ReportPortal_Server_ApiKey environment 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.