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

NuGet

Build Status

Build status codecov OpenSSF Scorecard

Overview

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.

Installation

dotnet add package MartinCostello.BrowserStack.Automate

Usage Examples

The following example shows a custom xUnit.net [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.";
            }
        }
        else
        {
            Skip = "No BrowserStack Automate credentials are available.";
        }
    }
}

Feedback

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

Repository

The repository is hosted in GitHub: https://github.com/martincostello/browserstack-automate.git

License

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"
./build.ps1

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 5,029 2/3/2024
3.0.3 18,890 7/12/2021
3.0.2 12,308 2/2/2021
3.0.1 40,348 10/25/2018
3.0.0 848 10/3/2018
3.0.0-beta1 623 9/27/2018
2.0.1 7,134 10/18/2016
2.0.0 1,012 10/18/2016
1.1.0 11,207 12/11/2015
1.0.0 1,053 12/11/2015
1.0.0-beta5 887 12/11/2015
1.0.0-beta13 822 12/11/2015
1.0.0-beta12 839 12/11/2015
1.0.0-beta11 947 12/11/2015
1.0.0-beta10 848 12/11/2015