Test Suite Collection: navigateToUrl() not working

Hi all,

back in the office and I will try to summarize the issue:

The problem is, that I cannot use any Global Variable in my whole testsuite collection (including test suites, test cases, keywords and testlistener), while trying to connect to browserstack. If I do so, this exception is thrown:

Test Cases/ProfileFunctionalities/Login-Logout FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to navigate to 'null'
	at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
	at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)
	at com.kms.katalon.core.webui.keyword.builtin.NavigateToUrlKeyword.navigateToUrl(NavigateToUrlKeyword.groovy:83)
	at com.kms.katalon.core.webui.keyword.builtin.NavigateToUrlKeyword.execute(NavigateToUrlKeyword.groovy:67)
	at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.navigateToUrl(WebUiBuiltInKeywords.groovy:183)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$navigateToUrl$0.call(Unknown Source)
	at Login-Logout.run(Login-Logout:42)
	at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
	at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
	at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:150)
	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:123)
	at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:87)
	at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
	at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
	at TempTestSuite1571659961461.run(TempTestSuite1571659961461.groovy:35)
Caused by: java.lang.IllegalArgumentException: Url cannot be null or empty
	at com.kms.katalon.core.webui.keyword.builtin.NavigateToUrlKeyword$_navigateToUrl_closure1.doCall(NavigateToUrlKeyword.groovy:75)
	at com.kms.katalon.core.webui.keyword.builtin.NavigateToUrlKeyword$_navigateToUrl_closure1.call(NavigateToUrlKeyword.groovy)
	at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
	... 19 more

What works:

  1. Test suite that is run remotely on Browserstack and global variables stored in a profile.
  2. Test suite collection that is run with a locally installed browser instance and global variables stored in a profile.

What I already tried to narrow it down

  1. As the test suite is already running on Browserstack and the exception is not the same as in the problem behind a proxy I suppose, that this problem has nothing to do with it. Thanks anyways @kazurayam, this restriction is good to know about as well.
  2. The setup of the profiles and the test suite colltection is as far as I am aware correct, as you can see here. At least locally, it all works fine. The test suite for itself runs remotely with the profile as well fine.
  3. I tried to hardcode the values of the global variables that are stored in a profile in the test listener and test cases and the test suite collection worked not only locally, but also remotely (i.e. the URL can be resolved etc.).
  4. I tried to call a global variable not in the test listener (here’s the setup), but only in the test cases and the mentioned exception is thrown. This means, the problem is not restricted to the test listener. Test cases will throw the same exception.

My conclusion
This problem is only restricted to the combination of a

  1. test suite collection,
  2. Browserstack and
  3. the usage of global varibales stored in a profile.

So I guess, that this is the best guess at the moment:

@Ibus, @Russ_Thomas, @ThanhTo, @devalex88, @duyluong: Have you any hints, how to solve this?

Many thanks,
Florian