MartinCostello.BrowserStack.Automate 4.0.1

dotnet add package MartinCostello.BrowserStack.Automate --version 4.0.1
NuGet\Install-Package MartinCostello.BrowserStack.Automate -Version 4.0.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="MartinCostello.BrowserStack.Automate" Version="4.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MartinCostello.BrowserStack.Automate --version 4.0.1
#r "nuget: MartinCostello.BrowserStack.Automate, 4.0.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.
// Install MartinCostello.BrowserStack.Automate as a Cake Addin
#addin nuget:?package=MartinCostello.BrowserStack.Automate&version=4.0.1

// Install MartinCostello.BrowserStack.Automate as a Cake Tool
#tool nuget:?package=MartinCostello.BrowserStack.Automate&version=4.0.1

Alt text BrowserStack Automate REST API .NET Client


Build Status

Build status codecov OpenSSF Scorecard


This repository contains a .NET client library/NuGet package for the BrowserStack Automate REST API.

Features include:

  • Querying the status of a BrowserStack Automate plan.
  • Querying the available browsers.
  • Querying and deleting builds.
  • Querying and deleting projects.
  • Querying and deleting sessions.
  • Querying session log.
  • Setting the status of a session.
  • Regenerating the API access key.

The assembly supports .NET Standard 2.0.


dotnet add package MartinCostello.BrowserStack.Automate

Usage Examples

The following example shows a custom [Fact] that checks for an available BrowserStack Automate session before running the test, otherwise it is skipped.

namespace MyApp.Tests;

using MartinCostello.BrowserStack.Automate;
using Xunit;

[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public sealed class RequiresBrowserStackAutomateAttribute : FactAttribute
    public RequiresBrowserStackAutomateAttribute()
        var userName = Environment.GetEnvironmentVariable("BrowserStack_UserName");
        var accessKey = Environment.GetEnvironmentVariable("BrowserStack_AccessKey");

        if (userName is not null && accessKey is not null)
            var client = new BrowserStackAutomateClient(userName, accessKey);
            var plan = client.GetStatusAsync().Result;

            if (plan.MaximumAllowedParallelSessions < 1 ||
                plan.ParallelSessionsRunning == plan.MaximumAllowedParallelSessions)
                Skip = "No BrowserStack Automate sessions are currently available.";
            Skip = "No BrowserStack Automate credentials are available.";


Any feedback or issues can be added to the issues for this project in GitHub.


The repository is hosted in GitHub:


This project is licensed under the Apache 2.0 license.

Building and Testing

To build and test the assembly run one of the following set of commands:

$env:BrowserStack_UserName  = "MyUserName"
$env:BrowserStack_AccessKey = "MyAccessKey"

If you do not have a BrowserStack Automate access key you can still just run the build script and the integration tests that require credentials will be skipped.

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. 
.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
4.0.1 953 2/3/2024
3.0.3 18,131 7/12/2021
3.0.2 12,201 2/2/2021
3.0.1 40,103 10/25/2018
3.0.0 825 10/3/2018
3.0.0-beta1 603 9/27/2018
2.0.1 7,106 10/18/2016
2.0.0 984 10/18/2016
1.1.0 10,977 12/11/2015
1.0.0 1,024 12/11/2015
1.0.0-beta5 866 12/11/2015
1.0.0-beta13 801 12/11/2015
1.0.0-beta12 817 12/11/2015
1.0.0-beta11 922 12/11/2015
1.0.0-beta10 827 12/11/2015