How do I insert a screenshot or a file to a test step?

There are multiple ways to upload a file into a Rainforest test. Although there is a programmatic method to embed files via our CLI (see here), you can easily do this by dragging and dropping the file into a test step in the Rainforest dashboard.

Insert (upload) files to your test:

  1. You can directly drag a file from your file location onto the text field. You will see a + symbol when is hovering over the text field.
  2. Once you drop the file, the file will be given a file number and enclosed by double braces {{}}.
  3. Click save, and then the file name will convert into a gray box.

How do I instruct testers to download a file?

If you have a file a tester will need to interact with, Rainforest provides multiple options for that process. The first is to provide a URL link to the file hosted on Dropbox or other hosting sites.

Provide URL to file:

The first is to provide a URL link to the file hosted on Dropbox or other hosting services. You can ask testers to:

Sample Step
Action: Open a new browser tab, and go to [hosting URL]
Question: Did the file download?

Drag & Drop file into test:

When you embed a non-image file (.csv, .doc, .txt, etc.) into a test, it will autoformat as a downloadable file {{file.download(x,x)}} instead of {{file.screenshot(x,x)}}. In the Test Edit view, the file will be clickable and will download directly from the test step.

For testers, the file will appear as a URL they can copy/paste in a new browser tab, you should instruct them to open a new tab within the VM and download the file in that new tab.

Sample Step
Action: Open a new browser tab, and navigate to {{file.download(x,x, filename)}}
Question: Did the file download successfully? 

Force image files to be download files:

By default, when images files (.jpeg,.png,.gif) are uploaded to a test, they will autoformat as a screenshot. This allows testers to click and view the image file. If you wish for the tester to download the file, you will have to modify the file name in the text box edit field.

  1. Embed the needed files and provide clear instructions what to do with those files.
  2. Make this a downloadable image, {{ file.screenshot(x,x) }}, by replacing "screenshot" with "download", then add a comma and give it a name before the close parentheses, keep space after the comma. 
  3. The file name can be anything you like (i.e. file, uploadPic, dataset). However, it is best to include the file type to the name (i.e. .png, .jpg, .csv, .doc, .txt) 
  4. So the step will say something like "{{ file.download(1241, yxpWco, file.png) }}"
  5. The tester will see "Download this file:https://f.rainforestqa.com/1241/file?mac=yxpWc0" (they'll be able to copy this link and paste it into a browser to download the file.

Did this answer your question?