SiKing
13 years agoCommunity Hero
DataSource: Goto Loop on Empty
I have a Groovy DataSource that I am struggling with.
I need to generate all possible locales. I used the following script in the DataSource:
However, our application does not support any locales that do not follow the xx_YY format; Java 7 has like 8 or something that do not. So I added the following to my script:
and I checked the "Goto Loop on Empty" in the Options. The test still runs through the (now) empty ones. I also tried:
still same problem. I also tried:
still same problem.
What is the "Goto Loop on Empty" option suppose to do?
I need to generate all possible locales. I used the following script in the DataSource:
def row = testRunner.testCase.testSteps["generate Locales"].currentRow
result["oneLocale"] = Locale.availableLocales[row].toString()
However, our application does not support any locales that do not follow the xx_YY format; Java 7 has like 8 or something that do not. So I added the following to my script:
if(result["oneLocale"].size() > 5)
result["oneLocale"] = ""
and I checked the "Goto Loop on Empty" in the Options. The test still runs through the (now) empty ones. I also tried:
if(result["oneLocale"].size() > 5)
result["oneLocale"] = null
still same problem. I also tried:
if(result["oneLocale"].size() > 5)
testRunner.gotoStepByName("next Locale") // corresponding DataSourceLoop
still same problem.
What is the "Goto Loop on Empty" option suppose to do?