Recording mobile tests for iOS applications
You can record a mobile test to capture the actions that you perform on iOS applications. The actions are captured as test steps to a mobile test recording.
Before you begin
- Read and completed the prerequiste tasks listed in Prerequisite tasks for recording iOS tests.
- Ran the UI Test Agent on the default port to connect to your mobile devices or simulators.
About this task
After you install the Xcode and the command line tools for Xcode, you can connect the iOS device or simulator to your computer, you can then record the user interface and hardware actions in the iOS application that you want to test.
- Insert user actions.
- Insert navigation actions.
- Assign variables.
- Insert verification points.
- Substitute data by using custom code or datasets.
- Click tab.
- Select theHost check box.
- Enter the port number in the Port field.
You can then perform the following steps to record a mobile test on the iOS application.
Procedure
- Go to the UI Test perspective in Test UI.
-
Click the New Test from Recording icon in the toolbar and
select Mobile Test.
The New Mobile Test From Recording dialog is displayed.
- Select a directory to save the test.
-
Enter the name of the test in the Test name field, and click
Next.
The Select mobile application page displays the list of all mobile applications that you configured in the Application Configuration page.
-
Select the iOS application that you want to test.
Note: The real devices or the simulators that are connected to the computer are listed and you can select any device or simulator from the list.
- Select the device from the Select mobile device list.
-
Click Next, and then click
Finish.
The application is displayed in a virtual client of both, the real mobile device or the emulator.
The recording is started in a web browser.
You can perform the actions on the selected mobile application by using the virtual client. The actions that you perform are imitated on the device or emulator and are captured as test steps in the test.
The test steps are displayed on the Test Steps pane of the virtual client window.
The following table lists the options of the actions that you can perform in the virtual client:Option Action when clicked Stop recording Stops the recording and generates the mobile test recording Screen lock Performs the lock screen action on the mobile device or simulator Refresh Refreshes the virtual client if the actions that you perform on the virtual client is not synchronized with the mobile device Volume up Increases the volume on the mobile device or simulator Volume down Decreases the volume on the mobile device or simulator Home Navigates to the home screen -
Click Stop recording.
The recording of the test is stopped and the browser window is closed. The Test Generation dialog is displayed in the UI Test perspective.
Results
You have recorded a test for an iOS mobile application.
What to do next
-
You can click Open Test in the Test Generation dialog to view the recorded test and edit the test, if you want to change or add the test steps or verification points. See Editing a mobile test.
-
You can run the recorded test. See Running mobile tests for iOS mobile applications.