This article provides information on the mechanics of how to use Rainforest Automation test writing page.
Start a New Test
- Start a new test test by selecting + New Test link from Tests page
- Enter the Test Name and Test Type
- Ensure Test Language is set to Rainforest Test Language
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
- Load the VM
- Set VM to correct URL
- Write the test steps using RFA
- Execute tests write you write them
- 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.
- Ensure view is on VM Terminal.
If not. please select VM Terminal, located just under the test name in the upper left corner
- Confirm Location.
Default is fine but you can change if necessary
- 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
- 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
- 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.
- Paste it into VM browser URL.
- 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.
- Select " + " on the right side to start writing tests
- 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.
- 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
- 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
- Continue adding steps, by selecting the " + " where you want to add the step
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.
- Ensure that a VM with the appropriate browser is loaded.
If not Click "Get a new VM" to ensure a VM is available.
- 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.
- Follow instructions as outlined in the steps
Validate the test
As you write the test, you will want to validate the test to make sure it is accurate.
- Select Run Draft (blue button at top of page)
- Select Run this test with is set to Rainforest Automation in the modal
- Select the same platform you used to create the test
- Select Confirm
- 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.
- Select Run for the test or test group
- Go to the Runs page
- 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.
- Watch the test execute
Status of the individual steps will show up under the VM and you can watch the bot execute
- Once the test is done running - the screen will refresh showing the full results and you can replay it as you wish.