qansigliere-xray-cloud-api-integration
v0.0.4
Published
The main idea of this library created in the JavaScript language is to provide a ready-made set of API methods for integration with Xray Cloud
Maintainers
Readme
XrayCloudAPIIntegration
The main idea of this library created in the JavaScript language is to provide a ready-made set of API methods for integration with Xray Cloud
Author
https://www.youtube.com/@QANSIGLIERE/
Support the project
https://buymeacoffee.com/qansigliere
Installation
Using npm npm i qansigliere-xray-cloud-api-integration
How to use it
Create a *.env file
Create any *.env file (like xraycloud.env) and write the following information in the created file
export XRAY_CLIENT_ID="__YOUR_CLIENT_ID__"
export XRAY_CLIENT_SECRET="__YOUR_CLIENT_SECRET__"Make the *.env file works
Just run in the terminal the following command: source xraycloud.env
Authentication - Rest v2
Authenticate
The documentation is present here
(async function API() {
let newIntegration = new XRAYCloud_API();
let request = await newIntegration.postAuthenticate();
console.log(JSON.stringify(request.response));
})();Import Execution Results - REST v2
Importing Execution Results
Xray JSON Results
The documentation is present here
(async function API() {
let newIntegration = new XRAYCloud_API();
let request = await newIntegration.postXrayJSONResults({
testExecutionKey: 'DEMO-10153',
tests: [
{
testKey: 'DEMO-1761',
start: '2025-03-21T11:47:35+01:00',
finish: '2025-03-21T11:50:56+01:00',
comment: 'Successful execution',
status: 'PASSED',
},
],
});
console.log(JSON.stringify(request));
})();Improvements & Suggestions
https://forms.gle/GZbS9hw42tSYJxKL7
