Azure.Developer.MicrosoftPlaywrightTesting.NUnit 1.0.0-beta.4

Prefix Reserved
This is a prerelease version of Azure.Developer.MicrosoftPlaywrightTesting.NUnit.
dotnet add package Azure.Developer.MicrosoftPlaywrightTesting.NUnit --version 1.0.0-beta.4                
NuGet\Install-Package Azure.Developer.MicrosoftPlaywrightTesting.NUnit -Version 1.0.0-beta.4                
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="Azure.Developer.MicrosoftPlaywrightTesting.NUnit" Version="1.0.0-beta.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Azure.Developer.MicrosoftPlaywrightTesting.NUnit --version 1.0.0-beta.4                
#r "nuget: Azure.Developer.MicrosoftPlaywrightTesting.NUnit, 1.0.0-beta.4"                
#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.
// Install Azure.Developer.MicrosoftPlaywrightTesting.NUnit as a Cake Addin
#addin nuget:?package=Azure.Developer.MicrosoftPlaywrightTesting.NUnit&version=1.0.0-beta.4&prerelease

// Install Azure.Developer.MicrosoftPlaywrightTesting.NUnit as a Cake Tool
#tool nuget:?package=Azure.Developer.MicrosoftPlaywrightTesting.NUnit&version=1.0.0-beta.4&prerelease                

Microsoft Azure Playwright Testing NUnit client library for .NET

Microsoft Playwright Testing is a fully managed service that uses the cloud to enable you to run Playwright tests with much higher parallelization across different operating system-browser combinations simultaneously. This means faster test runs with broader scenario coverage, which helps speed up delivery of features without sacrificing quality. The service also enables you to publish test results and related artifacts to the service and view them in the service portal enabling faster and easier troubleshooting. With Microsoft Playwright Testing service, you can release features faster and more confidently.

Ready to get started? Jump into our [quickstart guide]!

Getting started

Install the package

Install the client library for .NET with NuGet:

dotnet add package Azure.Developer.MicrosoftPlaywrightTesting.NUnit --prerelease

Prerequisites

Authenticate the client

To learn more about options for Microsoft Entra Id authentication, refer to Azure.Identity credentials. You can also refer to [our samples] on how to configurate different Azure Identity credentials.

Create a Workspace
  1. Sign in to the Playwright portal with your Azure account.

  2. Create the Workspace

    Create new workspace

    Field Description
    Workspace Name A unique name to identify your workspace.<BR>The name can't contain special characters or whitespace.
    Azure Subscription Select an Azure subscription where you want to create the workspace.
    Region This is where test run data will be stored for your workspace.

[!NOTE] If you don't see this screen, select an existing workspace and go to the next section. ```

Set up Microsoft Playwright Testing

Create a file PlaywrightServiceSetup.cs in the root directory with the below content

using Azure.Developer.MicrosoftPlaywrightTesting.NUnit;

namespace PlaywrightTests.Sample2; // Remember to change this as per your project namespace

[SetUpFixture]
public class PlaywrightServiceSetup : PlaywrightServiceNUnit {};

[!NOTE] Make sure your project uses Microsoft.Playwright.NUnit version 1.37 or above.

Obtain region endpoint

  1. In the Playwright portal, copy the command under Add region endpoint in your set up.

    Set workspace endpoint

    The endpoint URL corresponds to the workspace region. You might see a different endpoint URL in the Playwright portal, depending on the region you selected when creating the workspace.

Set up environment

Ensure that the PLAYWRIGHT_SERVICE_URL that you obtained in previous step is available in your environment.

Run the tests

Run Playwright tests against browsers managed by the service using the configuration you created above.

dotnet test --logger "microsoft-playwright-testing"

Key concepts

Key concepts of the Microsoft Playwright Testing NUnit SDK for .NET can be found here

Examples

Code samples for using this SDK can be found in the following locations

Troubleshooting

Next steps

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit [cla.microsoft.com][cla].

This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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.0.0-beta.4 423 1/17/2025
1.0.0-beta.3 3,682 11/18/2024
1.0.0-beta.2 274 11/5/2024
1.0.0-beta.1 69 10/23/2024