Getting started

Once you installed and verified the version of Automation-sniper then the next step is to familiar yourself with some basic commands of the tool.

$ automation-sniper -h

Output:

usage: automation-sniper [-h] [--version] -f FRAMEWORK_NAME -p PATH [-r RESULTS_PATH] [-sp SCRIPT_PATH]
                     [-o {get,post,put,patch,delete,head,options,trace} [{get,post,put,patch,delete,head,options,trace} ...]] [-v] [-ba BLACKLIST_API [BLACKLIST_API ...]]
                     [-wa WHITELIST_API [WHITELIST_API ...]]

This tool helps to convert API Specs into automation Framework

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  -f FRAMEWORK_NAME, --framework_name FRAMEWORK_NAME
                        Provide the name of the framework
  -p PATH, --path PATH  Provide the path to the swagger file/postman file or provide swagger api-docs url/postman collection url
  -r RESULTS_PATH, --results-path RESULTS_PATH
                        path to store generated automation framework default: result
  -sp SCRIPT_PATH, --script-path SCRIPT_PATH
                        provide script folder path as zip format
  -o {get,post,put,patch,delete,head,options,trace} [{get,post,put,patch,delete,head,options,trace} ...], --operations {get,post,put,patch,delete,head,options,trace} [{get,post,put,pat
ch,delete,head,options,trace} ...]
                        operations to use in API testing
  -v, --verbose         verbose
  -ba BLACKLIST_API [BLACKLIST_API ...], --blacklist-api BLACKLIST_API [BLACKLIST_API ...]
                        tags to use in api testing
  -wa WHITELIST_API [WHITELIST_API ...], --whitelist-api WHITELIST_API [WHITELIST_API ...]
                        tags to use in API testing

And that's how you'd like to use this tool. To know more please read the documentation https://automation-sniper.readthedocs.io/

Basic Usages

To use automation-sniper you need either the Swagger docs link or swagger JSON.

CLI command to convert a swagger specs into NFR framework.

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

Output:

2022-03-03 19:33:03,711 - TRANSFORMATION_TOOL_LOG INFO     Got request for framework_name TestFramework and upload_path \result
2022-03-03 19:33:05,483 - TRANSFORMATION_TOOL_LOG INFO     Framework is generated in this path : \result\TestFramework

The framework is created under the result folder.