
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
agent-js-cypress
Advanced tools
Cypress js agent is runtime reporter for EPAM report portal which provides information about collection run.
$ npm install agent-js-cypress --save-dev
$ npm install reportportal-client --save-dev
Add the following options to cypress.json
{
"reporter": "agent-js-cypress/rp-reporter.js",
"reporterOptions": {
"endpoint": "http://your-instance.com:8080/api/v1",
"token": "00000000-0000-0000-0000-000000000000",
"launch": "LAUNCH_NAME",
"project": "PROJECT_NAME",
"description": "PROJECT_DESCRIPTION",
"isLaunchMergeRequired": true
}
}
Create folder "scripts" on project folder. Copy the following script into "cypress.js" file and put in to "scripts" folder.
const cypress = require('cypress'),
RPClient = require('reportportal-client')
fs = require('fs'),
glob = require("glob");
const cypressConfigFile = "cypress.json";
const getLaunchTempFiles = () => {
return glob.sync("rplaunch-*.tmp");
}
const deleteTempFile = (filename) => {
fs.unlinkSync(filename);
}
cypress.run().then(
() => {
fs.readFile(cypressConfigFile, 'utf8', function (err, data) {
if (err) {
throw err;
}
let config = JSON.parse(data);
if (config.reporterOptions.isLaunchMergeRequired) {
let client = new RPClient(config.reporterOptions);
client.mergeLaunches();
let files = getLaunchTempFiles();
files.map(deleteTempFile);
}
});
},
error => {
console.error(error)
let files = getLaunchTempFiles();
files.map(deleteTempFiles);
process.exit(1)
}
);
"scripts": {
...
"cypress": "node scripts/cypress.js",
...
},
Runs support following options:
Parameter | Description |
---|---|
token | User's Report Portal toke from which you want to send requests. It can be found on the profile page of this user. |
endpoint | URL of your server. For example 'https://server:8080/api/v1'. |
launch | Name of launch at creation. |
project | The name of the project in which the launches will be created. |
debug | Determines whether Cypress run should be logged in details. |
isLaunchMergeRequired | Determines merge Cypress run's in to one launch or not |
Curently supported only default usage of Cypress screenshot function. Using custom filename is not supported yet. Will be added in future versions.
cy.screenshot()
cy.get('.post').screenshot()
Licensed under the Apache License v2.0
Implemented and supported by Ahold Delheize
FAQs
This agent helps Cypress to communicate with Report Portal
The npm package agent-js-cypress receives a total of 432 weekly downloads. As such, agent-js-cypress popularity was classified as not popular.
We found that agent-js-cypress 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.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.