Configure your Hybrid app (Cordova) to be testable

The application configured following the steps bellow, should be used for testing purposes only and will not be accepted in Apple App Store and Google Play Store.

Since building Hybrid mobile applications produce native iOS and Android apps, they can be easily tested with Test Studio Mobile. This getting-started article provides more details about testing native iOS and Android apps.

Create a hybrid Cordova app

Follow the standard flow for creating hybrid Cordova app described here.

Add Extension

  1. Download the Test Studio Mobile extension for Hybrid apps and unpack it.
  2. After a hybrid app is created navigate to app's containing folder and add the extension:

    cordova plugin add "Path to `com.telerik.mobiletesting` folder"
    

    Mobile Testing Extension

    Type cordova plugin to list all added plugins and verify the Mobile Testing Extension plugin is added.

App Identifier

To successfully test a Condova hybrid app, Test Studio Mobile needs to know the app identifier. It is set like this:

  • Android - the App Identifier for Android is set during app creation in the Cordova CLI (see Create a hybrid Cordova app above) and looks something like com.mycompany.myapp.
  • iOS - the App Identifier for iOS comes from the Test Studio Mobile extension for iOS (see Add Extension above). By default this extension sets telerikmt1 to be the App Identifier for iOS. To change it in the extension before it is added to the app, navigate to the folder of the downloaded extension (com.telerik.mobiletesting) and open the plugin.xml file in your preferred text editor. Locate the App Identifier as shown bellow and cahnge it:

Mobile Testing AppId iOS

If you deploy the app to an iOS 9 device then you must use one of the names listed bellow:

  • telerikmt1
  • telerikmt2
  • telerikmt3
  • telerikmt4
  • telerikmt5
  • telerikmt6
  • telerikmt7
  • telerikmt8
  • telerikmt9
  • telerikmt10
  • tsdemoapplication

Build and deploy the app

To complete the app, follow the Cordova Command-line Interface guide to add required platforms and deploy to devices or emulators.

See Also