Operating System Windows 10
Katalon Studio Version
5.9.1
Steps to reproduce
Main script:
String cat = WebUI.callTestCase(findTestCase('test1'), [:], FailureHandling.CONTINUE_ON_FAILURE) println(cat)
test1:
String cat = "kitten" println(cat + "!") try { CustomKeywords.'my.Customs.testKeyword'() } catch (Unsaved) { System.out.println('lol') } return cat
testKeyword:
def testKeyword() { println("This keyword is going to fail cause a browser isn't open") WebUI.navigateToUrl("https://docs.katalon.com/") return }
Expected Behavior
I expect the console to spit out “kitten!” “This keyword is going to fail cause a browser isn’t open” “lol” “kitten”
Actual Behavior
You actually end up with “kitten!” “This keyword is going to fail cause a browser isn’t open” “lol” “null”
I’ve read other threads about called test cases failing if a catch is triggered inside of it; I can work around that (I was surprised to see in my investigation that it’s failing if it contains a custom keyword, but not failing in simpler scenarios).
But the failed case is also failing to send its return value. For reasons that are long-winded, I really need to send some info back to my main script from a failed test case (more than just “this is why it failed”).
Can anyone think of a workaround?