I have been able to call and execute TC2 (Test Case 2) from TC1 without parameters successfully.
However, when I try to pass any parameters, they always end up blank in TC2, causing it to fail.
I tried modeling my calls based on the formats in the following locations:
TC1 CODE:
import ...
String sEmail = 'DeleteME@mailinator.com'
String sSubject = 'Subject Data'
String sScrnShtPrefix = 'Test - '
String sTmStmp = 'May 5, 2005 '
String sHOUR = '7'
String sMIN = '11'
// WebUI.callTestCase(findTestCase('MailCatcher-GetEmailBodyText'), ["sEmailAddress": sNonISUEmail, "sSubject": sSubject, "sScrnShtPrefix": sScrnShtPrefix, "sTmStmp": sTmStmp, "sHOUR": sHOUR, "sMIN": sMIN], FailureHandling.CONTINUE_ON_FAILURE)
WebUI.callTestCase(findTestCase('MailCatcher-GetEmailBodyText'), ['sEmailAddress': sNonISUEmail, 'sSubject': sSubject, 'sScrnShtPrefix': sScrnShtPrefix, 'sTmStmp': sTmStmp, 'sHOUR': sHOUR, 'sMIN': sMIN], FailureHandling.CONTINUE_ON_FAILURE)
// WebUI.callTestCase(findTestCase('MailCatcher-GetEmailBodyText'), ['sSubject': sSubject], FailureHandling.CONTINUE_ON_FAILURE)
TC2 CODE:
import ...
String sEmailAddress // Will receive value from test case that calls this
String sSubject // Will receive value from test case that calls this
String sScrnShtPrefix // Will receive value from test case that calls this
String sTmStmp // Will receive value from test case that calls this
String sHOUR // Will receive value from test case that calls this
String sMIN // Will receive value from test case that calls this
int iHour
int iMinute
WebUI.comment(sEmailAddress)
WebUI.comment(sSubject)
WebUI.comment(sScrnShtPrefix)
WebUI.comment(sTmStmp)
WebUI.comment(sHOUR)
WebUI.comment(sMIN)
iHour = sHOUR.toInteger()
iMinute = sMIN.toInteger()
The commented out lines in TC1 were other attempts that also failed.
Every single one of the comments in TC2 displayed in the Log Viewer shows a blank line.
How do I get TC1 to properly pass the values from TC1 to the variables in TC2?