Command Line Interface
Command line interface can be used to automate HttpMaster tasks, for example, execution of project files.
It supports several parameters that should be specified when command line application is started.
Command line application is installed in the HttpMaster installation folder, the name of the executable file is HttpMaster.Command.exe.
Command line parameters
Majority of command line parameters require its value to be specified, value should be separated from parameter name with a colon (without any spaces).
Each parameter name should be preceded with a single space, here is the list of all supported parameters:
Only 'execute' and 'output' parameters are mandatory, all others are optional.
- help; displays command line help.
- execute; full path to the HttpMaster project to execute (should include project file name - 'hmpr' file).
- group; name of the execution group to execute. Execution group with the specified name must already exist in the project.
- output; full path to the output file where execution data will be stored (should include output file name - 'hmex' file). If file with such name already exists, new file will be created with altered name.
- username; username used for authentication. Should be specified if executing against web resources that require authentication.
- password; password used for authentication. Should be specified if executing against web resources that require authentication.
- domain; domain used for authentication. Should be specified if executing against web resources that require authentication.
- proxy; proxy address. Should be specified if executing through proxy.
- proxy_username; username for proxy authentication. Should be specified if proxy requires authentication.
- proxy_password; password for proxy authentication. Should be specified if proxy requires authentication.
- proxy_domain; domain for proxy authentication. Should be specified if proxy requires authentication.
- logging; whether execution progress will be written to a log file.
Log file will be created with a 'log' extension and will be stored in the same folder as output 'hmex' file.
If log file already exists, new data will be appended to it. This parameter accepts only true/false, default value is false.
- encrypted_passwords; whether passwords (if specified) for project authentication or proxy are encrypted.
These passwords can be encrypted with 'command line wizard'; see corresponding section in this topic.
- result_file; full path to the export file where execution results (outcomes) will be stored in XML or JSON format. This file always contains compact XML or JSON, pretty formatting is not supported.
- result_format; data format of the execution results stored in the export file; you can specify xml or json for parameter value.
Command line example
HttpMaster.Command.exe execute:"C:\Temp\My_project.hmpr" output:"C:\Temp\my_project_execution.hmex" logging:true
Command line wizard
HttpMaster features a special wizard that can help you with the construction of commands for command line interface.
To start this wizard, select Tools/Command Line Wizard menu option in the main application window.
The wizard contains multiple steps where you will be able to specify all available command line options in a user-friendly manner.
At the last wizard step, complete command will be created with the ability to copy it for further use.
By default, HttpMaster command line application executes all project items that are stored in the specified project file.
You can, however, exclude particular project item from command line execution. To manage this property, open project item for editing in HttpMaster and change corresponding option.
Items are always executed according to their specified execution order; to change execution order for particular item, open project in HttpMaster and change execution order value for the item.
To cancel current execution when inside command line console, press Ctrl+C or Ctrl+Break. If execution of project has been cancelled, no output hmex file will be created and it won't be possible to view any execution data even if some executions were completed before cancelling. It is necessary to completely execute HttpMaster project before hmex file becomes available for review.
How to view execution file created with command line interface
Execution data created with command line interface is stored in hmex file. To view execution data stored in hmex file, start HttpMaster and use menu option to open existing hmex file.
Copyright © by Borvid. All rights reserved.