This lesson will show you the benefits of splitting your recordings into smaller pieces (to provide for reusability) and how your projects can be easily assembled afterwards using drag and drop functionality in Ranorex Studio.
The ease of recording user actions encourages one to record all test cases without thinking about reusability. But in the long run, this could increase the effort in test automation maintenance. For this reason you should separate a recording into smaller reusable recording modules as suggested by the keyword driven methodology. In the following section you will learn how to separate existing recordings into smaller pieces to be reused by other test cases.
In order to split recordings into smaller automation modules, select related actions and use the context menu item 'New Recording From Selection'. Within the underlying recording, the three actions performing the log-in should be selected and moved into a new recording named 'LogIn'. These three actions are a click on the password field, a key sequence on the password field and finally a mouse click on the OK button.
Then, select and move all items used to add a new entry to the database to a new recording named 'AddEntry.rxrec'.
Repeat the previous steps to create modules for 'ValidateEntry', 'DeleteEntry', 'SaveDB' and for 'CloseApplication'.
Also rename the initial recording file (with only one recorded item left for starting the application) from 'Recording1.rxrec' to 'StartSUT.rxrec'. In the end you should have seven separate new recording modules.
After splitting the initial recording into smaller test actions, the Ranorex Module Browser also contains the new modules. Now simply use the drag and drop feature to combine these modules within the test case.
Download Test Automation Guide
(PDF file, 20MB)