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
<PackageReference Include="MartinCostello.BrowserStack.Automate" Version="4.0.1" />
paket add MartinCostello.BrowserStack.Automate --version 4.0.1
#r "nuget: MartinCostello.BrowserStack.Automate, 4.0.1"
// 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
BrowserStack Automate REST API .NET Client
Build Status
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 | Versions 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. |
-
.NETStandard 2.0
- Microsoft.AspNetCore.WebUtilities (>= 2.1.1)
- System.Net.Http.Json (>= 8.0.0)
- System.Text.Json (>= 8.0.0)
-
net8.0
- Microsoft.AspNetCore.WebUtilities (>= 8.0.0)
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 | 7,304 | 2/3/2024 |
3.0.3 | 19,053 | 7/12/2021 |
3.0.2 | 12,374 | 2/2/2021 |
3.0.1 | 40,361 | 10/25/2018 |
3.0.0 | 864 | 10/3/2018 |
3.0.0-beta1 | 633 | 9/27/2018 |
2.0.1 | 7,146 | 10/18/2016 |
2.0.0 | 1,024 | 10/18/2016 |
1.1.0 | 11,230 | 12/11/2015 |
1.0.0 | 1,065 | 12/11/2015 |
1.0.0-beta5 | 895 | 12/11/2015 |
1.0.0-beta13 | 830 | 12/11/2015 |
1.0.0-beta12 | 847 | 12/11/2015 |
1.0.0-beta11 | 957 | 12/11/2015 |
1.0.0-beta10 | 856 | 12/11/2015 |
See https://github.com/martincostello/browserstack-automate/releases for details.