Skip to main content

How to parameterize files for the file upload feature?

Parameterize File Uploads in Scenario Editor

Question:

Use parameterized file uploads when a scenario needsHow to upload different approved testparameterize files across executions or data rows.

  • Store upload files in an approved location available to the execution host.
  • Use DPLs or test data fields to choosefor the file pathupload orfeature? file(Like name.
  • Avoidwe usinghave personal,a production,random orset sensitiveof files as test data.
  • Validatedata for upload)

    Attached is the Test designer script and associated files that thecan applicationbe acceptedused 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 uploadedfiles file.

on

Validationthe workflow

run,
  1. Preparethis approvedway filesevery time it runs, it will generate a random number, and file-pathbased data.
  2. Mapon the generated number, it will pick up the file reference intofrom the Scenarioresources. Editor upload

    Below step.

  3. Runis an example screenshot for test designer steps.

    This file contains a smallsample validationscript: execution.

  4. ReviewFileUpload.zip output
    and application evidence for upload success or failure.

    Last updated: SeptemberJune 20,26, 20262023

    If you have any feedback on this topic, please contact us at documentation@appvance.ai