snaptest-cli v2.6.2
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-cliCurrent official generators & styles:
nightwatch: Generates code in the popular nightwatchJS framework. generator repository, project harnesscsharpGenerates code in C#. generator repository- NUnit style:
nunitproject scaffold/harness - XUnit style:
xunitproject scaffold/harness
- NUnit style:
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 tosnaptests. - Framework type:
-r <offical framework/language>- Generates tests in any of the offical frameworks. e.g.nightwatchjsorcsharp. - Style:
-s <offical style>- Generates tests with specified style. e.g. for the csharp type,xunitornunitare available. - 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 beuser,org, orproject - Account id:
-a <account id>- Specify the id of the account.
Requirements:
- MacOS (Windows coming soon)
- Node 4+
3 years ago
3 years ago
4 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago