Overview

This article provides information on the mechanics of how to use Rainforest Automation test writing page. 

Start a New Test

  1. Start a new test test by selecting + New Test link from Tests page
  2. Enter the Test Name and Test Type
  3. Ensure Test Language is set to Rainforest Automation

You will be advanced to the Rainforest Automation (RFA)Test Writing screen, optimized specifically for RFA test case creation.

Writing in Rainforest Automation

The following are the general steps for writing a RFA test

  1. Load the VM
  2. Set VM to correct URL
  3. Write the test steps using RFA
  4. Execute tests write you write them
  5. Validate the test

Load the VM (Virtual Machine)

You will use the VM to capture the UI elements to write the tests, this way you can ensure that you see exactly what our test bots will see.  The UI elements are buttons, text fields, text, etc.  Basically any elements that you can click, fill, drag, see or otherwise interact with.

  1. Ensure view is on VM Terminal.
    If not.  please select VM Terminal, located just under the test name in the upper left corner
  2. Confirm Location.  
    Default is fine but you can change if necessary
  3. Select Platform
    Change by hovering over icon and selecting a new platform if needed.
    This should be the specific platform you want to execute the test against
  4. Select Load VM
    VM will load and you may now write tests live within the VM

Set the VM to the correct URL

To set VM to correct URL

  1. Select and copy the URL from the Test URL
    At top of page under test name.
    When you select copy it should automatically also copy into the VM clipboard as well.  
  2. Paste it into VM browser URL. 
  3. Terminal is now set to the correct starting URL

NOTE: if you have difficulty doing this for some reason, simply retype the test URL into the VM.  When the test is executed it will use the URL as noted at the top of the page (Test URL)

Alternatively if the starting URL needs to be different than the standard URL, you may select Navigate and provide a URL in the actual test steps.  

Write test steps using RFA

RFA steps are formatted in a VERB, NOUN structure.  
Select what you want to DO, then identify the object you want to take the acton ON.  Such as CLICK the LOGIN button.  

See Rainforest Automation: Actions & Assertions for more details on available actions.

  1. Select " + " on the right side to start writing tests
  2. Select the ACTION you wish to take such as CLICK, FILL, SEE
    For a full list of Actions and how they are used - see here
  3. Based on the ACTION selected, provide the necessary information.
    Ensure that you provide accurate information as the step can also be used for Rainforest Human Testers.
    If you want to FILL in Email information,set the Label field to Email or something else that will make sense you and to any human testers that may test it
  4. Highlight the element on the VM (if needed) by selecting the Camera icon on the step.  You may retake the the image if needed by selecting the Camera icon again
  5. Continue adding steps, by selecting the " + " where you want to add the step

NOTE:
Select Save Changes at the top of the page to save.  Changes are NOT saved automatically.  

Once an Action is selected in a step, it can't be changed.  You can however delete the step itself and start the step over again.  

  • Edit a step
    Select the Pencil for that step.  The Action type will not change but all the information will be removed and you can enter the new information for the action. 
  • Delete a step
    Select the Trash Can for the step
  • Move a step
    Select the dots (next to trash can) and drag the step up or down to where it needs to be.

Executing tests while you write them

As you write tests, you will want to be able to execute the tests as well so you can test them and advance along the test path so you can continue to write the tests.

  1. Ensure that a VM with the appropriate browser is loaded.
    If not Click "Get a new VM" to ensure a VM is available.  
  2. Click on the test step number (automatically becomes a checkbox) or check the checkbox at the top of the step column to run all steps.
  3. Follow instructions as outlined in the steps

Resetting Step Variables

When writing tests, you may run the tests several times in instant replay. You may need to have the variables reset in order to do so. To reset variables so you can use them again while on the Test Writing page, just select Get a new VM button and it will reset the RTVs so you can run your test again.

Validate the test

As you write the test, you will want to validate the test to make sure it is accurate.

  1. Select Run Draft (blue button at top of page)
  2. Select Run this test with is set to Rainforest Automation in the modal
  3. Select the same platform you used to create the test
  4. Select Confirm
  5. Review results via Results / Draft Runs and update as necessary. 

Publish the test

Once the test is validated and accurate, set to Publish

Running the test

When a RFA test is run, you may actually watch it run in real time.   

  1. Select Run for the test or test group
  2. Go to the Runs page 
  3. Select the RFA test name or run that is executing.  
    The status will be ABORT.  Do NOT select Abort as it will abort the run.  
    This will advance you to the Run Summary page.  Select the test you want to watch (either the single test or a test from the run group) . This will advance you to the Test Results page.
  4. Watch the test execute
    Status of the individual steps will show up under the VM and you can watch the bot execute
  5. Once the test is done running - the screen will refresh showing the full results and you can replay it as you wish. 

Reviewing last run

While on the Test Writing page, if you wish to view the last run, select the last run status at the top and you will be returned to the last run.



Did this answer your question?