MobileFirst Quality Assurance for Cordova applications
improve this page | report issueOverview
This tutorial is a continuation of the IBM Mobile Quality Assurance setup step. If you haven't done it yet, please do so now.
This tutorial explains how to install and configure the Mobile Quality Assurance client using the Apache Cordova hybrid SDK, and how to enable apps to send back bug reports and feedback.
Use the command line to set up and instrument Mobile Quality Assurance. You must download and install the latest version of Apache Cordova and its required co-requisites before you begin this procedure.
Note:Currently MQA support for Cordova iOS is restricted to cordova-ios@3.7.Jump to:
- Creating a simple hybrid app using Apache Cordova
- Installing the libraries
- Configuring how MQA communicates with your app
- Testing your app
- Further discovery
Creating a simple hybrid app using Apache Cordova
You must have a mobile app to instrument MQA. If you do not have a mobile app, complete the following steps to create one:
- Open a command prompt and navigate to the directory where you want your new app folder to be created:
- Enter the following command to create a folder called hello, assign an app identifier of com.example.hello, and name the app HelloWorld:
- Navigate to the folder that you just created for your app.
- Add required files for each of the platforms on which your app runs.
Installing the libraries
The libraries support both preproduction mode or production mode. Use preproduction mode when you want internal testers to report bugs and feedback with detailed information and have apps under test automatically report crashes.
Complete these steps to install the libraries:
- Download and extract the Cordova SDK library from Device SDKs for Mobile Quality Assurance for IBM Cloud.
- Navigate to the directory that contains your app project files.
Add the Mobile Quality Assurance plug-in to your Cordova project by completing the following steps:
- Enter the following command to install the MQA plugin: Where plugin_location is the path to the directory of the extracted Mobile Quality Assurance plugin that you downloaded.
- Enter the following command to install the required device plugin:
- If your app has an Android runtime that is earlier than 4.0, rename the
project_name\app_name\platforms\android\custom_rules.xml
file tocustom_rules_bak.xml
.Configuring how MQA communicates with your app
For your app to send data to Mobile Quality Assurance, you must have an application key from the MQA service in IBM Cloud. For more information about application settings, see Registering apps. If you already have an account, you can find your application key by clicking the settings icon (gear) and then selecting App Settings.
Configure MQA to start a new Mobile Quality Assurance session each time your app starts in the JavaScript file
- Open the index.js file that is in the
your_project_name\www\js
directory.- Place the following function and required parameters inside the
onDeviceReady()
function before the end brace of the function:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 MQA.startNewSession({ mode: "QA", //or mode: "MARKET" for production mode android: { appKey: "your_MQA_Android_appKey" , notificationsEnabled: true }, ios: { appKey: "your_MQA_iOS_appKey" , screenShotsFromGallery: true, } }, { success: function () {console.log("Session Started successfully");}, error: function (string) { console.log("Session error" + string);} });To learn more about starting a Mobile Quality Assurance session, including details about the different session configuration options, see Starting Cordova quality assurance sessions.- Build and run your app.
Testing your app
After the environment is set up, you can load your app on your device and start testing it. Complete the following steps to report a bug or provide feedback during testing:
- Shake your mobile device lightly.
- Select Report a bug or Give feedback.
- Enter the required information and select Send to send the information.
- View the bug reports and feedback in your IBM Cloud MQA instance where you retrieved the AppKey.
For more information about reporting bugs, see Reporting bugs. For more information about submitting feedback, see User feedback.
Further discovery
After you are comfortable with the basics of setting up MQA with your app, you can read content in IBM Knowledge Center to learn and explore some of the other things that you can do. For example:
▲
- Managing users and testers. You can manage the roles and access of your team as they apply to your app and MQA instance.
- Distributing and managing builds. You can distribute test builds and production builds to the appropriate audience.
- Managing reports. You can automatically distribute test builds and production builds to your audience.
- User sentiment analytics. You can use MQA to analyze and monitor user comments and information about your app. You can also compare the analysis of those comments with the analysis of the user feedback from similar apps.
Inclusive terminology note: The Mobile First Platform team is making changes to support the IBM® initiative to replace racially biased and other discriminatory language in our code and content with more inclusive language. While IBM values the use of inclusive language, terms that are outside of IBM's direct influence are sometimes required for the sake of maintaining user understanding. As other industry leaders join IBM in embracing the use of inclusive language, IBM will continue to update the documentation to reflect those changes.Last modified on December 12, 2017