allure-js-parser is a utility library designed to programmatically parse raw `allure-results` JSON files, typically generated by test frameworks that integrate with Allure Report. It converts these raw files into a structured, strongly typed JavaScript object, providing developers with a flexible foundation to analyze test outcomes, generate custom reports, calculate statistics, or integrate Allure data into other systems. The package is currently at version 0.1.0, indicating it's in its initial development phase, and has seen frequent patch and minor updates, reflecting active maintenance. Its primary differentiator is offering direct, typed programmatic access to Allure data for custom processing workflows, as opposed to relying solely on the standard Allure CLI for static report generation.
npm install allure-js-parserVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to parse Allure result files from a specified directory, filter tests by labels, and extract basic statistics. It creates temporary Allure JSON files for a runnable example.
Always pin to exact versions (e.g., `"allure-js-parser": "0.1.0"`) or use caret ranges carefully, and review changelogs for each update.
Ensure the path passed to `parseAllure` is a valid, existing directory that contains the `allure-results` JSON files.
Review the latest documentation for `parseAllure` options if you need to suppress or customize error logging for scenarios where the results directory is empty or contains no valid Allure files.
Verify that the path provided to `parseAllure` is correct and the directory exists. Ensure your test runner has generated Allure results in the specified location.
Inspect the JSON files in your `allure-results` directory for syntax errors. This often indicates an issue during the Allure result generation process by your test framework.
Ensure you are using `import { parseAllure } from 'allure-js-parser';` for ESM projects. For CommonJS, if support is available, ensure correct destructuring, though ESM is preferred.No dependency data recorded yet.