A command line tool for the SnapTest chrome extension
npm install snaptest-cli```
npm install -g snaptest-cli
1. nightwatch: Generates code in the popular nightwatchJS framework (V1 & V2). generator repository, project harnessnightwatch-v3
1. : Generates code in the nightwatchJS v3 framework. generator repositorycsharp
1. Generates code in C#. generator repository (No longer maintained)nunit
* NUnit style: project scaffold/harnessxunit
* XUnit style: project scaffold/harness
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.
- 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 flag.
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.
#### 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 - Generates only the specified folder.-o
1. Output folder name: - Lets you name the test folder whatever you'd like. It defaults to snaptests.-r
1. Framework type: - Generates tests in any of the offical frameworks.-i
1. Local JSON resource: - Specify a path to a local json file that you have exported via the SnapTest extension.-c
1. Custom generator: - 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 - Used to access your resources on the SnapTest Cloud. Not required if you're generating from a local .json file.-a
1. Account type: - Specify the type of account you're accessing. Can be user, org, or project-a
1. Account id:
1. MacOS (Windows coming soon)
1. Node 4+