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

railflow-zephyr

v2.0.5

Published

Railflow for Zephyr's Command Line Interface (CLI) is wrapper around the [Zephyr](https://smartbear.com/test-management/zephyr/) REST API and allows users to process a variety of testing framework reports from any CICD system and automatically export them

Downloads

7

Readme

Railflow Zephyr

Railflow for Zephyr's Command Line Interface (CLI) is wrapper around the Zephyr REST API and allows users to process a variety of testing framework reports from any CICD system and automatically export them to Zephyr. The CLI provides a host of options so that you can display test reports per your needs.

Requirements

  1. NodeJS - v14.17.0 or higher.

Installation

CLI is a NPM based utility. Installing CLI is as simple as installing any other npm package.

$ npm install railflow-zephyr

Licensing

Railflow for Zephyr is a commercial product and requires license to run. You can get a free 14-day evaluation license by contacting Railflow support.

Command Reference

Note: Use double quotes for argument values with spaces. Example: --project "demo project"

Note: CLI will automatically create test cases, cycles, executions, etc. if they do not exist.

| Key | Description | Example | | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | -v, --version | Prints CLI version | -v | | -k, --key | (either-k or -l is required) License key for online activationCan be set with RAILFLOW_ZEPHYR_LICENSE environment variable | -k XXXXX-XXXXX-XXXXX-XXXXX | | -l, --license-file | (either-k or -l is required) License file path or remote URL file for offline activation | -l ./license.skm | | -t, --access-token | (required) Zephyr Scale Access Token. Can be set withZEPHYR_SCALE_ACCESS_TOKEN environment variable | -t XXXXXXxxxXXXXXXXXXXxXXX | | -p, --project | (required) The key of the corresponding Atlassian Jira project for which Zephyr Scale integration is enabled | -p ZT | | -f, --format | (required) Report format: JUnit, TestNg, TestNg-Steps, Cucumber (case insensitive) | -f JUnit | | -r, --report-files | (required) The file path(s) to the test report file(s) generated during the build. User can pass multiple values separated with spaces.Ant-style patterns such as **/surefire-reports/*.xml can be used. E.g. use target/surefire-reports/*.xml to capture all XML files in target/surefire-reports directory. | -r target/surefire-reports/*.xml target/failsafe-reports/*.xml | | -sm, --search-mode | (required) Specifies the test case lookup algorithm.name - search for test case matching the name within the entire Zephyr Scale. If test case found, update the test case. If test case not found, create a new test case within specified --case-pathpath - search for test case matching the name within the specified --case-path. If test case found, update the test case. If test case not found, create a new test case within specified --case-path | -sm path | | -cp, --case-path | (optional) Path in Zephyr Scale where test cases should be exported into | -cp "Folder One/Folder Two" | | -cyp, --cycle-path | (optional) Path in Zephyr Scale where test cycle should be exported into | -cyp "Folder One/Folder Two" | | -cn, --cycle-name | (optional) Test cycle name in Zephyr Scale | -cn "My TestCycle" | | -cyf, --cycle-fields | (optional) Values for test cycle custom fields in Zephyr Scale. The format is"[Field label]=[value]" "[Field label 2]=[value]" | -cyf "Cycle Field 1=value 1" "Cycle Field 2=value 2" | | -cf, --case-fields | (optional) Values for test case custom fields in Zephyr Scale. The format is"[Field label]=[value]" "[Field label 2]=[value]" | -cf Case Field 1=value 1" "Case Field 2=value 2" | | -ef, --execution-fields | (optional) Values for test execution custom fields in Zephyr Scale. The format is"[Field label]=[value]" "[Field label 2]=[value]" | -ef "Execution Field 1=value 1" "Execution Field 2=value 2" | | -sf, --step-fields | (optional) Values for test step custom fields in Zephyr Scale. The format is"[Field label]=[value]" "[Field label 2]=[value]" | -sf "Step Field 1=value 1" "Step Field 2=value 2" | | -e, --environment | (optional) The name of an environment in Zephyr Scale | -e "Linux" | | -ls, --labels | (optional) Zephyr Scale labels, separated with space. E.g."Label1" "Label2" ..." | -ls "Label1" "Label2" | | -cpr, --case-priority | (optional) The name of a priority to be set for test cases | -cpr High | | -um, --upload-mode | (optional) Upload mode: 0 (default) - create new test cases and do not overwrite existing ones;1 - create new cases and overwrite existing ones;2 - do not create new cases and overwrite existing ones;3 - do not create new cases and do not overwrite existing ones. | -um 1 | | -cc, --close-test-cycle | (optional) If Zephyr Scale should set the corresponding test cycle status to 'Done' after uploading test results | -cc | | -dg, --disable-grouping | (optional) If Railflow Zephyr should ignore report structure and just upload all tests into a folder which is set by--case-path parameter | -dg | | -a, --assign | (optional) Smart Test Failure Assignment. Comma-separated list of Jira user email IDs. CLI will assign failures to those users based on a round robin algorithm | -a "[email protected],[email protected]" | | -af, --assign-file | (optional) Smart Test Failure Assignment. Path to a file containing list of Jira user email IDs. Note: One user email ID per line | -af ./assignees.txt | | -jurl, --jira-url | (required if -a or -af is set) Jira URL for Smart Test Failure Assignment feature | -jurl https://your-domain.atlassian.net | | -ju, --jira-user | (required if -a or -af is set) Jira user email ID for Smart Test Failure Assignment feature - it is used for fetching user IDs for email ID provided by -a or -af flags. The user must have the "Browse users and groups" Atlassian Jira global permission | -ju [email protected] | | -jt, --jira-token | (required if -a or -af is set) Jira API token (password is not allowed) for Smart Test Failure Assignment feature | -jt xxxxxxxxxxxxxx | | -ds, --disable-stats | (optional) Disable collecting usage and error logs | -ds | | -px, --proxy | (optional) HTTP(S) or SOCKS proxy configuration | -px socks://username:[email protected]:1080 | | -ti, --timeout | (optional) Upload timeout (seconds) | -ti 60 |

npx railflow-zephyr -k XXXXX-XXXXX-XXXXX-XXXXX -t xxxxxxxxxxxxxxxxxx -p JT -f junit -r "./target/surefire-reports/*.xml" -sm path

Using Environment Variables

Sometimes it is not secure or not convenient to pass sensitive data directly in the CLI invocation script (e.g. in CICD environments), so Railflow exposes several environment variables which users can use instead of passing corresponding arguments directly.

If --key or --access-token arguments are not provided, Railflow will use the values from the corresponding environment variables: RAILFLOW_ZEPHYR_LICENSE or ZEPHYR_SCALE_ACCESS_TOKEN respectively.

Updating custom fields in Zephyr Scale

Zephyr Scale allows users to create custom fields for different objects and with variety of types, e.g. String, number, decimal, date, etc... In order to set values to such fields properly, Railflow provides the following functions:

| Type | Example | | ------- | -------------------------------------------- | | String | some value | | Integer | zephyr.int(42) | | Float | zephyr.float(3.14) | | Boolean | zephyr.bool(true) | | Array | zephyr.array(zephyr.int(42), zephyr.int(24)) | | Date | UseYYYY-MM-DD format, e.g. 2021-11-24 |

CLI Examples

Export using license key

npx railflow-zephyr -k ABCDE-12345-FGHIJ-67890 -t xyzyxzfdfldsfDFdf -p JT -f junit -r target/surefire-reports/*.xml -sm path -cp "Folder One/Folder Two" -cyp "Cycle Folder One/Cycle Folder Two" -cn "Railflow Zephyr Demo" -a "[email protected],[email protected]" -jurl https://mydomain.atlassian.net -ju [email protected] -jt myToken

Export using license file

npx railflow-zephyr -l /home/user/ActivationFile20201020.skm -t xyzyxzfdfldsfDFdf -p JT -f junit -r target/surefire-reports/*.xml -sm path -cp "Folder One/Folder Two" -cyp "Cycle Folder One/Cycle Folder Two" -cn "Railflow Zephyr Demo" -a "[email protected],[email protected]" -jurl https://mydomain.atlassian.net -ju [email protected] -jt myToken

Viewing Results in Zephyr

Automatic Test Creation

Zephyr Results

Zephyr Results

Automatic Test Cycle Creation

Zephyr Results

Test Results Details

Zephyr Results