New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

snaptest-cli

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snaptest-cli

A command line tool for the SnapTest chrome extension

latest
Source
npmnpm
Version
2.7.0
Version published
Maintainers
1
Created
Source

SnapTest CLI Tool:

SnapTest's cli tool to generate a test code folder. Digests SnapTest JSON and outputs a folder of tests that can be run in a variety of languages/frameworks.

Install:

npm install -g snaptest-cli

Current official generators & styles:

  • nightwatch: Generates code in the popular nightwatchJS framework (V1 & V2). generator repository, project harness
  • nightwatch-v3: Generates code in the nightwatchJS v3 framework. generator repository
  • csharp Generates code in C#. generator repository (No longer maintained)

Each generator is accompanied by a project harness repository that will help you get setup with configuring/running your tests.

Want another language/framework generator? Let us know in the github issues section here.

Cloud vs Local mode.

  • If you're utilizing SnapTest cloud, the cli will pull your test JSON directly from your cloud account via your access token and account flags.
  • If you're only using "local" only, You can specify your test json via the -i <path to test JSON file> flag.

Quick usage:

From the SnapTest extensions dashboard, find the "code" icon/button next to the corresponding test folder. Follow the on-screen commands to copy a command into your terminal which will generate the folder and tests with your specifications.

Reference

General flags:

These are most easily obtained by clicking on the "generate code" icons above tests or folders and copying/pasting the generated command.

  • Generate only folder: -f <folderId> - Generates only the specified folder.
  • Output folder name: -o <test folder name> - Lets you name the test folder whatever you'd like. It defaults to snaptests.
  • Framework type: -r <nightwatch|nightwatch-v3> - Generates tests in any of the offical frameworks.
  • Local JSON resource: -i <path to test JSON file> - Specify a path to a local json file that you have exported via the SnapTest extension.
  • Custom generator: -c <path to custom generator index.js> - Specify a path to the index.js file of your custom generator. for more information, see custom generator docs.

Cloud access flags:

These are only required if you're utilizing the SnapTest cloud. Not required if you're generating from a local .json tests file.

These are most easily obtained by clicking on the "generate code" icons above tests or folders.

  • Access token: -t <access token> - Used to access your resources on the SnapTest Cloud. Not required if you're generating from a local .json file.
  • Account type: -a <account type> - Specify the type of account you're accessing. Can be user, org, or project
  • Account id: -a <account id> - Specify the id of the account.

Requirements:

  • MacOS (Windows coming soon)
  • Node 4+

FAQs

Package last updated on 07 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts