
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
junit-xray-cypress-reporter
Advanced tools
The reporter is built on the top of mocha-junit-reporter v2.2.1 so all the configurations in the official doc, are inherited from this npm package. This reporter offers the ability to specify a Jira-Issue for each it{} inside your cypress test and creates
This reporter offers the ability to specify a Jira-Issue for each it{} inside your cypress test and creates a custom report that is easy to load into XRAY. The reporter helps you to integrate your Cypress/Mocha test with XRay easily by producing enriched JUnit-style XML test report files which can be uploaded into XRay with API or other tools.
This reporter is built on the top of mocha-junit-reporter v2.2.1 so all the configurations in the official doc, are inherited from this npm package.
JUnit Xray Reporter is a custom reporter for use with:
As a dev module:
$ npm install junit-xray-cypress-reporter --save-dev
or as a global module:
$ npm install -g junit-xray-cypress-reporter
describe('My First Test', () => {
it('Does not do much!', {jiraKey:"CALC-1234"}, () => {
or
it('Does not do much!', {jiraID:"CALC-1234"}, () => {
expect(true).to.equal(true);
})
})
Every others {reporterOptions} explained here: mocha-junit-reporter v2.2.1 are availabile.
const { defineConfig } = require("cypress");
module.exports = defineConfig({
reporter: "junit-xray-cypress-reporter",
reporterOptions: {
mochaFile: "cypress/results/my-test-output-[hash].xml"
},
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
},
},
});
$ npm install junit-xray-cypress-reporter --save-dev
const { defineConfig } = require("cypress");
module.exports = defineConfig({
reporter: "junit-xray-cypress-reporter",
reporterOptions: {
mochaFile: "cypress/results/my-test-output-[hash].xml"
},
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
},
},
});
'mochaFile' is the path to the report file. When there are several test files run it will generate a report file for each test file, so in order to generate unique file names and not overwrite the existing ones, the [hash]
is added to the name of the report file.
describe('My First Test', () => {
it('Does not do much!', {jiraKey:"CALC-1234"}, () => {
expect(true).to.equal(true);
})
})
npx cypress run --spec "path/to/file"
Report file generated at '<Cypress_project_root>/cypress/results'.
"my-test-output-828a1c4885dc687b1a19e11e24b9437e.xml"
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="Mocha Tests" time="0.1070" tests="1" failures="0">
<testsuite name="Root Suite" timestamp="2023-01-27T13:51:23" tests="0" file="cypress\e2e\test.cy.js" time="0.0000" failures="0">
</testsuite>
<testsuite name="My First Test" timestamp="2023-01-27T13:51:23" tests="1" time="0.0700" failures="0">
<testcase name="My First Test Does not do much!" time="0.0820" classname="Does not do much!">
<properties>
<property name="test_key" value="CALC-1234"/>
</properties>
</testcase>
</testsuite>
</testsuites>
As you can see the property has beenn added and now could be readed correctly by XRay.
<properties>
<property name="test_key" value="CALC-1234"/>
</properties>
You just update this repo to the newest version and u get this error? Dont worry, the solution is easy.
The old and deprecated configuration was:
describe('My First Test', () => {
it('Does not do much!', {xray:{jiraID:"CALC-1234"}}, () => {
expect(true).to.equal(true);
})
})
Now I made it more easyer and clean:
describe('My First Test', () => {
it('Does not do much!', {jiraID:"CALC-1234"}, () => {
expect(true).to.equal(true);
})
})
or
describe('My First Test', () => {
it('Does not do much!', {jiraKey:"CALC-1234"}, () => {
expect(true).to.equal(true);
})
})
In VS code you can search for this string (ATTENTION: spaces and type of quotation marks can change can be single ' or double "):
xray:\{jiraID:"(.*?)"\}
and replace it with
jiraKey:"$1"
Happy testing to everyone!
ALEC-JS
FAQs
The reporter is built on the top of mocha-junit-reporter v2.2.1 so all the configurations in the official doc, are inherited from this npm package. This reporter offers the ability to specify a Jira-Issue for each it{} inside your cypress test and creates
The npm package junit-xray-cypress-reporter receives a total of 1 weekly downloads. As such, junit-xray-cypress-reporter popularity was classified as not popular.
We found that junit-xray-cypress-reporter demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.