Registry / testing / testingbot-api

testingbot-api

JSON →
library1.2.0jsnpmunverified

Official Node.js client for the TestingBot REST API, version 1.2.0. Provides full coverage of TestingBot cloud-based cross-browser testing infrastructure: session management, test artifacts, screenshots, tunnels, builds, team management, and codeless tests. Supports both callback and async/await patterns, includes TypeScript types, typed error classes, and built-in workflow helpers (auto-pagination, polling, batch operations, statistics). Releases are periodic via npm.

testingdevops
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Default export; CommonJS require gives the class directly. Named export TestingBot does not exist.

import TestingBot from 'testingbot-api'

Named exports available for error classes. Can also be destructured from require.

import { AuthenticationError } from 'testingbot-api'

One of the typed error classes exported as named export.

import { RateLimitError } from 'testingbot-api'

Initializes the client with environment variables, fetches browser list, and lists tests with pagination handling.

import TestingBot from 'testingbot-api'; const tb = new TestingBot({ api_key: process.env.TESTINGBOT_KEY ?? '', api_secret: process.env.TESTINGBOT_SECRET ?? '' }); // Get browser list (returns plain array) tb.getBrowsers() .then((browsers) => { console.log(`Available browsers: ${browsers.length}`); }) .catch((err) => { console.error('Error:', err.message); }); // Get sessions (paginated) using async/await async function listSessions() { try { const { data, meta } = await tb.getTests({ limit: 10 }); console.log(`Page ${meta.offset} of ${Math.ceil(meta.total / 10)}, showing ${data.length} tests`); } catch (err) { console.error('Error:', err.message); } } listSessions();
Debug
Known footguns
breakingNode.js >= 18 required. Earlier versions are not supported.
gotchaList endpoints (getTests, getBuilds, getStorageFiles, getScreenshotList, getCodelessTests, getUsersInTeam) return an object with data and meta, not a plain array. Access the array via .data.
gotchaErrors are typed, so catch should handle specific error classes like AuthenticationError, RateLimitError, ValidationError, etc.
deprecatedCallback style support may be removed in future major versions.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
10 hits · last 30 days
gptbot
3
bingbot
1
Resources