VOOZH about

URL: https://www.nuget.org/packages/E13.Common.Nunit.UI/

⇱ NuGet Gallery | E13.Common.Nunit.UI 2025.117.22




👁 Image
E13.Common.Nunit.UI 2025.117.22

dotnet add package E13.Common.Nunit.UI --version 2025.117.22
 
 
NuGet\Install-Package E13.Common.Nunit.UI -Version 2025.117.22
 
 
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="E13.Common.Nunit.UI" Version="2025.117.22" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="E13.Common.Nunit.UI" Version="2025.117.22" />
 
Directory.Packages.props
<PackageReference Include="E13.Common.Nunit.UI" />
 
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 E13.Common.Nunit.UI --version 2025.117.22
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: E13.Common.Nunit.UI, 2025.117.22"
 
 
#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 E13.Common.Nunit.UI@2025.117.22
 
 
#: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=E13.Common.Nunit.UI&version=2025.117.22
 
Install as a Cake Addin
#tool nuget:?package=E13.Common.Nunit.UI&version=2025.117.22
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

E13.Common.Nunit.UI

👁 NuGet Version
👁 License: MIT

Overview

E13.Common.Nunit.UI is a specialized package within the E13.Common collection designed for UI testing with NUnit and PuppeteerSharp. It extends E13.Common.Nunit with UI-specific testing utilities, including browser automation, screenshot comparison, and authentication helpers for web applications.

Features

  • UI Test Fixtures: Base classes for UI testing with PuppeteerSharp integration
  • Screenshot Comparison: Automated visual regression testing with screenshot comparison
  • Authentication Support: Helpers for testing authenticated UI flows
  • Browser Automation: Utilities for interacting with web pages in tests
  • Test Organization: Attributes and extensions for organizing UI tests

Installation

dotnet add package E13.Common.Nunit.UI

Usage

Creating a UI Test Fixture

using E13.Common.Nunit.UI;
using Microsoft.Extensions.Hosting;
using NUnit.Framework;
using PuppeteerSharp;
using System.Threading.Tasks;

// Create a test fixture for your UI
public class MyUITests : BaseUIFixture
{
 // Define viewport dimensions
 public MyUITests() 
 : base(1280, 720, () => CreateHostBuilder())
 {
 }
 
 private static IHostBuilder CreateHostBuilder() =>
 Host.CreateDefaultBuilder()
 .ConfigureWebHostDefaults(webBuilder =>
 {
 webBuilder.UseStartup<TestStartup>();
 });
 
 [Test]
 public async Task HomePage_LoadsCorrectly()
 {
 // Navigate to a page
 await Page.GoToAsync("https://localhost:5001");
 
 // Take and compare a screenshot
 await Page.ConfirmScreenshot("HomePage");
 
 // Assert page content
 var title = await Page.GetTitleAsync();
 Assert.AreEqual("Home Page", title);
 }
}

Testing Authenticated UI Flows

using E13.Common.Nunit.UI;
using Microsoft.Extensions.Hosting;
using NUnit.Framework;
using System.Threading.Tasks;

public class AuthenticatedUITests : BaseAuthUIFixture
{
 protected override string AuthUrl => "https://localhost:5001/login";
 
 public AuthenticatedUITests() 
 : base(1280, 720, () => CreateHostBuilder())
 {
 }
 
 private static IHostBuilder CreateHostBuilder() => 
 Host.CreateDefaultBuilder()
 .ConfigureWebHostDefaults(webBuilder =>
 {
 webBuilder.UseStartup<TestStartup>();
 });
 
 [Test]
 [RequiresAuth]
 public async Task SecurePage_WhenAuthenticated_ShowsContent()
 {
 // The [RequiresAuth] attribute will trigger automatic login
 // Navigate to a secure page
 await Page.GoToAsync("https://localhost:5001/secure");
 
 // Take and compare a screenshot
 await Page.ConfirmScreenshot("SecurePage");
 
 // Assert secure content is visible
 var content = await Page.QuerySelectorAsync(".secure-content");
 Assert.IsNotNull(content);
 }
}

Dependencies

  • .NET 9.0
  • PuppeteerSharp
  • PuppeteerSharp.Contrib.Extensions
  • PuppeteerSharp.Contrib.Should
  • Microsoft.Extensions.Hosting
  • E13.Common.Nunit

Related Packages

E13.Common.Nunit.UI is part of the E13.Common collection, which includes:

  • E13.Common.Core - Core utilities and base classes
  • E13.Common.Nunit - Base NUnit testing utilities
  • E13.Common.Nunit.Api - NUnit utilities for API testing
  • E13.Common.Blazor - Blazor UI components
  • E13.Common.AspNet - ASP.NET shared components

Contributing

Contributions to E13.Common.Nunit.UI are welcome. If you have suggestions or improvements, please submit an issue or create a pull request in the GitHub repository.

License

This project is licensed under the MIT License. For more details, see the LICENSE file in the repository.

Product Versions Compatible and additional computed target framework versions.
.NET net9.0 net9.0 is compatible.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows 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
2025.117.22 213 4/27/2025
2025.114.21 229 4/24/2025
2025.114.20 235 4/24/2025
2025.114.19 239 4/24/2025
2025.114.18 239 4/24/2025
2025.112.17 247 4/22/2025
2025.112.16 251 4/22/2025
2025.111.15 252 4/21/2025
2025.106.14 257 4/16/2025
2025.106.12 277 4/16/2025
2025.97.11 248 4/7/2025
2025.96.9 251 4/6/2025
2025.96.8 242 4/6/2025
2025.91.7 238 4/1/2025
2025.91.6 232 4/1/2025
2025.90.4 243 3/31/2025
2023.30.1 482 1/30/2023
2023.18.1 432 1/18/2023
2021.324.4 1,308 11/20/2021
1.0.0 244 4/1/2025
Loading failed