On this page, you’ll find out how to run an executable build from a command line interface. This page also contains all arguments and parameters available for this purpose, with examples of how to use them.
In this chapter
To run a test through a command line interface:
In the command line interface, switch to the output folder of the executable build, enter the name of the executable and press Enter.

Result:
The test is executed as if you had pressed the RUN button in Ranorex Studio. The terminal window shows the debug information.

When you run a test, the ErrorLevel return value indicates the test result:
| 0 | Successful test run. |
| -1 | Test run aborted due to error. |
| -2 | Specified Ranorex Agent could not be found. |
| 42 | No valid license found. |
We use the following syntax on this page to describe the available command line arguments.
| / | Arguments are introduced with a forward slash, e.g. /help. Separate more than one argument with a space. |
| : | A colon introduces a parameter of an argument, e.g. /reportlevel:Debug. |
| | | The pipe denotes exclusive alternatives (one or the other, not both), e.g. /reportlevel:Debug|Info. Do not enter it in the command line interface. |
| || | The double pipe denotes inclusive alternatives (one or the other, or both), e.g. /reportfile:<path name>||<report name>. Do not enter it in the command line interface. |
| { } | Braces denote optional arguments, e.g. /testrail {trrunid=<id>}. Do not enter braces in the command line interface. |
| <> | Angle brackets denote a placeholder, e.g. /reportlevel:<any integer value>. Do not enter angle brackets in the command line interface. |
Sample syntax:
<test_project_name>.exe {/<argument1> /<argument2>:<parameter1>|<parameter2>} …
Almost all arguments are available in a short and a long form. You can use either as you wish and even mix them.
/?|help
Lists all available command line arguments and their parameters in the command line interface.
Example:
RxDatabase.exe /?
Displays the available command line arguments for use with the test executable RxDatabase.exe.
/m|maintenancemode
Runs the test in maintenance mode.
Example:
RxDatabase.exe /m
Runs the test executable RxDatabase.exe in maintenance mode.
Maintenance mode is explained in
Ranorex Studio advanced > ⇢ Maintenance mode
/rl|reportlevel:None|Debug|Info|Warn|Error|Success|Failure|<any integer value>
Examples:
RxDatabase.exe /rl:Error
Sets the report level to the threshold Error (corresponding to the value 40). The report will only include messages with a report level ≥ Error.
RxDatabase.exe /rl:110
Sets the report level to the threshold 110 (corresponding to Success) . The report will only include messages with a report level ≥ 110.
/rf|reportfile:<path name>||<file name>
Examples:
RxDatabase.exe /rf:myReport_%Y
Saves the report files under the names “myReport_YYYY.rxlog” and “myReport_YYYY.rxlog.data”, e.g. “myReport_2019.rxlog”. The save path remains the default one.

