Ranorex is more than just a simple capture and replay tool. It is a versatile test automation software that offers a range of tools suitable for every skill level. While you don’t need any programming skills to easily create and maintain your tests with the Ranorex Recorder, you can also manually create your automated tests.
What are the benefits of manual test case creation?
- Keep your Ranorex Object Repository structured and easily maintainable from the start.
- Create robust test cases that uniquely identify dynamic IDs.
- Ensure only those UI elements you want to test are available in your Ranorex Object Repository.
- Automate complex test scenarios in code using the Ranorex Object Repository.
In this example, we’ll use KeePass as the application under test (AUT). This open source password manager application is one of our sample applications delivered with Ranorex Studio, so you can easily recreate this example.
In this blog, we’ll show you how to
- generate a Ranorex Object Repository containing exactly those UI elements you want to address in your automated test,
- drag and drop the resulting repository items to your action table or
- drag and drop items directly into your user code to represent the workflow you want to test.
The Ranorex Object Repository
The Ranorex Object Repository manages the UI elements of your automated test. A repository item is automatically created in this central Ranorex Object Repository when you record or track a UI element. If you change a repository item, these changes are automatically applied in the code as well as in the recording module.
Start by opening your solution and add an empty recording module. You will notice that the central Ranorex Object Repository of your test automation project is displayed directly below the action table. You can now add UI elements to the repository using the ‘Track’ button in the Ranorex Object Repository.
Enhancing the RanoreXPath
You can alter the RanoreXPath of specific repository items to make them more robust. Simply open the path editor and click on the ‘Edit’ button next to the item. For more information about the RanoreXPath, please have a look at the user guide chapters RanoreXPath and RanoreXPath Editor. If you’d like to know how to best enhance the object recognition of your AUT using the RanoreXPath operators, check out the blog post RanoreXPath – Tips and Tricks.
Keep your repository clear and structured
If your Ranorex Object Repository contains many objects, it’s particularly important to keep it clearly structured and organized. Here are two tips:
Rename repository items
Each UI element within the repository can have a logical user-defined name. Renaming repository items and giving them logical names will make it easier to understand test automation code and report files.
Create Logical Folders
You can also create logical folders to structure and group UI elements that logically belong together. For detailed instructions on how to structure your Ranorex Object Repository, please check out our user guide chapter Adapting an Existing Repository.
As your Ranorex Object Repository now contains multiple UI elements, you can add actions to the recording. Do so by either selecting ‘Add New Action’, or simply drag & drop specific repository items from the repository to the action table in the recording.
If you’d like to connect data to your automated tests and use variables in the action table or the repository, have a look at the user guide chapter Data-Driven Testing.
The User Code
You can also create your actions directly in user code. Simply drag and drop the specific repository item from the Ranorex Object Repository directly into the code editor.
In the user guide chapter Code Examples you can find further examples on how to extend modules with user specific code.
As you can see, you can create your automated tests manually without pressing the record button at any time. This will give you more control over the actions that should be triggered.
Software quality is a core concern for all software developers, and it encompasses more than just the code. Here’s how to improve software quality in nine ways.
This is a helpful guide on how to reduce software testing times and the benefits of doing so. Check out these four tips to achieve more time-efficient testing.
This comprehensive guide covers the ins and outs of behavior-driven development. Learn all there is to know here, including benefits, challenges, and more.