I am currently trying to add an Excel data file to my Katalon tests.
I create the data file and stored that in the Data Files folder of the Katalon Studio folder.
I linked the data file to Katalon:
I created a Data Preparation test case and added the following:
def datainfo = [‘sitenames’:‘’]
def data = TestDataFactory.findTestData(“Data Files/td_SitesNames.xlsx”)
datainfo.sitename = data.getValue(1,4)
I referenced the data preparation test case in my script:
def info = WebUI.callTestCase(findTestCase(‘Sprint 1/DD_Data_Preparation_Tests/DD_001_Data_Preparation_SiteNames’), [:], FailureHandling.STOP_ON_FAILURE)
//parameter creation for sitename
**def sitename = info.sitename
**When i run my test the following error keeps being thrown:
**Test Cases/Sprint 1/DD_Data_Preparation_Tests/DD_001_Data_Preparation_SiteNames FAILED because (of) java.lang.IllegalArgumentException: Cannot find test data with id ‘Data Files/td_SitesNames.xlsx’ because (of) ‘java.lang.IllegalArgumentException: Test data with id ‘Data Files/td_SitesNames.xlsx’ does not exist’
I am lost at this point. Is the file incorrectly linked? Am i doing a long winded approach to something that could be accomplished in a simpler way?
Thanks in advance for your help.