cypress-zapi-util
This library help us to create a test cycle after cloning from an existing one. After creating cycle (or use an existing), library can update the test results in Jira-Zephyr
cypress.json
"env": "dryRun": false //true: if you are running test locally and DONT want to update results in Jira-Zephyr "jiraProjectId": "18881" //project id from Jira "cycleIdToBeClone": "3553" //cycle to be cloned "cloneCycle": false // true: if you want to clone new cycle, false: if you want to update results in an existing cycle "versionId": "" //Use numeric value i.e 28921 for released and -1 /blank for unreleased "errorFilePath": "D:\\Work\\Error.txt" //some file for storing error and exceptions "apiBaseURL": "https://jira.mycompany.com/rest/zapi/latest" "auth": "ZZyyxx" //basic auth token "rootFolderScreenShot": "D:\\Work\\Cypress\\Code\\cypress\\screenshots\\" //screenshots root folder "cycleIdFile": "D:\\Work\\Cypress\\Code\\cypress\\screenshots\\cycle.txt" //file where we store cycle id.
In case you want to clone new cycle make sure you change cloneCycle to true and delete existing cycle text file which is configured cycleIdFile
Installation
npm i cypress-zapi-util
Usage
cypress\support
Create base.js
var ZAPI = ;var path = ;
Add base.js to cypress\support\index.js
cypress\plugins\index.js
const fs = const path = ; module { };
Example for taking screenshot and uploading
var ZAPI = ;
Example for getting duplicate test cases in cycle folders
CycleFoldersScanReportForDuplicateTestCases.txt will be generated under user's Download folder
var ZAPI = ;