Command Line Interface

Help Topics
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.
Important
Command line application is installed in the installation folder during the Professional Edition install procedure, the name of the executable file is HttpMaster.Command.exe. Alternatively, you can obtain command line interface as a separate download from the HttpMaster download page.

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:
  • 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).
  • overwrite_output; if true, an existing output file will be overwritten. If false and file with the specified name already exists, new file will be created with a slightly different name. This parameter accepts only true/false, default value is false.
  • plain; whether only plain execution will be performed and result data won't be written to an execution result (hmex) file. This parameter accepts only true/false, default value is false. Alternatively, you can turn on plain execution in project options and execution data will never be stored regardless of this parameter value. For more information on plain execution, see the corresponding topic.
  • 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. If plain parameter is true, result file won't be created.
  • result_format; data format of the execution results stored in the export file; you can specify xml or json for parameter value. Default value is json.
  • overwrite_result; if true, an existing result file will be overwritten. If false and file with the specified name already exists, new file will be created with a slightly different name. This parameter accepts only true/false, default value is false.
  • report_file; full path to the report file where complete execution data will be stored in PDF format. If plain parameter is true, report file won't be created.
  • overwrite_report; if true, an existing report file will be overwritten. If false and file with the specified name already exists, new file will be created with a slightly different name. This parameter accepts only true/false, default value is false.
  • report_form; you can specify basic or complete for parameter value, default value is complete. If basic is specified, report will include only general data, headers, and validations.
  • report_title; text that will be displayed as PDF report title.
  • add_page_footer; whether to add page footer with page numbering to the PDF report. This parameter accepts only true/false, default value is true.
  • add_item_bookmarks; whether to add bookmark to PDF report for every request item. This parameter accepts only true/false, default value is true.
  • add_execution_bookmarks; whether to add bookmark to PDF report for every execution of the request item. This parameter accepts only true/false, default value is true. This parameter can be set to true only if parameter add_item_bookmarks is also set to true.
Important
Only execute and output parameters are mandatory, all others are optional.
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.

Project execution

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.

Canceling execution

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.