Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Sep 22, 2019 17:50

  1. Create a configuration file (ConfigFile.json) as a JSON text file in a known folder (you will need the full path later).
  2. Add the device selection parameters to the configuration file

    1. If specifying a set of devices.

      "devices": [
          {
              "platformName": "Android",
              "platformVersion": "^[678].*",
              "manufacturer": "Samsung"
          },
          {}
      ]
      
      

      This example selects two devices - one that is a Samsung phone running Android 6.* or 7.* or 8.* (uses a regular expression), and one is randomly selected by the plugin.

    2. If specifying a number of random Android devices

      "numOfDevices": 20
  3. Add the reporting parameter settings, to add tags to the DigitalZoom execution report.

    "tags": ["plugin", "espresso", "demo"],
    "projectName": "playground",
    "projectVersion": "1.5",
    "jobName": "newFeature",
    "jobNumber": "45",
  4. Add the application parameters - identifying where the application files are located.

    • Using the appPath and testAppPath fields - for Android applications

      "testAppPath": "C:/User/myuser/AndroidStudioProjects/Playground/app/build/outputs/apk/app-debug-AndroidTest.apk",
      "appPath": "C:/User/myuser/AndroidStudioProjects/Playground/app/build/outputs/apk/app-debug.apk"

      Note: When testing an Android (aar or jar) library, set both the apkPath and testApkPath fields to the location specified for the assembleAndroidTest gradle task. By default, this location is: <project folder>/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apkYou can supply additional parameters if you need to limit the test application to only execute specific methods or classes.

  5. Save the configuration file that should look something like the following:

    {
        "devices": [
            {"deviceName": "FA6BR0304878"},
            {
                "platformName": "Android",
                "platformVersion": "^[678].*",
                "manufacturer": "Samsung"
            },
            {}
        ],
        "testAppPath": "C:/User/myuser/AndroidStudioProjects/Playground/app/build/outputs/apk/app-debug-AndroidTest.apk",
        "appPath": "C:/User/myuser/AndroidStudioProjects/Playground/app/build/outputs/apk/app-debug.apk",
     
        "tags": ["plugin", "espresso", "demo"],
        "projectName": "playground",
        "projectVersion": "1.5",
        "jobName": "newFeature",
        "jobNumber": "45"
    }

You can see a full list of configuration parameters here.

  • No labels