npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

zephyr-helper

v1.2.3

Published

Zephyr integration tool

Downloads

25

Readme

zephyr-helper

Herramienta para la integración con zephyr.

Installation

npm install zephyr-helper

Usage

Cypress

import zephyr from 'zephyr-helper'

zephyr.cypress.uploadResults('your/path/to/mochawesome/.jsons', 'jiraProjectKey', 'jiraApiKey').then( (R) => { 
  console.log(R)
})

It's meant to read the mochawesome results, it has a multi country, multi architecture structure for the folder find, it looks for a zephyr folder with either BFF o API in the name:

CHILE - BFF as the folder name, with all the cycles inside:

  • Login
  • Onboarding
  • ETC

Feature Name in feature file should relate to that structure:

Feature: LOGIN CHILE
Feature: ONBOARDING CHILE

The test case should exist in zephyr, not necessarily in the cycles, and the scenario name should have the test case key added, as such:

Scenario: LOGIN SERVICE - Service response ok - TestCaseKey=IDK-T3620

It only works with reports from the cypress-mochawesome-reporters, other integrations may fail

Appium

For Appium, the uploadResults function works with a txt file generated by the process, and also needs an object passed to it with the app version data and country.


import zephyr from 'zephyr-helper'

const versionData = {
  "country": "CL",
  "so": "aos",
  "appVersion": "1.0.0,
  "codeVersion": "0000"
}

zephyr.appium.uploadResults('path/to/the/txt/files', 'jiraProjectKey', 'jiraApiKey', versionData).then(r => {

  console.log(r)

})

The txt files should have this format:

:white_check_mark: [Login - @IDK-T389] Scenario: Whatever [docID-66315754][Added:T391]

Where:

The first parameter can be:

  • :white_check_mark: for Pass
  • :no_entry: for Fail
  • :manual: for non automated cases

Inside the first square brackets we have two parameters:

  • On the left we have the feature, this should match with the zephyr cycle name, same as in cypress
  • On the right, after the minus sign, we have the zephyr test case key
  • At the end, there's a parameter called Added, it should have any test case related to the flow the case is running. Login could have some added depending of the case that's being evaluated.

Then we have two more functions

import zephyr from 'zephyr-helper'

const versionData = {
  "country": "CL",
  "so": "aos",
  "appVersion": "1.0.0,
  "codeVersion": "0000"
}

zephyr.appium.createCycleFolder(api_key, versionData).then((r) => {

  zephyr.appium.addTestCycles(api_key, versionData).then((r) => {

  })

})

These are used to create a folder after a new version of the app in said technology is created. There's some preparation needed for this to work correctly.

There's need to be a base folder created in the place where you want to have the version folder (it uses the number reference from the base folder, so is created in that same place).

What this means is, if you have a folder structure like this:

Chile

--Android

---Base Folder

--iOS

---Base Folder

The version folder will be created where the Base Folder is, and the addTestCycles function will copy all the test cycles in the base folder, onto the version folder, without the test cases.

License

ISC