Registry / testing / test-progress-tracker

test-progress-tracker

JSON →
library2.0.6jsnpmunverified

The `test-progress-tracker` library provides a utility to monitor and manage the progress of individual tests and entire test suites over time. It aims to offer insights into test execution status, which can be particularly useful for long-running test suites or within continuous integration environments to observe trends, identify regressions, or track performance changes. The current stable version is `2.0.6`. Its release cadence has been infrequent since its `v2.0.0` major release in late 2018, with the latest update in early 2022 primarily addressing bug fixes and dependency updates, suggesting the project is in a maintenance phase. A key differentiator is its focus on explicit test progress reporting, allowing granular tracking beyond simple pass/fail outcomes. It includes TypeScript type definitions, enhancing developer experience and type safety.

npm install test-progress-tracker
INSTALL
IMPORT
SIG · TEST-PROGRESS-TRAC
T
test-progress-tracker
testingjavascriptv2.0.6
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
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 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

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

createTracker
✓ import { createTracker } from 'test-progress-tracker';
✗ const createTracker = require('test-progress-tracker');
The library primarily uses named exports. Direct CommonJS `require` might work for the default export (if any) but is not the recommended approach, especially with TypeScript.
TestTracker
✓ import { TestTracker } from 'test-progress-tracker';
Imports the TypeScript interface for the tracker instance, useful for type hinting.
TestStatus
✓ import { TestStatus } from 'test-progress-tracker';
Imports the enum for defining test outcomes (e.g., Pass, Fail, Skip).

This quickstart demonstrates how to initialize the tracker, start and end individual tests with different statuses, report progress within a test, and finalize the overall test run.

import { createTracker, TestTracker, TestStatus } from 'test-progress-tracker'; async function runMockTests() { const tracker: TestTracker = createTracker({ suiteName: 'My Application E2E Suite', totalTests: 4, reporter: (testName, status, message?) => { console.log(`[${testName}] ${status.toUpperCase()}: ${message || ''}`); } }); console.log('Starting test suite...'); tracker.startTest('User Login Flow'); await new Promise(resolve => setTimeout(resolve, 300)); // Simulate async operation tracker.reportProgress('User Login Flow', 50, 'Authenticating user...'); await new Promise(resolve => setTimeout(resolve, 200)); tracker.endTest('User Login Flow', TestStatus.Pass, 'Successfully logged in.'); tracker.startTest('Data Fetch API'); await new Promise(resolve => setTimeout(resolve, 500)); tracker.endTest('Data Fetch API', TestStatus.Fail, 'API endpoint returned 500 error.'); tracker.startTest('Shopping Cart Interaction'); await new Promise(resolve => setTimeout(resolve, 400)); tracker.endTest('Shopping Cart Interaction', TestStatus.Pass, 'Items added and removed correctly.'); tracker.startTest('Payment Gateway Integration'); await new Promise(resolve => setTimeout(resolve, 100)); tracker.endTest('Payment Gateway Integration', TestStatus.Skip, 'Skipped due to external service downtime.'); tracker.finalize(); console.log('Test suite finished.'); } runMockTests();
Debug
Known issues
breakingVersion 2.0.0 introduced breaking changes related to the resulting output file structure. Direct compatibility with configurations or integrations relying on the previous file output might break.
fix
Review your build process and integration points when upgrading to v2.0.0 or later. Although the exact nature of the 'file changes' is not detailed, it implies potential changes in how the library's output is consumed or bundled.
affects: >=2.0.0
gotchaThe library primarily uses named exports (e.g., `createTracker`). Attempting to use a default import or a generic `require('test-progress-tracker')` without destructuring might result in `undefined` or an empty object.
fix
Always use named imports as demonstrated: `import { createTracker, TestTracker } from 'test-progress-tracker';`.
affects: >=1.0.0
gotchaWhile `v2.0.3` added Node.js 6 support, earlier `v2.x` versions might have had more restrictive Node.js environment requirements. Ensure your Node.js version is adequately supported.
fix
For optimal compatibility and features, use Node.js version 6 or newer. For modern development, using a current LTS Node.js version is always recommended.
affects: <2.0.3
Errors
Common errors & fixes
TypeError: createTracker is not a function
Incorrect import statement; `createTracker` was not properly destructured from the package.
fix
Ensure you are using named imports: `import { createTracker } from 'test-progress-tracker';`
Error: Test 'my-test-name' is already running.
Attempted to call `tracker.startTest()` for a test that has already been initiated and not yet ended.
fix
Ensure that `tracker.endTest()` is called for a test before `tracker.startTest()` is called again with the same test name, or use unique names for concurrent tests.
Cannot read properties of undefined (reading 'startTest')
The `tracker` object was not correctly initialized by calling `createTracker()` or the variable holding the tracker instance is out of scope.
fix
Verify that `const tracker = createTracker(...)` has been successfully executed and the `tracker` variable is accessible where `startTest` is called.
Upgrade
Version history
2.0.6latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
14
Amazon
1
OpenAI (training)
1
Resources
test-progress-tracker — npm install test-progress-tracker · libregistry