Registry / crm-productivity / qaseio

qaseio

JSON →
library4.0.2jsnpmunverified

The `qaseio` package provides a JavaScript client for interacting directly with the Qase Test Management System (TMS) API. It offers a comprehensive set of functionalities to programmatically manage various entities within Qase, including projects, test cases, test suites, milestones, shared steps, test plans, test runs, test run results, defects, custom fields, and attachments. The current npm version is 2.4.3, though the project's monorepo includes more recently updated sub-packages like `qase-javascript-commons` (v2.6.4) and various framework-specific reporters (e.g., `qase-jest` v2.3.0). This package is primarily intended for developers who need to build custom integrations with the Qase API or create bespoke test reporters for niche testing frameworks. A key differentiator and warning is that for common testing frameworks like Jest, Cypress, Playwright, TestCafe, or Mocha, the project strongly recommends using their dedicated, framework-specific reporter packages (e.g., `@qase-tms/qase-jest`) instead of this generic `qaseio` client, which is geared towards lower-level API interactions.

npm install qaseio
INSTALL
IMPORT
SIG · QASEIO
Q
qaseio
crm-productivityjavascriptv4.0.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

QaseApi
import { QaseApi } from 'qaseio';
const { QaseApi } = require('qaseio');
While CommonJS `require` might work, ESM `import` is the preferred modern syntax and provides better TypeScript support.
ProjectCreate
import { ProjectCreate } from 'qaseio.models';
import { ProjectCreate } from 'qaseio';
Models like `ProjectCreate` are exposed via a specific subpath `qaseio.models` rather than the root package entry.
QaseApi
const qaseio = require('qaseio'); const qase = new qaseio.QaseApi({ ... });
For CommonJS environments, the library exports QaseApi directly on the root object. Avoid destructuring directly from `require('qaseio')` as shown in the wrong example for ESM.

This example demonstrates how to initialize the Qase API client, fetch all available projects, create a new project, and check for its existence using environment variables for authentication.

import { QaseApi, ProjectCreate } from 'qaseio'; const QASE_API_TOKEN = process.env.QASE_API_TOKEN ?? ''; const PROJECT_CODE = process.env.QASE_PROJECT_CODE ?? 'PRJCODE'; const qase = new QaseApi({ token: QASE_API_TOKEN, }); async function manageQaseProjects() { if (!QASE_API_TOKEN) { console.error('QASE_API_TOKEN environment variable is not set.'); return; } try { console.log('Fetching all projects...'); const allProjects = await qase.projects.getAll(); console.log('All Projects Data:', allProjects.data); const newProjectTitle = `My New Project ${Date.now()}`; const newProjectCode = `NPRJ${Date.now().toString().slice(-4)}`; console.log(`Creating a new project: ${newProjectTitle} (${newProjectCode})...`); const prj = new ProjectCreate(newProjectTitle, newProjectCode); const createdProject = await qase.projects.create(prj); console.log('Created Project:', createdProject.data); console.log(`Checking if project ${newProjectCode} exists...`); const projectExists = await qase.projects.exists(newProjectCode); console.log(`Project ${newProjectCode} exists:`, projectExists); } catch (error) { console.error('An error occurred:', error.response ? error.response.data : error.message); } } manageQaseProjects();
Debug
Known issues
deprecatedThe `qaseio` package itself is explicitly marked as deprecated within the Qase JavaScript monorepo (e.g., in `qase-javascript-commons-v2.6.2` changelog). Users should consider migrating to specific reporter packages or newer API clients if available.
fix
Review Qase TMS official documentation for the recommended API client or reporter for new projects. For existing projects, evaluate the impact of deprecation.
affects: >=2.6.2 (of qase-javascript-commons, indicating deprecation of this base package)
gotchaFor integrating with common testing frameworks (e.g., Jest, Cypress, Playwright, Mocha), Qase recommends using their dedicated framework-specific reporter packages (e.g., `@qase-tms/qase-jest`, `@qase-tms/qase-cypress`) instead of the generic `qaseio` client. This package is intended for custom integrations and specialized reporters.
fix
Install the appropriate Qase reporter package for your testing framework (e.g., `npm install @qase-tms/qase-jest`) and follow its specific configuration instructions.
affects: >=1.0.0
gotchaThe package requires Node.js version 14 or higher. Running in older Node.js environments may lead to unexpected errors or unsupported features.
fix
Upgrade your Node.js environment to version 14 or later. Use a Node.js version manager like `nvm` to easily switch versions.
affects: <14.0.0 (Node.js)
Errors
Common errors & fixes
Error: Request failed with status code 401
The Qase API token provided is missing or invalid, leading to an authentication failure.
fix
Ensure the `token` passed to `new QaseApi()` is a valid API token obtained from your Qase TMS account (personal API tokens page or app integrations page) and that it has the necessary permissions. Use environment variables like `process.env.QASE_API_TOKEN` to manage tokens securely.
Cannot read properties of undefined (reading 'data')
This often occurs when an API call fails, and the `res` object (AxiosResponse) does not contain the expected `data` property, or the `res.data` itself is not the expected structure.
fix
Wrap API calls in `try...catch` blocks. Inspect the `error.response` object in the catch block to get details like status code and error messages from the API (`error.response.data`). This helps in debugging unexpected API responses.
TypeError: ProjectCreate is not a constructor
Attempting to use `ProjectCreate` (or similar models) without importing it from the correct subpath.
fix
Ensure you are importing models from the specific `qaseio.models` subpath: `import { ProjectCreate } from 'qaseio.models';`
Upgrade
Version history
4.0.2latest on npm
Audit
Dependencies
axiosrequiredHTTP client for API requests, frequently updated for security and features.
Agent activity
38 hits · last 30 days
node
34
OpenAI (training)
1
Resources
qaseio — npm install qaseio · libregistry