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-scale-api

v1.3.8

Published

Zephyr Scale API SDK to simplify automated testing development.

Downloads

38

Readme

ZephyrScaleAPI

Easy to use package for making calls to the Zephyr Scale API.

Package Name

zephyr-scale-api

Description

This package can be used to easily create API calls to automate the process of inputing data to ZephyrScale after running automated tests. Hopefully, the code is useful and the provided parameters get you off on the right foot to make sure you have quick and seamless api calls with minimal errors.

Installation

npm i zephyr-scale-api

Integrate With Jira

Generate an API token for Zephy Scale. In Jira Software go to "Your profile and settings" (Profile Icon) -> "Zephyr Scale API Access Tokens" -> "Create access token".

  • (Be careful with this token as Smart Bear has not made a way to revoke access!)

Add Your Files

Create a .env file in the root of your project for you Zephyr Scale API Token. The key value pair should look like BEARER_TOKEN=your_token where BEARER_TOKEN is the key and replace your_token with your generated API token.

  • (DEPRECATED) (or future feature) Make sure you have the most up-to-date Open API 3.0 yml documentation for ZephyScale, found here: https://support.smartbear.com/zephyr-scale-cloud/api-docs/, so that the API module can create the correct sdk. (One is provided by default)

Usage

After following the steps above, (installing, integrating with Jira, and adding your .env file) you are ready to get started! Depending on your configurations, you may need to mess around with some of these examples to get the code functioning.

import zephyr from "zephyr-scale-api";
// or //
let zephyr = require("zephyr-scale-api");

Using require vs import will depend on the type of modules you are using.

await zephyr.listEnvironments(); // when imported
// or //
await zephyr.default.listEnvironments(); // wehn required

Notice the use of default, I'm currently having an issue with how the package is being required and this does the trick for me.

let zephyr = require("zephyr-scale-api").default;

You could also do something like this ^ instead.

async function main() {
  try {
    let out = await zephyr.listEnvironments();
    console.log(out);
  } catch (e) {
    console.error(e);
  }
}

main();

You may also need to wrap the call in a function if the await is being used at the top level.

Getting Started

You can check out all the available command below. For further documentation, such as available/required parameters and types, see the official Zephyr Scale documentation: https://support.smartbear.com/zephyr-scale-cloud/api-docs

Support

If you have any question please contact Forrest Olson via Teams or email at [email protected].

Roadmap

  • Develop
  • Test
  • Deploy
  • Support

Project Status

Deployed.

Future Features

  • ability to add custom authorization
  • additional functions to simplify some of the zephyr scale processes that require multiple calls (i.e. creating a test case, returning id, then adding test script)

Known Issues

  • content-length header for any of the automation requests (createCustomExecutions, createCucumberExecutions, createJUnitExecutions) causes those functions to fail.

Suggestions

Feel free to leave any suggestions and pleae give me feedback on any errors you run into when typing parameters.

API Calls (Functions)

E.g. zephyr.createTestCase(....)

  • ENVIRONMENTS

    • listEnvironments
    • getEnvironment
  • FOLDERS

    • listFolders
    • createFolder
    • getFolder
  • OTHER

    • listTestPlans
    • deleteLink
    • healthcheck
  • PRIORITIES

    • getPriority
    • listPriorities
  • PROJECTS

    • listProjects
    • getProject
  • STATUSES

    • listStatuses
    • getStatus
  • TEST_AUTOMATIONS

    • createCustomExecutions
    • createCucumberExecutions
    • createJUnitExecutions
    • retrieveBDDTestCases
  • TEST_CASE

    • listTestCases
    • createTestCase
    • getTestCase
    • updateTestCase
    • getTestCaseLinks
    • createTestCaseIssueLinks
    • createTestCaseWebLinks
    • listTestCaseVersions
    • getTestCaseVersion
    • getTestCaseTestScript
    • createTestCaseTestScript
    • getTestCaseTestSteps
    • createTestCaseTestSteps
  • TEST_CYCLES

    • listTestCycles
    • createTestCycle
    • getTestCycle
    • updateTestCycle
    • getTestCycleLinks
    • createTestCycleIssueLink
    • createTestCycleWebLink
  • TEST_EXECUTIONS

    • listTestExecutions
    • createTestExecution
    • getTestExecution
    • listTestExecutionLinks
    • createTestExecutionIssueLink

Collaborate With Your Team!