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

snaptest-cli

v2.6.2

Published

A command line tool for the SnapTest chrome extension

Downloads

19

Readme

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:

  1. nightwatch: Generates code in the popular nightwatchJS framework. generator repository, project harness
  2. csharp Generates code in C#. generator repository

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.

  1. Generate only folder: -f <folderId> - Generates only the specified folder.
  2. Output folder name: -o <test folder name> - Lets you name the test folder whatever you'd like. It defaults to snaptests.
  3. Framework type: -r <offical framework/language> - Generates tests in any of the offical frameworks. e.g. nightwatchjs or csharp.
  4. Style: -s <offical style> - Generates tests with specified style. e.g. for the csharp type, xunit or nunit are available.
  5. 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.
  6. 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.

  1. 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.
  2. Account type: -a <account type> - Specify the type of account you're accessing. Can be user, org, or project
  3. Account id: -a <account id> - Specify the id of the account.

Requirements:

  1. MacOS (Windows coming soon)
  2. Node 4+