Rainforest Automation: Test writing page

This article provides a step by step guide to writing Rainforest Automation Tests.

Overview

This article will walk you through creating a Rainforest Automation test.

Create a New Test

  1. Click the Create Test button from the All Tests page to start a new test.
  2. Select one of your Sites to test or add a new one by entering the URL in the Add a New Site tab.
  3. Select Quickly capture UI elements with screenshots under How do you want to compose this test?
  4. Click on Create Test

Your new Rainforest Automation (RFA) test will open automatically.

Writing tests

The following are the general steps for writing an RFA test. Each step is covered in more detail below.

  1. The virtual machine (VM) will automatically load your account's default platform. You can change that platform at any time in Settings. View test settings by clicking the gear icon at the top-right of the screen. After selecting a different platform from Select Platform(s), you must reload the VM. To do this, close settings, click the More button in top-right and select Reset Virtual Machine.
  2. Once the VM loads, it will navigate to the Starting URL you specified on the previous screen. You can change this URL by clicking the edit pencil on the first action, Start at.
  3. Name your test by clicking Untitled Test in the top left of the screen.
  4. Once you've added your first action, select it, then click the Preview Actions button in the bottom left corner of the screen. Preview Action allows you to view the result of your action in real-time in the VM to the right. See below for more detail on how to add an action.
  5. If the action behaves as you expected, proceed with adding more actions and previewing them to validate. Be sure to click Save Changes every so often!
  6. Once you finish writing your test, kick off a run by clicking Run Test in the top-right.

Adding Actions to Your Test

Tests are composed of actions. Actions are composed of a verb, what you want to do, and a noun, what you want to act on. For example, "Click the Login Button." Rainforest Automation: Actions & Assertions has more details on the available actions.

  1. Click the Select action or embed test dropdown in the left column to add your first action.
  2. Select the action you wish to take, such as Click, Fill, or See. Learn more about RFA actions and how to use them.
  3. Depending on the action selected, provide the necessary information.
  4. To capture a screenshot for an action, click on the word screenshot. Then drag a rectangle over the area of the interface you want to capture. You can retake the image at any time by clicking the screenshot and clicking Recapture Element. Be sure to include the name of the element. This information will be used to execute the test, both by our Automation Service and our Tester Community.
  5. Continue adding actions using the Select action or embed a test dropdown or the plus (+) symbol between steps if you wish to add a step between two existing ones. You can also re-order actions by using the grip icon (=) on the right of each action.
  6. Select Preview Actions to preview all the actions from the beginning or select individual actions to see only the selected group.
  7. To delete actions, select them, and click the Delete button at the top of the list. A deleted action cannot be recovered if the test has been saved.

Note: Be sure to click Save Changes at the top of the page to save your test periodically. Changes are not saved automatically, but you will receive a warning if you try to leave your test without saving it first.

Virtual Machine

The virtual machine (VM) is essentially your browser within a browser, so you can use it to navigate your site while writing your RFA test. Use the VM to capture UI elements like buttons, text fields, or text—any features with which you can click, fill, drag, or otherwise interact.

  1. The VM will automatically load when you open an RFA test.
  2. By default, the VM location will be in the USA. You can change the location of the VM at any time in Settings. View test settings by clicking the gear icon at the top-right of the screen.
  3. The VM will automatically load your account's default platform. You can change that platform at any time in Settings. After selecting a different platform from Select Platform(s), you must reload the VM. To do this, close settings, click the More button in top-right and select Reset Virtual Machine.

Resetting Step Variables

If you are using certain step variables, you may need to reset the variables to use them again. To do this, click the More button in the top-right of the screen and select Reset Virtual Machine to reset your environment. Learn more about Step Variables.

Validate Your Test

As you write your test, you may want to validate its accuracy without adding unnecessary noise to your results screen. By setting your test to draft, the results are stored separately from your real runs, and everyone knows it is a work in progress.

  1. Go to Settings by clicking the gear icon at the screen's top-right and toggle on Set this test to draft.
  2. After closing Settings, click Run Draft in the top right of the screen.
  3. Set How this run will be executed to Automation Service or select Change to run it using our Tester Community.
  4. Select the same platform you used to create the test.
  5. Click Start Draft Run.
  6. Review the results on the Draft Runs tab in Results.

Running Your Test

Use the Run Test or Run Draft button in the top right to run your test.

Reviewing Your Test Run

Watch your test run in real-time from the Run Results page.

  1. Navigate to the Results screen using the tachometer icon in the main navigation.
  2. Tests can be found in the Runs or the Draft Runs tab, depending on the test's status. Tests that are in the draft state will be located in the Draft Runs tab.
  3. Select your test or the name of a run that is executing. (The status will be ABORT. Do NOT select Abort as it will abort the run.)
  4. On the Run Summary page, select the test you want to view; this can be either a single test or a test from the run group.
  5. On the Test Results page, watch the test run in real-time and see the status of the individual actions under the VM.
  6. Once the test run is complete, the screen will refresh, showing the full results. You can replay the video by clicking the replay button in the video controls.

Reviewing the Latest Test Run

Review the status of past runs at any time in Run History. View Run History by clicking the back-in-time clock icon at the top-right of the screen.

If you have any questions, please feel free to reach out to us at [email protected] or through Intercom!

Updated about a month ago


Rainforest Automation: Test writing page


This article provides a step by step guide to writing Rainforest Automation Tests.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.