Override browserType when running test suite collection via CLI

Hi,

I am running a build automation with Jenkins so I need a CLI for testing automation. The problem is that when I run it with normal testSuitePath the browserType argument is taken as input but for testSuiteCollectionPath it doesn’t work

Eg:

**./katalon -runMode=console -consoleLog -projectPath=“…Automation.prj” -testSuitePath=“Test Suites/Sample” -browserType=“Chrome” -headless **

This works in command line and all test case gets executed headless but when i run it like this

**./katalon --args -runMode=console -consoleLog -browserType=“Chrome (headless)” -projectPath=“…Automation.prj” -retry=0 -testSuiteCollectionPath=“Test Suites/Sample” **

it opens the firefox browser and doesn’t work headless

In fact, it doesn’t take browser type at all. How can I solve this for collection?

1 Like

You don’t need to include -browserType into your command line for Test Suite Collection, it should be something like this:

katalon -runMode=console -consoleLog -noExit -projectPath="C:\Users\Admin\Katalon Studio\asd\asd.prj" -retry=0 -testSuiteCollectionPath="Test Suites/New Test Suite Collection"

Well, my requirement is to use browserType. Anyway, I used a workaround it by using the browser type option while creating the collection.

It appears that my tests will fail without the browserType included in the CLI. I’m looking to run in multiple browsers. Is there a way to do that?