Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
testcafe-reporter-allure-plus
Advanced tools
An Allure reporter plugin for TestCafé. Used to generate test reports for e2e-tests.
An Allure reporter plugin for TestCafé, based on Isaac's modifications.
Important: Keep in mind that these modifications are an implementation that suit specifically my use case, required by my client. That's why you will probably see some non-general metatags.
allure.config.js
to only have one base URLuser_story
and test_case
epic
and feature
if they are presentissue
if present, otherwise use test_case
story
if present, otherwise use user_story
bug
if presentA brief documentation to get up and running with this reporter
Install with npm:
npm install --save-dev testcafe-reporter-allure-plus
When you run tests from the command-line, specify the reporter name by using the --reporter
flag:
testcafe chrome 'path/to/test/file.js' --reporter allure-plus
When you use API, pass the reporter name to the reporter()
method:
testCafe
.createRunner()
.src('path/to/test/file.js')
.browsers('chrome')
.reporter('allure-plus') // <-
.run();
When using a general configuration file for TestCafe, use the reporter
attribute:
{
...
"reporter": {
"name": "allure-plus"
},
...
}
testcafe-reporter-allure-plus
as its based on @Isaac's changes, provides a default configuration that can be overriden with the use of allure.config.js
file, in the root of your directory.
The defaults for this file (allure.config.js
) are the following:
module.exports = {
REPORTER_CONFIG_FILE: './allure.config.js',
CATEGORIES_CONFIG_FILE: './allure-categories.config.js',
RESULT_DIR: './allure/allure-results',
REPORT_DIR: './allure/allure-report',
SCREENSHOT_DIR: './allure/screenshots',
CLEAN_RESULT_DIR: true,
CLEAN_REPORT_DIR: true,
CLEAN_SCREENSHOT_DIR: true,
ENABLE_SCREENSHOTS: true,
ENABLE_QUARANTINE: false,
ENABLE_LOGGING: false,
CONCURRENCY: 1,
META: {
SEVERITY: 'Normal',
PRIORITY: 'Medium',
JIRA_URL: 'https://jira.example.nl/browse/',
},
LABEL: {
ISSUE: 'JIRA Test Case',
EPIC: 'JIRA Epic',
STORY: 'JIRA User Story',
FLAKY: 'Flaky test',
SCREENSHOT_MANUAL: 'Screenshot taken manually',
SCREENSHOT_ON_FAIL: 'Screenshot taken on fail',
DEFAULT_STEP_NAME: 'Test Step',
},
};
And, the defaults for allure-categories.config.js
are the following:
module.exports = [
{
name: 'Ignored tests',
matchedStatuses: [Status.SKIPPED],
},
{
name: 'Product defects',
matchedStatuses: [Status.FAILED],
messageRegex: '.*Assertion failed.*',
},
{
name: 'Test defects',
matchedStatuses: [Status.FAILED],
},
{
name: 'Warnings',
matchedStatuses: [Status.PASSED],
messageRegex: '.*Warning.*',
},
{
name: 'Flaky tests',
matchedStatuses: [Status.PASSED, Status.FAILED],
messageRegex: '.*Flaky.*',
},
];
Metadata can be added to a test using the meta()
function. The metadata can be added to both test
and fixture
Metadata added to the fixture
will be inherited by all tests coupled in that fixture to avoid declaring metadata that is the same for all tests within the fixture multiple times.
This is a general example of the metadata added:
test.meta({
severity: Severity.TRIVIAL,
issue: 'TEST-ISSUE',
description: 'An example discription',
epic: 'Example Epic Ticket',
feature: 'Example Feature Ticket',
story: 'Example Story Ticket',
suite: 'Main Example Group',
// ... any other key: value property as custom metadata
})('Example test with metadata', async (t) => {
// Test Code
});
Important: Know that issue
, epic
, feature
and story
can generate links ONLY if they have the Jira ID encased in square brackets, for example: epic: '[EX-00001] Example Epic Ticket'
, will generate a link to [JIRA_URL]/EX-00001
With this reporter, test-steps
can be defined to split a test
into multiple step. The step function expects three values: the step name, the TestController
and the actions taken within the step as a TestControllerPromise
.
import step from 'testcafe-reporter-allure-plus/dist/utils';
test("Example test with steps", async t => {
await step("Add developer name to form", t,
t.typeText("#developer-name", "Jhon Smith")
);
await step("Submit form and check result", t,
t.click("#submit-button")
.expect(Selector("#article-header").innerText)
.eql("Thank you, John Smith!")
);
})
As we are basing our modifications on Isaac's work, our License as of yet would be MIT
FAQs
An Allure reporter plugin for TestCafé. Used to generate test reports for e2e-tests.
The npm package testcafe-reporter-allure-plus receives a total of 475 weekly downloads. As such, testcafe-reporter-allure-plus popularity was classified as not popular.
We found that testcafe-reporter-allure-plus demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.