Skip to end of metadata
Go to start of metadata

You can execute automation test without launching Katalon Studio by using command line mode execution. 

Execute Katalon in CMD

  1. Open the command prompt and navigate to the folder of your Katalon Studio build, which contains katalon.exe file. For example:


  2. Enter the following syntax to execute automation test:

    katalon {option1} {option2} ... {optionN}

    where:

    ItemDescription
    katalonThe command of Katalon Studio to execute automation test.
    {option(s)}The additional options for the execution.

    For example:



  3. Press Enter to start execution.

 

Katalon Command Line options 

Here’s the list of options supported for the “katalon” command:

Katalon Command Line Option

Description

Mandatory?

-runMode=console

Enable console mode.

Y

-consoleLog

Display log in the console.

N

-noExit

Keep the console open after the execution is completed.

N

-summaryReport

Send summary report for a batch run.

N

-statusDelay=<seconds>

System will update execution status of the test suite after the delay period (in seconds) specified.

N

-projectPath=<path>

Specify the project location (include .prj file). The absolute path must be used in this case.

Y

-testSuitePath=<path>

Specify the test suite file (without extension .ts). The relative path (root being project folder) must be used in this case.

Y

-testSuiteCollectionPath=<path>

Specify the test suite file (without extension .tsc). The relative path (root being project folder) must be used in this case.

Note: Available only in 4.4+

Y (If -testSuitePath is not used. Otherwise it's optional)

-browserType=<browser>

Specify the browser type used for test suite execution.

The following browsers are supported in Katalon:

  • Firefox
  • Chrome
  • IE
  • Safari
  • Remote
  • Android
  • iOS

Y

-retry=<number of retry times>Number of times running test cases in the test suite.N
-retryFailedTestCases=<true, false>Retry failed test cases fail in test suite ( override setting in test suite file ). There are 2 options for retry: true if you want run fail test case and otherwise falseN
-qTestDestId=<destination's id>Id of the destination where the result will be uploaded on itN
-qTestDestType=<destination's type>Type of the destination. There are 4 options for destination's type:"test-suite", "test-cycle",  "release", and "root".N

-reportFolder=<path>

Specify the destination folder for saving report files. Can use absolute path or relative path (root being project folder).

N

-reportFileName=<name>

Specify the name for report files (.html, .csv, .log). If not provide, system uses the name "report" (report.html, report.csv, report.log). This option is only taken into account when being used with “-reportFolder” option.

N

-remoteWebDriverUrl=<remote web server url>

Specify the remote web driver URL

N

-remoteWebDriverType=<Selenium, Appium>Remote web's driver typeY (If -remoteWebDriverUrl is used)

-deviceId=<device Id for Android/device uuid for ios>

Specify the device's ID to execute test scripts using this device

Y (If -browserType=Android or -browserType=iOS is used)

-emailRegistered email on Katalon Studio pageN (If Katalon Studio is already activated)
-passwordPassword of input email from -email parameterN (If Katalon Studio is already activated)

 

Command Builder

You can quickly generate commands to use in console mode by following the steps below:  

  1. Click on Build CMD from the main toolbar.


  2. The Generate Command for Console Mode is displayed. Configure your options as needed.

    where:

    SectionDescription
    Test SuiteThe Test Suite or Test Suite Collection to be executed
    Executed Platform

    The platform to execute the test on:

    The Remote Web Driver URL settings will be available if you choose to run with Remote option.

    The Mobile Device settings will be available if you choose to run with Android or iOS.

    The Custom Execution settings will be available if you choose to run with Custom option.

    Report Configuration

    Extra settings for report after execution completed:

    Output Location: the local folder to export report to.

    Use relative path to current project: display the relative path to the output location, starting from current project location.

    Report File Name: the name for your generated report.

    Send Summary Report to recipients below: enable email configuration for sending report after execution completed.

    Other Options

  3. Click Generate Command after you're done with the configuration.


  4. You can Copy to Clipboard and paste to command prompt for execution.

Use console.properties file

We support running console mode using console.properties file where you can manually modify the content if needed. 

  1. Generate console.properties file using our generator:


  2. The console.properties file will be generated at your preferred location. You can open and update the parameters manually as needed. 
    For example:


  3. Run the console.properties file in console mode with the following syntax:

    katalon -propertiesFile="<absolute path to console.properties file>" -runMode=console

    For example:

    katalon -propertiesFile="D:\Katalon\Demo_Project\console.properties" -runMode=console
  4. You can add extra Katalon command options if needed. Any option already defined in the console.properties file will be overwritten by the one declared in command line.  

    katalon -propertiesFile="<absolute path to console.properties file" -runMode=console -browserType=IE 

    In the above example, since we also declare browserType option in command line, the automation test will be executed using IE instead of Chrome.

 

Write a comment…