Performing file upload in Katalon TestCloud

If we running the katalon test script at our local machine, we can use WebUI.uploadFile(TestObject to, String fileAbsolutePath) to upload the file/image to the web with the local file path.

My question is, if we are running this script in Katalon TestCloud, how should we perform this task?

  1. where should we store the file/image in the Katalon project?
  2. what function/method we should use to upload the file? instead of using WebUI.uploadFile
  3. how are we going to call the file/image in the project?

I believe in your test case you can use the following code to access the file/image:

TestDataFactory testDataFactory = TestDataFactory.newInstance()
File file = testDataFactory.findTestData(“testdatafilename”).getValue(“fieldname”)

Here, “testdatafilename” is the name of the file you uploaded in the Data Files folder and “fieldname” is the name of the column in the file that contains the file path.