RxDatabase.exe /rf:myReports\myReport_%Y-%M-%D
Creates the folder \myReports\ in the output folder. The report files are stored there under the name “myReport_YYYY-MM-DD.rxlog” and “myReport_YYYY-MM-DD.rxlog.data” (e.g. “myReport_2019-11-23.rxlog”
/zr|zipreport {/zrf|zipreportfile:<path name>||<file name>}
Examples:
RxDatabase.exe /zr
Creates a zipped report file (.rxzlog) with the default name in the default report folder in the output folder.
RxDatabase.exe /zr /zrf:myZipReportsmyReport%Y
Creates the folder myZipReports in the output folder and stores the zipped report there under the file name “myReportYYYY.rxzlog”, e.g. “myReport2019.rxzlog”.
/ju/junit
Examples:
RxDatabase.exe /ju
Creates a JUnit-compatible copy of the report with the ending .junit.xml in the default report folder in the output folder.

You can use the following placeholders in the parameters of the /rf and /zrf arguments.
| %Y | Current year (e.g. 2018) |
| %M | Current month (e.g. 11) |
| %D | Current day of the month (e.g. 28) |
| %T | Current time (e.g. 105214 for 10:52:14 am) |
| %L | Run label (see Set run label, run ID, and SUT version) |
| %R | Current run configuration |
| %H | Host name |
| %S | Test suite name |
| %X | Test suite result |
/vr|videorecording:Off|KeepFailedTests|KeepAllTests
{/vrs|viderecordingsource:Auto|Screen1|Screen2|Screen3|Screen4}
Examples:
RxDatabase.exe /vr:KeepFailedTests
Activates video reporting, records from Screen 2, and saves only videos of failed test cases.
Reporting is explained in
Ranorex Studio fundamentals > ⇢ Reporting
/lcp|listconfigparams
/cfg|config:<setting name>=<value>
Examples:
RxDatabase.exe /cfg:adapter.defaultsearchtimeout=1500ms
Runs the test executable with the value 1500ms assigned to the setting adapter.defaultsearchtimeout.
RxDatabase.exe /cfg:adapter.defaultsearchtimeout=1500ms /cfg:recorder.replay.generatereport=False
This example illustrates that you can configure several settings at once by separating the individual arguments with a space.
Settings are explained in
Ranorex Studio system details > ⇢ Settings and configuration
/testrail /truser=<user name> /trpass=<password> {/trrunid=<id>|/trrunname=<name>}
Examples:
RxDatabase.exe /testrail /truser=johndoe /trpass1234 /trrunname=Nightly
Runs the test and synchronizes the results to a new test run with the name Nightly on TestRail. Uses johndoe as username and 1234 as password to log in to TestRail.
The TestRail integration is explained in
Interfaces and connectivity > ⇢ TestRail integration
/jit|jiratasks:on|off|createlink||autohandle
{/jiu|jirauser=<user name or email>} {/jip|jirapass=<password or API token>}
Examples:
RxDatabase.exe /jit:createlink
Runs the test and enables manual issue handling if credentials exist on the machine.
RxDatabase.exe /jit:autohandle /jiu=johndoe /jip=1234
Runs the test and enables automatic issue handling. Uses johndoe as user name and 1234 as password to log in to Jira. If other credentials already exist on this machine, ignores them.
The Jira integration is explained in
Interfaces and connectivity > ⇢ Jira integration
/ep|endpoint{:<endpoint name>}
/ep:<WebDriver endpoint> {/epc|endpointconfig:<configuration name>}
/ep:<WebDriver endpoint> {/epcfp|endpointconfigfilepath:<file path>}
Example:
RxDatabase.exe /ep:iPhone5
Runs the test on the endpoint with the name iPhone5.
RxDatabase.exe /ep:WebDriver2 /epc:Windows7Chrome
Runs the test on the WebDriver endpoint WebDriver2 with the endpoint configuration Windows7Chrome.
Endpoints are explained in
Web and mobile testing > ⇢ Endpoints
/lp|listglobalparams
/pa|param:<parameter name>=<value>
Example:
RxDatabase.exe /pa:Version=9
Runs the test with the value of the global parameter Version set to 9, regardless of what the value was when the executable build was created.
Parameters are explained in
Ranorex Studio advanced > Data-driven testing > ⇢ Parameters
/ltcpa|listtestcaseparams:<test container>
/tcpa|testcaseparam|testcontainerparam:<test container>:<parameter name>=<value>
Example:
RxDatabase.exe /tcpa:EnterName:Name=Jane
Runs the test with the value of the local parameter Name in the test container EnterName Version set to Jane.
Parameters are explained in
Ranorex Studio advanced > Data-driven testing > ⇢ Parameters
/ts|testsuite:<test suite path>
Examples:
RxDatabase.exe /ts:Introduction.rxtst
Runs the test executable and executes only the test suite Introduction. The test suite file is located directly in the output folder (bindebug), so the file name is sufficient.
RxDatabase.exe /ts:TestSuitesIntroduction.rxtst
Runs the test executable and executes only the test suite Introduction. The test suite file is located in the subfolder TestSuites in the output folder, so you need to specify this folder.
RxDatabase.exe /ts:RxDatabase.rxtst /ts:Introduction.rxtst
Runs the test executable and executes only the test suite Introduction. Ignores the specified test suite RxDatabase because only the last test suite is executed when more than one is specified.
/tc|testcase|testcontainer:<test container name or GUID>
Examples:
RxDatabase.exe /tc:Introduction
Executes the test container Introduction and all checked descendant test containers in the test suite initially created as part of the project/solution.
RxDatabase.exe /ts:ImageBased.rxtst /tc:Image_B
Executes the test container Image_B and all checked descendant test containers in the test suite ImageBased. The test suite ImageBased.rxtst was not initially created as part of the project, but added later, so it needs to be specified.
RxDatabase.exe /ts:ImageBased.rxtst /tc:Image_B /tc:Image_A
As above, but ignores Image_B and executes only Image_A because only the last test container is executed when more than one is specified.
/tcdr|testcasedatarange|testcontainerdatarange:<test container>=<rows>
Examples:
RxDatabase.exe /ts:RxDatabase.rxtst /rc:Database /tcdr:Data-driven_DB_Test=3-5
Executes the test suite RxDatabase in the run configuration Database. Uses only the rows 3 to 5 (from 8 in total) from the data source of the test case Data-driven_DB_Test. The specified run configuration ensures that the referenced test container is run.

How to specify data ranges:
Data-driven_DB_Test=3
Uses only row 3.
Data-driven_DB_Test=3-5
Uses rows 3 to 5, i.e. 3, 4, and 5.
Data-driven_DB_Test=3,5
Uses rows 3 and 5.
Data-driven_DB_Test=3,5-8
Uses rows 3, 5, 6, 7, and 8.
/rc|runconfig:<run configuration>
Examples:
RxDatabase.exe /rc:All
If you only have one test suite, executes it in the run configuration All. If you have multiple test suites, results in an error.
RxDatabase.exe /ts:ImageBased.rxtst /rc:All
Executes the test suite ImageBased in the run configuration All.
/mo|module:<module name>
Examples:
RxDatabase.exe /ts:ImageBased.rxtst /tc:Image_B /mo:TestDynamicImage
Executes the recording module TestDynamicImage in the test container Image_B in the test suite ImageBased.

Running test suites and run configurations are explained in
Ranorex Studio fundamentals > Test suite > ⇢ Execute a test suite
/rul|runlabel:<custom value>
/runid:<custom value>
/sutversion:<custom value>
/a|agent:"<agent name>"|["agent tag"]|?
/a|agent:"<agent name>"|["agent tag"] /artifacts:<file pattern>
Example:
RxDatabase.exe /a:"QA Agent"
Executes the test on the Agent named QA Agent.
RxDatabase.exe /a:["Smoke Tests", Android]
Executes the test on an Agent that has the tags Smoke Tests and Android.
Configuring Ranorex Agents is explained in
Ranorex Studio fundamentals > Ranorex Studio Overview > ⇢ Ranorex Agents
Running tests on Agents is explained in
Ranorex Studio fundamentals > Ranorex Studio Overview > ⇢ Agent-based remote execution