Android devices have a massive share of the global user population. Because more and more people are using Android smartphones, app developers need to be able to test their application’s functionality on Android devices just as they would on Windows desktop or Apple...
The RocketStart new solution wizard
The RocketStart new solution wizard launches automatically the first time that you open Ranorex Studio, or when you choose “New test solution using wizard…” from the file menu or the start panel.
Begin by selecting the technology that you plan to test. The wizard will walk you through:
- Setting up your test automation solution for your needs
- Configuring your desktop, web, or mobile application for testing
- Selecting the desired recording behavior for error-free recording
In selecting a recording behavior, you can choose from the following options:
- Focus on single application: record only actions performed in the application under test, ignoring interaction with any other running applications
- Record actions in specific applications: record interactions with several applications
- No focus applied: record all interactions and consider all running processes when searching for UI elements.
This approach is called whitelisting in Ranorex Studio. Focusing Ranorex Studio on only the processes relevant for your test has two advantages. First, it increases performance during test recording, test execution, and in Ranorex Spy. Second, it helps you create clean recordings since you can interact only with whitelisted processes. You can find the whitelisted process(es) in the Whitelist pad in Ranorex Studio:
After the wizard finishes, a new First Steps built-in tutorial automatically appears, as shown below. This tutorial demonstrates how to automate your first test.
Best practices in test automation – setting up and cleaning up your test environment
In Release 8.3, we have applied best practices by giving the test suite a more global view of the application under test. Instead of requiring you to choose the application under test each time that you start recording, we’ve moved this functionality to a separate “StartAUT” module. This module is automatically created by the RocketStart new solution wizard and appears in the setup region of the default test case. Additionally, the wizard automatically creates a CloseAUT module in the teardown region, to shut down the application under test.
As a result, you are no longer prompted to choose the application under test when you start a new recording session, as was the case prior to release 8.3:
Instead of selecting the AUT in the Ranorex Recorder, now you choose it in the RocketStart new solution wizard.
Setup regions are always executed before anything else in the direct parent item. It’s a best practice to populate the setup region with the modules and module groups needed to bring the AUT to the state required for the following modules to run, such as starting the AUT.
Teardown regions are always executed after everything else, or when an error occurs in the direct parent item. Here the best practice is to populate the teardown region with the modules and module groups needed to clean up the AUT after a test run, such as closing the AUT.
Following these best practices will help you set up robust and sustainable test automation projects. When creating a new test case, always keep in mind to include a clean startup and shut down of your application(s) under test, with all of the cleanup tasks necessary for an error-free next test run.
For an overview of a more complex test suite, refer to the desktop sample provided with Ranorex Studio.
As you can see in the screenshot above, there is a setup and a teardown region for the smart folder “AddNewEntry”. The setup region contains a module group which starts KeePass and logs in. The teardown region contains a module for saving the changes and a module for shutting down KeePass. The same goes for the test case “AddNewGroup”: a start and login module in the setup region, and a save and shut down module in the teardown region. In this test suite project, we also have a teardown section for the entire test suite. As you can see, whether or not the entire test succeeds, the modules in the teardown region will execute, thus cleaning up the previous test run.
When you are planning an end-to-end test spread over several different technologies, it is useful to separate the different technologies into individual projects. Simply create a module library project for each technology or app that you are testing and combine the execution of the generated modules in one test suite project.
Open the sample cross-platform solution for an example.
As you can see, there are several module library projects – one for desktop, one for web, one for iOS and one for Android. Additionally, there is a test suite project called “CrossPlatform” that combines the modules from the different projects together in one big test suite.
There are setup and teardown regions for all test cases in this test suite, which perform startup and cleanup actions for the different technologies using the modules from the technology-specific module library projects.
The Recorder Control Center
Last but not least, we have polished our Recorder control center to give you more control during the recording process. The recorder now displays a history of the last four actions, providing instant feedback during recording. You can delete recorded actions right in the recorder or add new ones using the recorder’s controls, making your recordings even more effective right from the star
To learn more, check out our user guide. You can also register for a free webinar on October 11, featuring a live demonstration of the new features in Ranorex Studio 8.3.
Related Posts:
7 Best Android Testing Tools
There are more and more Android testing tools available for mobile app developers. These are our favorites for performance, accessibility, and security.
What Is the Difference Between Regression Testing and Retesting?
Regression testing and retesting are essential methodologies testers employ to ensure software quality. If you’re new to both or aren’t sure when to use which technique, this article should help. We’ll discuss the importance of regression testing in software testing. ...
DevOps Test Automation Tools & Best Practices
DevOps test automation enables teams to work faster and create better products. These best practices and tools make it easier to implement test automation.