Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
allure-js-commons
Advanced tools
The allure-js-commons package is a JavaScript library that provides a common set of utilities for generating Allure reports. Allure is a flexible, lightweight multi-language test report tool that not only shows a very concise representation of what has been tested in a neat web report form but also allows everyone participating in the development process to extract maximum of useful information from everyday execution of tests.
Creating Test Suites
This feature allows you to create and manage test suites. The code sample demonstrates how to start and end a test suite using the AllureRuntime and InMemoryAllureWriter.
const { AllureRuntime, InMemoryAllureWriter } = require('allure-js-commons');
const runtime = new AllureRuntime({ writer: new InMemoryAllureWriter() });
const suite = runtime.startGroup('My Test Suite');
suite.endGroup();
Logging Test Steps
This feature allows you to log individual test steps within a test case. The code sample demonstrates how to start and end a test step within a test case.
const { AllureRuntime, InMemoryAllureWriter } = require('allure-js-commons');
const runtime = new AllureRuntime({ writer: new InMemoryAllureWriter() });
const test = runtime.startTest('My Test');
const step = test.startStep('My Step');
step.endStep();
test.endTest();
Attaching Files
This feature allows you to attach files to your test cases. The code sample demonstrates how to attach a screenshot to a test case.
const { AllureRuntime, InMemoryAllureWriter } = require('allure-js-commons');
const runtime = new AllureRuntime({ writer: new InMemoryAllureWriter() });
const test = runtime.startTest('My Test');
test.addAttachment('Screenshot', 'image/png', Buffer.from('...'));
test.endTest();
Mochawesome is a custom reporter for use with the JavaScript testing framework, Mocha. It generates a standalone HTML/CSS report to help visualize your test results. Compared to allure-js-commons, mochawesome is more tightly integrated with Mocha and provides a more visually appealing report out of the box.
jest-html-reporter is a Jest test results processor that creates a simple HTML report. It is specifically designed for use with Jest, whereas allure-js-commons is more flexible and can be used with multiple testing frameworks.
cucumber-html-reporter is a Cucumber.js reporter that generates a HTML report. It is specifically designed for use with Cucumber.js, while allure-js-commons supports multiple testing frameworks and provides more detailed reporting capabilities.
Common utilities for Allure framework JavaScript integrations
Interface for Allure to be used from Javascript and TypeScript. There you can find primitives to create custom integrations for the javascript testing frameworks.
Allure allows to use environment variables for setting test labels.
Using ALLURE_LABEL_{{labelName}}={{labelValue}}
syntax you can set common labels for all of your tests.
ALLURE_LABEL_epic="Story 1" npm test
FAQs
Allure JS Commons
The npm package allure-js-commons receives a total of 456,844 weekly downloads. As such, allure-js-commons popularity was classified as popular.
We found that allure-js-commons demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.