{"id":49502,"library":"testingbot-api","title":"testingbot-api","description":"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.","status":"active","version":"1.2.0","language":"javascript","source_language":"en","source_url":"git://github.com/testingbot/testingbot-api","tags":["javascript","testingbot","testingbot-api","testingbot-nodejs","testing","automation","selenium","cross-browser","api-client","typescript"],"install":[{"cmd":"npm install testingbot-api","lang":"bash","label":"npm"},{"cmd":"yarn add testingbot-api","lang":"bash","label":"yarn"},{"cmd":"pnpm add testingbot-api","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Used for CLI commands","package":"commander","optional":true},{"reason":"HTTP client for API requests","package":"axios","optional":false}],"imports":[{"note":"Default export; CommonJS require gives the class directly. Named export TestingBot does not exist.","wrong":"const TestingBot = require('testingbot-api').TestingBot","symbol":"TestingBot","correct":"import TestingBot from 'testingbot-api'"},{"note":"Named exports available for error classes. Can also be destructured from require.","wrong":"const AuthenticationError = require('testingbot-api').AuthenticationError","symbol":"AuthenticationError","correct":"import { AuthenticationError } from 'testingbot-api'"},{"note":"One of the typed error classes exported as named export.","wrong":"","symbol":"RateLimitError","correct":"import { RateLimitError } from 'testingbot-api'"}],"quickstart":{"code":"import TestingBot from 'testingbot-api';\n\nconst tb = new TestingBot({\n  api_key: process.env.TESTINGBOT_KEY ?? '',\n  api_secret: process.env.TESTINGBOT_SECRET ?? ''\n});\n\n// Get browser list (returns plain array)\ntb.getBrowsers()\n  .then((browsers) => {\n    console.log(`Available browsers: ${browsers.length}`);\n  })\n  .catch((err) => {\n    console.error('Error:', err.message);\n  });\n\n// Get sessions (paginated) using async/await\nasync function listSessions() {\n  try {\n    const { data, meta } = await tb.getTests({ limit: 10 });\n    console.log(`Page ${meta.offset} of ${Math.ceil(meta.total / 10)}, showing ${data.length} tests`);\n  } catch (err) {\n    console.error('Error:', err.message);\n  }\n}\n\nlistSessions();","lang":"typescript","description":"Initializes the client with environment variables, fetches browser list, and lists tests with pagination handling."},"warnings":[{"fix":"Upgrade Node.js to 18 or later.","message":"Node.js >= 18 required. Earlier versions are not supported.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Use response.data to get the array, response.meta for pagination info.","message":"List endpoints (getTests, getBuilds, getStorageFiles, getScreenshotList, getCodelessTests, getUsersInTeam) return an object with data and meta, not a plain array. Access the array via .data.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Import and catch specific error types: import { AuthenticationError } from 'testingbot-api'.","message":"Errors are typed, so catch should handle specific error classes like AuthenticationError, RateLimitError, ValidationError, etc.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use async/await instead of callbacks.","message":"Callback style support may be removed in future major versions.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.2.0':13 'api':3,11,73,84 'api-cli':83 'artifact':30 'async/await':43 'auto':58 'auto-pagin':57 'autom':78 'base':21 'batch':61 'browser':24,82 'build':33 'built':53 'built-in':52 'callback':41 'class':50 'client':6,85 'cloud':20 'cloud-bas':19 'codeless':37 'coverag':16 'cross':23,81 'cross-brows':22,80 'error':49 'full':15 'helper':56 'includ':45 'infrastructur':26 'javascript':69 'manag':28,35 'node.js':5 'nodej':76 'npm':68 'offici':4 'oper':62 'pagin':59 'pattern':44 'period':66 'poll':60 'provid':14 'releas':64 'rest':10 'screenshot':31 'selenium':79 'session':27 'statist':63 'support':39 'team':34 'test':25,29,38,77 'testingbot':2,9,18,70,72,75 'testingbot-api':1,71 'testingbot-nodej':74 'tunnel':32 'type':47,48 'typescript':46,86 'version':12 'via':67 'workflow':55","created_at":"2026-06-07T17:02:06.220377+00:00","updated_at":"2026-06-07T17:02:06.220377+00:00","problems":[{"fix":"Run `npm install testingbot-api` and ensure import path is correct: `import TestingBot from 'testingbot-api'`.","cause":"Package not installed or imported incorrectly.","error":"Cannot find module 'testingbot-api'"},{"fix":"Use `import TestingBot from 'testingbot-api'` or `const TestingBot = require('testingbot-api')`.","cause":"Using wrong import pattern, e.g., destructuring from default export.","error":"TypeError: TestingBot is not a constructor"},{"fix":"Set TESTINGBOT_KEY and TESTINGBOT_SECRET environment variables, or pass them in constructor options.","cause":"Missing or incorrect api_key / api_secret.","error":"AuthenticationError: Invalid API credentials"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/testingbot/testingbot-api","github":"git://github.com/testingbot/testingbot-api","docs":null,"changelog":null,"pypi":null,"npm":"testingbot-api","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}