npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

browserstack-test-management-sdk

v1.2.0

Published

Client wrapper for the BrowserStack Test Management API

Readme

BrowserStack Test Management SDK

A TypeScript client wrapper for the BrowserStack Test Management API. This SDK provides a simple interface to manage projects, test cases, test runs, and test plans, with built-in support for uploading Playwright test results.

Installation

npm install browserstack-test-management-sdk

Quick Start

import { BrowserStackTestManagementSDK } from 'browserstack-test-management-sdk';

const sdk = new BrowserStackTestManagementSDK({
  username: process.env.BROWSERSTACK_USERNAME!,
  accessKey: process.env.BROWSERSTACK_ACCESS_KEY!,
});

// List all projects
const projects = await sdk.listProjects();
console.log(projects.data);

// Create a test run
const testRun = await sdk.createTestRun(projectId, {
  name: 'E2E Test Run - 2024-01-24',
  description: 'Automated test run from CI',
});

Authentication

The SDK uses HTTP Basic Authentication with your BrowserStack username and access key. You can provide these via:

  1. Environment variables (recommended):

    export BROWSERSTACK_USERNAME=your_username
    export BROWSERSTACK_ACCESS_KEY=your_access_key
  2. Constructor parameters:

    const sdk = new BrowserStackTestManagementSDK({
      username: 'your_username',
      accessKey: 'your_access_key',
    });

API Reference

Projects

// List all projects
const projects = await sdk.listProjects();

// Get a specific project
const project = await sdk.getProject(projectId);

// Create a new project
const newProject = await sdk.createProject({
  name: 'My Project',
  description: 'Project description',
});

// Update a project
const updated = await sdk.updateProject(projectId, {
  name: 'Updated Name',
});

// Delete a project
await sdk.deleteProject(projectId);

Test Cases

// List test cases for a project
const testCases = await sdk.listTestCases(projectId);

// Get a specific test case
const testCase = await sdk.getTestCase(projectId, testCaseId);

// Create a new test case
const newTestCase = await sdk.createTestCase(projectId, {
  title: 'Test Case Title',
  description: 'Test case description',
  priority: 'high',
  status: 'active',
  tags: ['e2e', 'playwright'],
});

// Update a test case
const updated = await sdk.updateTestCase(projectId, testCaseId, {
  priority: 'medium',
});

// Delete a test case
await sdk.deleteTestCase(projectId, testCaseId);

Test Runs

// List test runs for a project
const testRuns = await sdk.listTestRuns(projectId);

// Get a specific test run
const testRun = await sdk.getTestRun(projectId, testRunId);

// Create a new test run
const newTestRun = await sdk.createTestRun(projectId, {
  name: 'Test Run Name',
  description: 'Test run description',
  test_plan_id: testPlanId, // optional
  status: 'in_progress',
});

// Update a test run
const updated = await sdk.updateTestRun(projectId, testRunId, {
  status: 'passed',
});

// Add test results to a test run
const testResult = await sdk.addTestResult(projectId, testRunId, {
  test_case_id: testCaseId,
  status: 'passed',
  execution_time: 1234, // milliseconds
  error_message: 'Error message if failed',
  stack_trace: 'Stack trace if failed',
});

// List test results for a test run
const results = await sdk.listTestResults(projectId, testRunId);

// Delete a test run
await sdk.deleteTestRun(projectId, testRunId);

Test Plans

// List test plans for a project
const testPlans = await sdk.listTestPlans(projectId);

// Get a specific test plan
const testPlan = await sdk.getTestPlan(projectId, testPlanId);

// Create a new test plan
const newTestPlan = await sdk.createTestPlan(projectId, {
  name: 'Test Plan Name',
  description: 'Test plan description',
  test_case_ids: [1, 2, 3, 4, 5],
});

// Update a test plan
const updated = await sdk.updateTestPlan(projectId, testPlanId, {
  test_case_ids: [1, 2, 3, 4, 5, 6],
});

// Delete a test plan
await sdk.deleteTestPlan(projectId, testPlanId);