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
muslnode 18–226 runs
build_error
glibcnode 18–226 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.fixReview 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.fixInstall 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.fixUpgrade 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.
fixEnsure 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.
fixWrap 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.
fixEnsure you are importing models from the specific `qaseio.models` subpath: `import { ProjectCreate } from 'qaseio.models';` Audit
Dependencies
axiosrequiredHTTP client for API requests, frequently updated for security and features.