TestComplete 7 now supports more applications. Now you can use it to test mobile applications running on PDAs and Smart Phones that have mobile operating systems based on the Windows Compact Edition (WinCE) platform installed:
- Windows Mobile 6.0
- Windows Mobile 5.0
- Windows Pocket PC 2003
TestComplete includes panels, project items, keyword test operations, scripting objects and other features that have been specifically designed for testing mobile applications. All the “mobile” features are similar to the “desktop” features, but provide specific functionality. Let’s looks at these features closer.
Object-Oriented (High-Level) and Low-Level Mobile Application Tests
TestComplete recognizes processes running on the PDA as well as windows and controls of these processes as objects and organizes these objects into a tree-like structure. You can see this structure in the Object Browser panel under the PDA node:
As you can see, this structure is similar to the object structure of desktop applications except for the fact that the root element is called
PDA rather than
Sys. This is the key difference. All mobile objects belong to this PDA object. The direct children of this object are processes. They contain windows, which also contain other windows and controls.
TestComplete provides specific methods and properties for WinCE controls, so you can easily simulate user actions over the desired controls and windows by calling a specific method. For instance, you can simulate a tap-and-hold action within a control by calling the
ClickAndHold method rather than by simulating the tapping and holding event by screen coordinates.
The object-oriented approach makes your tests resistant to changes in the application. For instance, if developers change the layout of controls on a form, the test will still work and you will not have to change it.
TestComplete also emulates low-level events over mobile applications. You can use tests that represent a sequence of primitive actions: mouse up, mouse down, mouse move. These are all performed without objects; only screen-relative coordinates and the action type. Tests of this kind are called WinCE low-level procedures (similarly to Win32 low-level procedures). They are helpful, for instance, in testing manual input from the PDA screen.
Record Automated Mobile Application Tests or Create Them Manually
To test PDA applications, you can use keyword tests, script routines and special low-level procedures.
Using keyword tests and script code for mobile application testing does not differ from “desktop” tests. They just contain method calls to the object that belong to the PDA root.
These tests can be recorded or created manually with special editors. The test recorder is able to recognize PDA-specific events and record them correctly. However, there is one peculiarity: regardless of the actual type of input device, TestComplete recognizes user actions as “mouse” events: movements, clicks and others. For instance, the tap and tap-and-hold user actions are recorded as calls to the
If during recording you work with both PDA and desktop applications, the recorded test will contain commands for both application types. This functionality lets you easily test applications that are on a desktop computer, while another application runs on a PDA.
As for PDA low-level tests, TestComplete provides a specific project item, WinCE Low-Level Procedures Collection, that acts as a collection of these tests. You can record these procedures by using the Recording toolbar:
The recorded PDA low-level procedure is very similar to a “desktop” low-level procedure:
The recorded or created keyword tests, script routines and WinCE low-level procedures can be run from their editors or as part of a project.
Managing PDA Applications
TestComplete provides special features that make it easy to work with mobile applications from your TestComplete projects. The entire concept is very similar to the “desktop” tested applications support.
To manage your PDA tested applications, you use the WinCE Tested Applications project item. It serves as a collection of tested mobile application:
It is very similar to the list of desktop tested applications. It allows you to view properties of PDA applications and easily launch them from TestComplete’s IDE. In addition, you can also deploy tested applications from your workstation to the PDA.
As usual, the tasks that can be done from TestComplete’s UI can also be done from keyword tests and scripts: the test engine also provides special operations and scripting objects that help you deploy, launch and close the mobile applications from your keyword tests and script code.
Controlling PDA Devices
TestComplete includes a PDA Controller panel that displays the current screen of the mobile device and provides special buttons for controlling it. The PDA screen in the PDA Controller is just like working with the actual PDA itself: you can click on the screen and the click is immediately transformed into a tap event on the device. You can also simulate the tap-and-hold events, press any buttons on the device from the PDA Controller, reset the device and perform many other actions.
Easy Access to the PDA’s Registry and File System
TestComplete provides an easy-to-use visual interface for working with the registry of your PDA device, called the PDA Registry Editor panel.
You can also add a registry key to the Favorites list for quick access in this panel:
The PDA File Manager helps you explore the file structure of the device and deploy applications to it.
For instance, you do not have to leave TestComplete's UI to copy files to the device, you can do it directly from the testing environment.
Support for WinCE Controls
TestComplete recognizes the most popular control types and provides specific test objects for these controls. These objects contain methods and properties that allow you to easily simulate user actions over the windows and controls of PDA applications and retrieve data from the controls. The available methods and properties are shown in the Object Browser:
Mobile Application Testing Requirements
The PDA testing functionality is provided by TestComplete Enterprise. The installation package includes special files and modules that are installed on your workstation and your PDA device. In order for TestComplete to be able to install these modules and to communicate with the PDA, the Microsoft ActiveSync utility is required. You can download it from Microsoft’s web site. Detailed information on requirements can be found in TestComplete’s help file.
As you can see, TestComplete includes a number of powerful features for effective testing of WinCE applications. If you haven’t tried TestComplete 7, be sure to download it today and try all of these new and exciting features.