Custom Actions Overview

Custom Actions are actions (steps) or sequences of actions that happen over and over again either within a single test or for multiple tests.   Instead of writing the same actions (steps) several times, you can create them as a Custom Action and then embed them into other tests.  If you have used Rainforest's traditional test writing, Custom Action is similar in concept to Embedded tests.

In addition to saving time, if something changes, only a single change would need to be made to the Custom Action and it will take effect in multiple places.  When you update a Custom Action, it will automatically be updated in any tests it is called from.  

Example:  Prior to any other action, you need to log into your site.  This may be five or six steps.  This can be made a Custom Action and embedded into other tests so you don't need to constantly rewrite the login steps.  Additionally, if the login process changes (the LOG IN button changes to SIGN IN), you only update this once and it would take effect for any place the Custom Action is executed.

NOTE:
You cannot convert a current test step or group of test steps to a Custom Action.  If you realize that specific steps would be better served as a Custom Action, the steps would need to be re-written specifically as a Custom Action. 

This article discusses:

  • Creating a Custom Action
  • Adding a Custom Action to a Test
  • Editing a Custom Action
  • Deleting a Custom Action
  • Duplicating a Custom Action

Creating a Custom Action

  1. Login to Rainforest
  2. Select Tests from green side navigation bar 
  3. Select Custom Actions from side navigation bar (within the TESTS section, above FEATURES)
  4. Select New Custom Action button
  5. Build the custom action as you would any Rainforest Test Language (RTL) test
  6. Ensure the test is named descriptively and accurately as this name will be displayed in the Custom Action area when you build other RTL tests.  

NOTE:
Custom Actions
are built in the same manner as a standard RTL test is.  however you have to build from the Custom Actions area (you cannot build Custom Actions from the standard RTL are.  
You cannot embed a Custom Action within another Custom Action, however you may use one or many Custom Actions in a RTL test.  
A Custom Action must be part of a larger test (even if it is the only steps in the test) in order to run.  You cannot execute a Custom Action by itself.  

Adding a Custom Action to a RTL Test

A Custom Action can be thought of as a mini-test unto itself (however as noted elsewhere - it cannot execute without being embedded into a larger test), but its usefulness is more so when you combine them with another test.

  1. Login to Rainforest
  2. Select Tests from the green side navigation bar
  3. Select the test you want to add the Custom Action to.  
    Please note that Custom Actions can only be added to RTL tests.
  4. Ensure that Actions is selected on the right and find the Custom Action you want to use listed under Custom Actions
  5. Create a new test flow anywhere within the test outline to add the Custom Action (will show as a grey box with "This is a new block")
  6. Click the Custom Action you wish to add and it will be added to the new block
  7. To add a Custom Action to the end of the test flow, simply click the desired Custom Action and it will be added to the end of the test flow

NOTE: to view and edit the details of the Custom Action from any test, select "Go to Custom Action"  button  

Editing a Custom Action

You may edit a Custom Action at any time.  Perhaps the necessary steps have changed or a button has been updated.  

  1. Login to Rainforest
  2. Select Tests from green side navigation bar 
  3. Select Custom Actions from side navigation bar (within the TESTS section, above FEATURES)
  4. Select the Custom Action you wish to update by clicking anywhere on the row (except the checkbox).  This will advance you to the Custom Action.
  5. Update any items in thee test and/or update the test name 

Delete a Custom Action

You may delete a Custom Action it at any time, however a  Custom Action cannot be deleted if it is being used by another test.  It must be removed from all tests prior to its deletion.  

  1. Login to Rainforest
  2. Select Tests from green side navigation bar 
  3. Select Custom Actions from side navigation bar (within the TESTS section, above FEATURES)
  4. Select the checkbox the Custom Action you wish to Delete or select the checkox at the top to delete all Custom Actions.
  5. New options will appear at top of page.   Select Delete.
  6. A Popup will be presented.  Select Delete.  
    Note: This action cannot be undone and the Custom Actions will no longer be available for use in other RTL tests

Duplicate a Custom Action

When a Custom Action is duplicated all  information is copied including the title and "(Duplicate)" is added to the end of the title.  The duplicated Custom Action should be renamed to reflect changes to the functionality.

You may want to duplicate a test if you want to try to build some new steps, while not entirely removing steps known to work, build a similar sequence of steps with slight changes, keep a copy in case you need to revert back to those steps for some reason.  

  1. Login to Rainforest
  2. Select Tests from green side navigation bar 
  3. Select Custom Actions from side navigation bar (within the TESTS section, above FEATURES)
  4. Select the checkbox the Custom Action you wish to Duplicate or select the checkbox at the top to delete all Custom Actions.
  5. New options will appear at top of page.   Select Duplicate.
    NOTE: New tests will now be available to be used by other RTL Tests.

Did this answer your question?