EKSRI
Eksri is a project which contains the simplified project for sending updates to JIRA X-RAY using Cypress
Getting Started
Simply install via npm:
npm install @resller8/eksri
Usage
Initialization
var xray = new eksri({
url, //URL for XRAY Authentication
apiUrl, //API URL for sending the update to XRAY
apiJsons, //JSON header
id, //XRAY ID
secret, //Secret Token
testPlanId, //Test Plan ID
});
}
Connecting to XRAY and get the token
xray.initialization().then((response) => {
Cypress.env("xray", {token : response.body})
});
Sending test plan update
xray.sendUpdates(
Cypress.env("xray").token,
Cypress.moment(tests.wallClockStartedAt.toString()).toJSON(),
Cypress.moment(tests.wallClockStartedAt.toString())
.add(tests.duration, "milliseconds")
.toJSON(),
ticket, //JIRA Ticket
tests.state, //Cypress tests
msg, //comments
"Updating JIRA test plan status" //description
);