How to parameterize files for the file upload feature?
Question:
How to parameterize files for the file upload feature? (Like we have a random set of files as test data for upload)
Attached is the Test designer script and associated files that can be used for testing which was created on a public-facing site.
This example has files (5 different files) that are followed by numbers like filename1, 2, and so on.
By making use of Math.floor, we can generate random numbers as needed and can be passed to grab the files on the run, this way every time it runs, it will generate a random number, and based on the generated number, it will pick up the file from the resources.
Below is an example screenshot for test designer steps.
This file contains a sample script: FileUpload.zip