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

@cloudbeat/cli

v3.2.2

Published

CLI for CloudBeat API

Downloads

191

Readme

CloudBeat API CLI

Installation:

npm install -g @cloudbeat/cli

Usage

Execute a test case or suite:

Following command will execute the specified Case or Suite, wait for the tests to finish, and will produce XML report in JUnit format:

cloudbeat-cli start <testType> <testId> --apiKey <apiKey> --apiBaseUrl <apiUrl> [options]

If test execution succeeds exit code will be 0. Otherwise exit code will be 1.

Arguments:

  • testId - Test id.
  • testType - Either case or suite.
  • apiKey - API key. Can be retrieved from the user profile in CloudBeat.
  • apiBaseUrl - CloudBeat API address. For SaaS it should be https://api.cloudbeat.io. For on-premises installations consult your system administrator.

Options:

  • --project <projectName> - Project name. If specified, then <testId> should specify case/suite name instead of an id.
  • --tags <tags> - Specifies tags by which the tests will be executed. Will work only with Suite.
  • -e, --env <name> - Specifies environment to use for test execution. Environment should be already defined in CloudBeat for the project whose test is being executed.
  • -a, --attr <attributes> - Allows passing name-value pairs to test execution scripts. The passed data can be accessed via attributes property. E.g. log.info(attributes).
  • --release <releaseName> - Name of the release or version to be associated with the test result.
  • --build <buildName> - Name of the build to be associated with the test result. Requires specifying --release as well.
  • --suffix <time|id> - Report filename suffix to use. Must be either "time" or "id".
  • --folder <folder> - Path to a directory where test results will be saved. If not specified, results will be saved in the current working directory.
  • --silent - Do not print test progress details.

Usage examples:

Execute Case by its id and pass environment id and test attributes:

cloudbeat-cli start case 70224 --apiKey AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEE --apiBaseUrl https://api.cloudbeat.io --env MyEnviroment --attr foo=bar,baz=qux

Execute Case by its name. Note that when executing tests by name, project name should be specified as well:

cloudbeat-cli start case "My Case" --project "My Project" --apiKey AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEE --apiBaseUrl https://api.cloudbeat.io

Execute tests marked with the specified tags in the specified suite. This will override any tags selected via CloudBeat UI:

cloudbeat-cli start suite 34984 --tags foo,bar,qaz --apiKey AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEE --apiBaseUrl https://api.cloudbeat.io

Get current test run status:

run-status can be used for retrieving the status of a currently executing test:

cloudbeat-cli run-status <runId> --apiKey <apiKey> --apiBaseUrl <apiUrl>

Get test result for specified test run:

run-result can be used for retrieving the result data for a finished test:

cloudbeat-cli run-result <runId> --apiKey <apiKey> --apiBaseUrl <apiUrl>

Update project artifacts:

sync can be used for updating artifacts for the specified project using a zip archive.

cloudbeat-cli sync <projectId> <artifactArchive> --apiKey <apiKey> --apiBaseUrl <apiUrl>

Arguments:

  • projectId - Project id. Project type must support uploading artifacts as zip archives.
  • artifactArchive - Path to a zip archive containing the artifacts.
  • apiKey - API key. Can be retrieved from the user profile in CloudBeat.
  • apiBaseUrl - CloudBeat API address. For SaaS it should be https://api.cloudbeat.io. For on-premises installations consult your system administrator.

Usage examples:

cloudbeat-cli sync 53574 "C:\foo\bar.zip" --apiKey AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEE --apiBaseUrl https://api.cloudbeat.io

Additional general options (work with all commands):

  • -f, --failOnErrors <true|false> - Controls whether to return non-successful exit code on errors or not.