1.3.8 • Published 2 years ago

zephyr-scale-api v1.3.8

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

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.

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 folson@campbellsci.com.

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!

1.3.7

2 years ago

1.3.6

2 years ago

1.3.5

2 years ago

1.3.4

2 years ago

1.3.3

2 years ago

1.3.8

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago