Can Katalon use browserstack config with multiple browsers capabilities at once?

BrowserStack has a way to run multiple browsers by adding multiple browsers capabilities in their conf files like so:

commonCapabilities: { os: “Windows”, os_version: “10”,…},

capabilities: [{

browserName: 'chrome',



browser_version: '63'

},{

browserName: 'firefox',



browser_version:'58',

},{

browserName: 'Edge',



browser_version:'15.0'

}],

Is there a way to set up Katalon such that I can run one test and it will run multiple browsers and its versions?

Right now if I edit Projects->settings->execution->Default->webUI->Remote, I can have a set of “common capabilities”, but I still need to specify different browsers and its versions under “Remote”. I’m setting up bamboo to run on a linux server and using console.properties file to simplify the command line execution, however, that still does not contain a way to run multiple browsers from one test suite, does Katalon support something like that?

2 Likes

I guess I have to use test suite collection? So basically, duplicate test suites, so one suite will have firefox, another suite will have chrome, another suite will have safari? That seems to be redundant in terms of test suite files, if I have 10 tests in a suite, I’ll have 30 tests total, now if I want different OS, then I will need another test suite copied?

Dk,

I am not sure I understood the “duplicate test suites” part. In TestSuiteCollection, we could add the same TestSuite multiple times and select the browser for each of them.

Yes, thanks Trong, I saw a youtube video on that later on. However, if I want to integrate with BrowserStack, which means I only have one option, which is to set “Run with” and select Remote. Under Remote of “Project Settings”, I can add the browserStack remote web server URL, and add capabilities in the grid with Name, type, value, but, within this grid, I cannot set an array of capabilities, meaning, in my above example, to tell browserstack to run with multiple browsers and its corresponding versions. If I want to have browserstack to run a test suite with multiple web browsers, I cannot find a way to do so right now. I can only have 1 chrome browser and its version. Once. Even if I drop the same test suite in the collection, there’s still one Remote settings I can choose. I want to leverage browserstack’s multiple runs feature which needs to have multiple browserName specified in the capabilities. I think the only way is to have multiple Projects, because one project will have one Remote settings, so the next project will have the same tests, but the remote setting is set to a different remote browser, but then I will have to have the build command to execute again, or maybe use a bash file to run again. So let’s say if I have multipel OS, windows7, windows 8, windows 10, OSX El Capitan, High Sierra, with Chrome 65, Firefox 58, Safari etc, with all these combinations, I will have quite a few redundancies. Of course I can have in the Test Suite Collection with Firefox headless and probably set a version, and Chrome headless, but linux server only support these 2, if I want opera, safari, is that’s possible? that’s also one reason we want to leverage BrowserStack remote server and in the config to put multiple browsers and OS. So still just wondering if there’s still a way to do something like that. See this example: https://www.browserstack.com/automate/webdriverio
scroll down to Speed up Testing section for their config.

ultimately, my goal is to have a linux build server running bamboo and kick off command line run using browserstack with multiple browsers at once and see it in browserstack webUI.

I really appreciate your input and help here. Let me know if currently what I intend to do is possible with current Katalon build.

One possible request would be to have the option of multiple Remote settings. so Remote1, Remote2, RemoteCustomname… so when I execute command line of the test suite collection, it will execute different Remote browserstack browsers and OS combinations.

anyways, thanks.

dk,

Just an idea.

  1. Katalon Studio supports Console mode Execution. In the command line you can specify browser type:
$ cd %KATALON_HOME%
$ katalon -runMode=console -projectPath=... -testSuitePath=... -browserType="Remote"
  1. The information you put by GUI operation “Projects->settings->execution->Default->webUI->Remote” is actually saved in a JSON file : %project_dir%\settings\internal\com.kms.katalon.core.webui.remote.properties. For example:
{
  "REMOTE_WEB_DRIVER":{
    "os":"Windows",
    "os_version":"10",
    "browser":"IE",
    "browser_version":"11.0",
    "resolution":"1024x768",
    "remoteWebDriverUrl":"http://kazurayam1:*******************@hub-cloud.browserstack.com/wd/hub",
    "remoteWebDriverType":"Selenium"
  }
}
  1. I will manually write another JSON file which contains multiple entries of “Remote” I would like to use. For examle:
{ "REMOTE_WEB_DRIVERS": [
    {"os":"Windows","os_version":"10","browser":"IE","browser_version":"11.0", ...},
    {"os":"Windows","os_version":"8","browser":"IE","browser_version":"10.0", ...},
    {"os":"Windows","os_version":"7","browser":"Chrome","browser_version":"62.0", ...},
    {"os":"Mac","os_version":"11","browser":"Safari","browser_version":"xxx", ...},
    ... as many as I want
]}
  1. Finaly I want to have a new nice UI. Using it I can select a set of entries of REMOTE_WEB_DRIVERS to apply to Katalon Studio Console Mode.
    The UI will loop for the entries dynamically overwriting the %project_dir%\settings\internal\com.kms.katalon.core.webui.remote.properties file and call the kataon.
    … I am not too sure if it is safe to overwrite the file. May work but not safe I think.

By this trick I would be able to execute multiple executions of a single set of Test Suite/Test Cases of a Katalon project specifying varieties of Browser environments provided by the BrowserStack.

I would try to implement this later.

2 Likes

@kazurayam Yes, that seems like a good idea. As your no. 4. Maybe no need to overwrite the original remote properties, use that as the “common capabilities” and in addition have some logic to also add the remote-web-drivers and parse them together and send it out as one file. (looking at browserstack example, they have a foreach loop to export) For users who don’t need multiple remote drivers, they can keep using the original one. so overwrite might not be the easiest approach.

@dk1 Hi did this work? I’m after a similar solution but currently not having much luck my side.

1 Like

You can achieve this by adding custom configurations from project settings or just Go to Path (%project_dir%\settings\external\execution) and create multiple folders with different names, then create com.kms.katalon.core.webui.remote.properties file in each folder with desired capabilities as shown below:
{
“REMOTE_WEB_DRIVER”:{
“os”:“Windows”,
“os_version”:“10”,
“browser”:“IE”,
“browser_version”:“11.0”,
“resolution”:“1024x768”,
“remoteWebDriverUrl”:“Your URL”,
“remoteWebDriverType”:“Selenium”
}
}

Hope this would help.