Test with MPF
- Install Test Workbench into MobileFirst Studio
- Get started
- Add the path to the JDK
- Create a Test Workbench project
- Manage mobile applications
- Create mobile tests
- Edit mobile tests
- Running mobile tests
- Evaluating results
- Use MobileFirst Studio and Application Center
Appendix
Tools for testing mobile applications in IBM MobileFirst Platform Foundation
Tools include...
- MobileFirst Studio
- Application Center for sharing applications.
- A mobile test client that runs on Android and iOS devices, as well as Android emulators and iOS simulators. Used to record, to run tests, and to view reports. Also used to upload apps to the test workbench. The Android client is a native Android application. The iOS client is a Web app that runs in a browser on the iOS device. In addition, there is a native iOS client used to test with the iOS Simulator. See Android testing overview and iOS testing overview.
- The test workbench, which works together with the mobile test client for testing the application.
The test workbench
The test workbench runs on a Windows, Linux, or Macintosh computer and includes the following main components:
- The Test Navigator lists test projects, tests, mobile devices, and the mobile incoming recordings used to generate tests.
- The Mobile Devices editor lists the devices connected to the test workbench. This editor displays detailed specifications of each device, which allows you to select the hardware platforms on which we can deploy and run the tests.
- The Mobile and Web UI Applications editor lists the managed apps uploaded and prepared for testing.
- A test editor enables you to edit test scripts in natural language, and add actions, verification points, data pools, test variables, stubs, and so on.
- A Mobile Data view displays the screen captures uploaded from the mobile device during the recording. Use this view to display and select user interface elements, and optionally to add verification points to the test script.
Stages in the testing process
The goal of mobile testing is to ensure that the mobile application meets the requirements that guided its design and development. To help you meet this goal, IBM MobileFirst Platform Test Workbench implements the following stages in the testing process:
- Configuration: Set up the test environment with IBM MobileFirst Platform Test Workbench and the Android SDKs for the mobile operating systems. Install the mobile test client on one or more Android devices. Ensure that the mobile devices have connectivity through WiFi, 3G, or 4G, and add those devices to the test workbench. See Configure the mobile test client.
- Application preparation: Import the application to test into the test workbench, or for Android applications, use the device to upload the application under test to the test workbench. For iOS applications, instrument and install the applications. See Manage mobile applications.
- Test recording: Run the app from the mobile test client to start a recording. The recorder records all user interactions, sensor inputs, and application behavior, and uploads the recorded data to the test workbench, where it can be converted into a mobile test. See Create mobile tests.
- Test editing: After recording, we can edit the test in the natural language editor. Use the mobile data view to display and select UI elements from the recorded applications. We can replace recorded test values with variable test data, or add dynamic data to the test. See Edit mobile tests.
- Test execution: We can run automated tests on multiple devices to ensure that the app matches the expected behavior defined in verification points. During the run, each verification point is checked and receives a pass, fail, or inconclusive status. Information about each step is saved in the test results. See Running mobile tests.
- Evaluation of results: After the test, the device uploads the test data to the test workbench. We evaluate the test results through the performance and verification point reports that are generated with the uploaded data. We can also design custom reports by manipulating a wide range of counters. Functional reports provide a comprehensive view of the behavior of the app under test. Reports can be exported and archived for validation. See Evaluating results.
When the tester is the same person as the developer, this person can develop and test the application in the same Eclipse environment.
When the person who develops the application is different than the person who tests it, the application must be shared between the developer and the tester using the Application Center. In this case, the testing process includes the following additional stages:
- Publication: We can publish Android applications to the Application Center from MobileFirst Studio by right-clicking an Android project and clicking IBM Application Center > Publish on IBM Application Center. For iOS, the application must first be instrumented for testing. You right-click an iOS project, and click IBM Application Center > Publish Test-Ready Application. The iOS application is then instrumented and published.
- Import of the application: When the application is published in the Application Center, the tester imports this app into the list of managed applications into the test workbench.
Support for testing native, hybrid, and web applications
Use the test workbench to test various types of mobile applications, including native applications, hybrid applications, and browser-based, web applications that were created with MobileFirst Studio.
A native Android or iOS application is built using a native SDK, whose services are defined according to each platform architecture. Android applications are typically created with Java or C++, whereas iOS applications are created with Objective-C.
A hybrid application is an application that combines native and web technologies. The web part relies on HTML 5, CSS3, and javascript.
A browser-based web application is developed using pure web technologies, such as HTML 5, CSS3, and JavaScript libraries, such as Dojo and JQuery. Web applications are developed to run in multiple browsers and are platform-independent. This release includes support for Dojo Mobile 1.9 and jQuery Mobile 1.3.
To test applications not created with MPF, use IBM Rational Test Workbench or IBM Rational Test Workbench Mobile Test Edition.
Compound tests
To combine various mobile tests into a single workflow or end-to-end scenario, we can organize the tests into a compound test. Each test may perform a part of the scenario. See Compound tests.
Rational Test Workbench is required to combine mobile tests with other types of tests in a compound test.
Extending test execution with custom code
We can extend how you run the tests by writing custom Java code and calling the code from the test. We can also specify that results from the tests that are affected by the custom code be included in reports. See Extending test execution with custom code.
Use IBM Rational Test Workbench with MPF
We can enhance the testing capabilities in IBM MobileFirst Platform Test Workbench by licensing either IBM Rational Test Workbench Mobile Test Edition or the full IBM Rational Test Workbench product.
With both products, we can test mobile apps that are developed with tools other than IBM MobileFirst Platform Foundation.
The full IBM Rational Test Workbench product provides several extra capabilities:
- Integration with IBM Rational Quality Manager (RQM), which provides advanced test execution and test management capabilities. When we provide IBM Rational Test Workbench access to the test assets in the project created with IBM MobileFirst Platform Test Workbench, we can use RQM to drive test execution. See IBM Rational Quality Manager section in IBM Rational solution for Collaborative Lifecycle Management.
- Ability to test non-mobile applications, such as desktop Web UI applications, Selenium, HTTP, Citrix, SAP, and other test domains. In addition, we can combine multiple types of tests in a single compound test and run them as a single workflow.
- Load testing with IBM Rational Performance Tester
- Test virtualization with IBM Rational Integration Tester