Skip to content

azrimangsor/cypress-zephyr-scale-integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cypress & Zephyr Scale Integration Cypress.io

Problem Statement 😵

I have a project in which the project team wanted to view the test execution of the Cypress test. We also utilise Zephyr as our test case management. I have been searching for ways to integrate these two, Zephyr & Cypress; however, I can't find a proper solution that fits my need

Solution 💡

I have developed a work-in-progress project to enhance Zephyr Scale integration with Cypress. My goal is to introduce a user-friendly update that adds a test cycle every time a cypress test is performed. This update will ensure that each associated test case is promptly updated with a status of either 'Passed,' 'Failed,' or 'Skipped'. With these improvements, it aims to streamline the testing process and provide clearer insights into the test results.

Will make further enhancements when time permits.

What does it do? ✔️

  • Create a test cycle every time cypress test is executed by utilise Cypress hook ( before() & eachAfter() )
  • Only update the status of associated test cases

What is it not? ❌

  • Does not update the test step
  • Does not update beyond these initial setup statuses 'Passed,' 'Failed,' or 'Skipped'
  • Does not update the start and end time of each test

Requirement:

  • Valid Zephyr Scale API Access Token
  • Valid Zephyr Test Case ID

How it works:

A valid Zephyr Scale API access token is required for the integration to work. The token can be obtained by clicking on your profile icon in Zephyr

image

Click on the Create access token button to generate the access token

image

Once the button click, a pop-up will appear with the access token

image

Copy the token and place it inside the cypress environment file. In this project, I refer to bearer token variable

graph LR
A((Test Start)) --> B[Before Hook] --> C{Create Test Cycle} -- Yes --> D(Cypress Test Execute) --> F[After Each Hook] --> G{Status} -- status --> H[Zephyr Test Case]
C -- No --> E[Error Exception]
Loading

For this integration to work, the test case reference require in each of the Cypress test title. Following are examples of how can you write the title

tag = 'PROJ-T1'
it(`${tag} - User Details - Fields Validation`, () => {
    ...
})

or

it(`PROJ-T1 - User Details - Fields Validation`, () => {
  ...
})

Releases

No releases published

Packages

No packages published