I’m using Version: 5.4.2 Build: 1
Trying to run test case with .xlsx data file
Data file saved as “C:\katalon_projects\vrap\Data Files\EDEN.xlsx”
Linked it into Data Files
Since my file is saved in project data files folder, I called it with:
def data = TestDataFactory.findTestData(“EDEN”)
Error Message:
[ERROR] - Test Cases/EDEN/EDEN_QuickEntry FAILED because (of) java.lang.IllegalArgumentException: Cannot find test data with id ‘Data Files/EDEN’ because (of) ‘java.lang.IllegalArgumentException: Test data with id ‘Data Files/EDEN’ does not exist’
Data File Location
C:\katalon_projects\vrap\Data Files\EDEN.xlsx
The Data Files entry in the Tests Explorer needs to be EDEN, in order for the following to work:
def data = TestDataFactory.findTestData(‘EDEN’)
Did you use single quotes or double quotes around EDEN?
Yes, correct for this case, but just to be precise for the general case, what is stored in Data Files is the object. The object will point to the file. If you use relative path, the file can be anywhere.
[ERROR] - Test Cases/CloseRequest/CreateNewEntitiesOfProject/VerifyAndUpdateCreateNewEntities FAILED because (of) java.lang.IllegalArgumentException: Cannot find test data with id ‘Data Files/Entities_Details’ because (of) ‘java.lang.IllegalArgumentException: File is unsupported: C:\Users\luthrav\Downloads\GitRepository\MDM\MDM\Data Files\EntitiesDetails.xlsx’
I had the same issue the syntax is correct and all. The problem was how I ran the script, I ran it as a Groovy Script. But when I ran it using “Ctrl + Shift + A”(K Studio play button) it worked fine.