
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
allure-store
Advanced tools
A flexible and extensible store for reading, writing, and transforming Allure test results
A flexible and extensible store for reading, writing, and transforming Allure test results 1.
allure-store
provides a standardized interface (the AllureStore) to:
By abstracting the data access behind AllureReader
and AllureWriter
interfaces, allure-store
makes it simple to plug in custom storage backends, apply custom transformations, or integrate seamlessly into your CI/CD pipeline.
AllureStore
).allure-results
directory.AllureReader
and AllureWriter
interfaces to read from or write to any storage backend—databases, cloud storage, etc.Install with your preferred package manager:
npm install allure-store
# or
yarn add allure-store
If you have an existing allure-results
directory (produced by Allure or a tool that supports it):
import { fromDirectory } from 'allure-store';
(async () => {
const store = await fromDirectory('allure-results');
const allResults = await store.getAllResults();
console.log('All test results:', allResults);
const latestResults = await store.getLatestResults();
console.log('Latest results per historyId:', latestResults);
const categories = await store.getCategories();
console.log('Categories:', categories);
})();
You can also write categories, environment info, or even individual test results:
import { fromDirectory } from 'allure-store';
(async () => {
const store = await fromDirectory('allure-results', { overwrite: true });
await store.writeEnvironmentInfo({
NODE_ENV: 'production',
SERVICE_URL: 'https://api.example.com',
});
await store.writeCategories([
{ name: 'Product defects', matchedStatuses: ['failed'] },
{ name: 'Test defects', matchedStatuses: ['broken'] },
]);
})();
If your results are stored in a different system, implement the AllureReader
and AllureWriter
interfaces and provide them to fromConfig
:
import { fromConfig, AllureReader, AllureWriter } from 'allure-store';
const customReader: AllureReader = {
async getContainerIds() { /* ... */ },
async getResultIds() { /* ... */ },
async readContainer(id: string) { /* ... */ },
async readResult(id: string) { /* ... */ },
async readCategories() { /* ... */ },
async readEnvironmentInfo() { /* ... */ },
async readExecutorInfo() { /* ... */ },
};
const customWriter: AllureWriter = {
async writeCategories(categories) { /* ... */ },
async writeEnvironmentInfo(env) { /* ... */ },
async writeExecutorInfo(info) { /* ... */ },
async writeContainer(container) { /* ... */ },
async writeResult(result) { /* ... */ },
};
(async () => {
const store = await fromConfig({ reader: customReader, writer: customWriter });
const results = await store.getAllResults();
console.log('Custom source results:', results);
})();
allure-store
allure-store
provides an abstraction to still leverage Allure’s ecosystem.Contributions are welcome! Please see CONTRIBUTING.md for details on how to get started.
This project is licensed under the MIT License.
Note: allure-store
is not affiliated with the official Allure framework. It aims to provide a compatible and convenient way to handle Allure data. ↩
FAQs
A flexible and extensible store for reading, writing, and transforming Allure test results
The npm package allure-store receives a total of 4,585 weekly downloads. As such, allure-store popularity was classified as popular.
We found that allure-store demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.