CLI Usages

This section explains about all CLI parameters.

Command Arguments Description

FRAMEWORK_NAME [-f]: The team name is the main/root folder for the framework. This cannot be empty. eg. if your swagger name is Petstore
then you can give the framework name as "petstore".

$ automation-sniper -f "petstore"
PATH [-p]: This accepts either API specs link or specs file path as JSON/YAML. If your swagger link is in private VPC then you can give
           JSON path so that you can generate the framework

$ automation-sniper -f "petstore" -p https://petstore.swagger.io/v2/swagger.json
RESULTS_PATH [-r]: This is the path where the generated framework will be present. If you leave it empty then it will create a "result"
folder in your current directory and an output framework will be generated here.

$ automation-sniper -f "petstore" -p https://petstore.swagger.io/v2/swagger.json -r /output
SCRIPT_PATH [-sp]: This is required when you need to regenerate the framework if any API specs changed. It only accepts only zip
folders. So you need to zip your old framework and provide that.

$ automation-sniper -f "petstore" -p https://petstore.swagger.io/v2/swagger.json -sp /result/petstore.zip
OPERATIONS [-o]: This is basically an operation filter. If you need to generate an NFR framework only for "get" requests then you
need to pass "-o get" in the command. The multi request is also supported. e.g. if you need both get and post request then you need to
pass "-o get post".

Command: automation-sniper -f "<Team Name/ framework Name>" -p <API Spec Path> -r <output path>

$ automation-sniper -f "petstore" -p https://petstore.swagger.io/v2/swagger.json -o get
$ automation-sniper -f "petstore" -p https://petstore.swagger.io/v2/swagger.json -o get post
BLACKLIST_API [-ba]: This is also one type of blacklist filter. This is used when you wanted to generate NFR framework for all API
specs except some APIs. In this case you need to pass that API path with this filter. So that NFR framework will be generated with all
API except blacklisted API. You need to pass the command like this "-ba /pet/findPetsByStatus".

$ automation-sniper -f "petstore" -p https://petstore.swagger.io/v2/swagger.json -ba /pet/findPetsByStatus
$ automation-sniper -f "petstore" -p https://petstore.swagger.io/v2/swagger.json -ba /pet/findPetsByStatus /pet/findPetsByStatus/name
WHITELIST_API [-wa]: This is also one type of whitelist filter. This is used when you wanted to generate NFR framework for only few
APIs from the specs. In this case, you need to pass that API path with this filter. So that NFR framework will be generated for specific
API. You need to pass the command like this "-wa /pet/findPetsByStatus".

$ automation-sniper -f "petstore" -p https://petstore.swagger.io/v2/swagger.json -wa /pet/findPetsByStatus
$ automation-sniper -f "petstore" -p https://petstore.swagger.io/v2/swagger.json -wa /pet/findPetsByStatus /pet/findPetsByStatus/name
VERBOSE [-v]: This is used to print debug logs. If you are facing any issue then you need to append this argument to see the debug log.

$ automation-sniper -f "petstore" -p https://petstore.swagger.io/v2/swagger.json -v