Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning

Only Chrome, Firefox and Remote options are supported for console mode execution using Linux version.

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 (Windowsor Applications folder (Mac OS) or katalon (Linux) file.


  2. Enter the following syntax to execute automation test:

    Windows:

    Code Block
    languagepowershell
    themeRDark
    katalon {option1} {option2} ... {optionN}

    Mac OS:

    Code Block
    languagepowershell
    themeRDark
    ./Katalon\ Studio.app/Contents/MacOS/katalon --args {option1} {option2} ... {optionN}

    Linux:

    Code Block
    languagepowershell
    themeRDark
    ./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?

Note

-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

Only Chrome, Firefox and Remote is available for use in Linux version

 
-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) 
proxy.optionNO_PROXY, USE_SYSTEM, MANUAL_CONFIGY 
proxy.server.type HTTP, HTTPS, or SOCKSY 
proxy.server.addressExample: locahost, http://katalon.comY 
proxy.server.portExample: 80, 8080, 9999Y 
proxy.usernameExample: MyProxyUsernameOptional (YES if your proxy server requires authentication) 
proxy.passwordExample: MyProxyPasswordOptional (YES if your proxy server requires authentication) 
executionProfile

Since 5.4

Specify

profile's name to

the execution profile to be executed with

. See this page for more details.

 Available from 5.4

 

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. Select an environment

     

    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:

    Code Block
    languagepowershell
    themeRDark
    katalon -propertiesFile="<absolute path to console.properties file>" -runMode=console

    For example:

    Code Block
    languagepowershell
    themeRDark
    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.  

    Code Block
    languagepowershell
    themeRDark
    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.

 

Table of Contents
classkat_toc