Giter VIP home page Giter VIP logo

runscope-sanity-runner's Introduction

Runscope Sanity trigger

Usage

$ npm install -g runscope-sanity-runner
$ trigger COMMAND
running command...
$ trigger (--version)
runscope-sanity-runner/1.0.0 darwin-arm64 node-v16.20.0
$ trigger --help [COMMAND]
USAGE
  $ trigger COMMAND
...

Commands

trigger sanity

This command helps users to trigger runscope tests and send slack messages.

USAGE
  $ trigger sanity -c <value>

FLAGS
  -c, --config=<value>  (required) Path to config file

DESCRIPTION
  This command helps users to trigger runscope tests and send slack messages.

EXAMPLES
  $ trigger sanity --config="./config.json"

See code: src/commands/sanity/index.ts

Config File

The following is a sample for config file

{
    "slackDetails": {
        "apiToken": "xoxb-*******-*********-********",
        "channel": "**********"
    },
    "runscopeDetails": {
        "envName": "*****",
        "envUid": "******-****-****-****-**********",
        "triggerUids": ["********-****-****-****-************"],
        "webhookUrl": "********"
    },
    "shareReportToFollowingUsers": ["[email protected]"],
    "googleCredentialsPath": "credentials.json"
}

Before using the CLI command, you need to set up a configuration file. Here's an explanation of each field in the configuration file:

  • slackDetails: Contains details required for interacting with Slack.
    • apiToken: Your Slack API token.
    • channel: The Slack channel where notifications will be sent.
  • runscopeDetails: Contains details required for integrating with Runscope.
    • envName: The name of the environment.
    • envUid: The UID of the environment.
    • triggerUids: An array of trigger UIDs.
    • webhookUrl: The URL for the webhook.
  • shareReportToFollowingUsers: An array of email addresses to which reports will be shared.
  • googleCredentialsPath: The file path to your Google credentials JSON file.
  • threadMessagePrefix: (optional) The prefix message to be added in thread message

Retrieving Configuration Details

Here's how you can retrieve each detail required for the configuration file:

Slack API Token: Generate a Slack API token by following the official Slack API documentation. Ensure the token has appropriate permissions for sending messages to the specified channel.

Runscope Details: Obtain Runscope environment details (name, UID, trigger UIDs) from your Runscope account settings or API documentation.

  • Environment name and Uuid: Evironment Details
  • Trigger Uid: You can copy trigger uid from setting for each module Module Setting
  • Webhook URL

Share Report Recipients: Specify the email addresses of users to whom reports should be shared.

Google Credentials Path: Obtain Google credentials JSON file from the Google Cloud Platform Console or by following the Google API documentation.

Understanding the flow

How command works

runscope-sanity-runner's People

Contributors

hiteshshetty-dev avatar svc-cli-bot avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.