Test Suite stops running when a called test case returns values, anyone knows why?

Hi Everyone,

I have a shared test case like Test Case Callee, which has return values. Then in another test case, the Callee test case is called.
The problem is whenever i run the test cases in test suite, Katalon stops at return value step.

Does anyone know why this is happening?
Thanks,

Do you have an actual “return” command in the Test Case? Is there an error message in either the TC log or reports?

yes, here is the script, the shared test case:
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import static com.kms.katalon.core.testobject.ObjectRepository.findWindowsObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows
import internal.GlobalVariable as GlobalVariable

// Navigate to Workflow - Feed Order Request
CustomKeywords.‘pageObjects.NavigationBar.navigateToWorkflowFeedOrderRequest’()
// Wait for Create Order Requests page to load
CustomKeywords.‘pageObjects.FeedOrderRequest_LandingPage.isFeedOrderRequestPageLoaded’()
// Pick the bin that has Remaining
String binWithRemaining = CustomKeywords.‘pageObjects.FeedOrderRequest_LandingPage.getBinNameWithRemaining’()
String barnWithRemaining = CustomKeywords.‘pageObjects.FeedOrderRequest_LandingPage.getBarnNameWithBinRemaining’()
String currentEmptyPrediction = CustomKeywords.‘pageObjects.FeedOrderRequest_LandingPage.getEmptyPredicationDateTime’()
System.out.println("currentEmptyPrediction: "+currentEmptyPrediction)
String currentRemaining = CustomKeywords.‘pageObjects.FeedOrderRequest_LandingPage.getRemainingValueWithBinRemaining’()
System.out.println("currentRemaining: "+currentRemaining)
// Navigate to Data - Manage Locations page
CustomKeywords.‘pageObjects.NavigationBar.navigateToDataLocations’()
// Wait for Locations page to load
CustomKeywords.‘util.CustomUtility.isDataManagementPageLoaded’()
// Select Filter by Barn
CustomKeywords.‘pageObjects.ManageLocations.filterLocationsByBarn’()
// Search for the barn
CustomKeywords.‘util.CustomUtility.searchBySearchCriteria’(barnWithRemaining)
String location = CustomKeywords.‘pageObjects.ManageLocations.getLocationNameInByBarnView’(1)
// Click View Link
CustomKeywords.‘util.CustomUtility.clickViewLink’()
// Wait for Barns Tab page to load
CustomKeywords.‘pageObjects.ManageLocations_Barns_BarnDetails.isBarnsDetailsTabPageLoaded’()

return [“location”: location, “barnWithRemaining”: barnWithRemaining, “binWithRemaining”: binWithRemaining, “currentEmptyPrediction”: currentEmptyPrediction, “currentRemaining”: currentRemaining]

You are trying to “return” a Map collection. Are you “collecting” a Map in the calling program? I have never returned a Map in this manner in Groovy. Have you done it before and did it work? Just curious, have you tried to switch the values around like below?

https://www.baeldung.com/groovy-maps

return [location : "location", barnWithRemaining : "barnWithRemaining" , binWithRemaining : "binWithRemaining", currentEmptyPrediction : "currentEmptyPrediction", currentRemaining : "currentRemaining"]

Since you have the Global Variable import at the top, you could use that to pass a GV Map variable back to the calling program instead of via return.

Good point, will try passing through the global variable. Yeah, i am not sure why, it does work before this last run, probably just related with katalon versions. As i changed my katalon version.