TouchTest Gradle Plugin Instructions

Document created by DPM Admin Employee on Jul 18, 2017Last modified by Trishala Kalal on Aug 10, 2017
Version 2Show Document
  • View in full screen mode

With the TouchTest Gradle Plugin, Android Studio users have a simple, effective means to quickly get TouchTest integrated into existing Android apps.  

 

 

Make the following modifications to add the TouchTest Gradle Plugin to your project. Because Gradle will automatically download the necessary JAR files, once these changes are made, no separate download or build steps are required, Gradle will do them automatically.  

Using the Central Repository


If you are using the Central Repository, make the changes below.

 

  1. Add the line(s) that follow after //Add the following line 

buildscript { 
    repositories { 
        jcenter() 
    } 
    dependencies { 
        classpath 'com.android.tools.build:gradle:1.2.3' 

        //Add the following line 
        classpath 'com.soasta.touchtest:touchtest-plugin:1.4.0' 

    } 
}

apply plugin: 'com.android.application' 

//Add the following line 
apply plugin: 'com.soasta.touchtest' 

repositories { 
    jcenter() 
}
dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    compile 'com.android.support:appcompat-v7:20.+' 
    
    //Add the following line
    compile 'com.soasta.touchtest:touchtestdriver:1.4.0' 
 

 

  1. Create a new file called touchtest.properties and add the following properties:
    • TouchTestURL=http://67.111.67.24:8080/concerto[example]
    • TouchTestUserName=admin[example]
    • TouchTestPassword=password[example]
    • TouchTestTenant=SOASTA[example]
    • OverwriteMobileApp=true
    • AppLaunchURL=touchtest-gradle-example://

Need more details on the properties listed above? Click the Spoiler.

  1. Build an Android app:
  • debug build in Android Studio


  • Run the following in a terminal: gradle clean assembleDebug


  • Run the following in a terminal: gradle clean installDebug

 

Your application-debug.apk is now testable using TouchTest.

 

Using a TouchTest Server


If you are using a your own TouchTest server, make the changes below.

  1. Add the line(s) that follow after //Add the following line

buildscript { 
   repositories { 
     //Add the line below to use the plugin from your concerto server
     maven { url "http://<server URL>/concerto/touchtest/gradle"}
     mavenCentral() 
   } 
   configurations.all { 
     // check for updates every build
     resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
   } 
   dependencies { 
     classpath 'com.android.tools.build:gradle:1.2.3' 

     //Add the following line 
     classpath group: "com.soasta.touchtest", name: "touchtest-plugin", version: "1.0-SNAPSHOT", changing: true 
   } 
} 
apply plugin: 'com.android.application' 

//Add the following line 
apply plugin: 'com.soasta.touchtest' 

repositories { 
 //Add the following line
 maven { url "http://<server URL>/concerto/touchtest/gradle" }
 mavenCentral() 
} 

configurations { 
soasta 
}

 

dependencies { 
  compile fileTree(dir: 'libs', include: ['*.jar']) 
  compile 'com.android.support:appcompat-v7:20.+' 
  //Add the following line
  compile  group: "com.soasta.touchtest", name: "touchtestdriver", version: "1.0-SNAPSHOT", changing: true
}

where <server URL> is your TouchTest Server URL

 

 

  1.   Create a new file called touchtest.properties and add the following properties:
    • TouchTestURL=http://67.111.67.24:8080/concerto[example]
    • TouchTestUserName=admin[example]
    • TouchTestPassword=password[example]
    • TouchTestTenant=SOASTA[example]
    • OverwriteMobileApp=true
    • AppLaunchURL=touchtest-gradle-example://

Need more details on the properties listed above? Click the Spoiler.

 

  1. Build an Android app:
  • debug build in Android Studio


  • Run the following in a terminal: gradle clean assembleDebug


  • Run the following in a terminal: gradle clean installDebug

 

Your application-debug.apk is now testable using TouchTest.

 

Empty Project's build.gradle

Typical Project's build.gradle

 

Inspecting the Mobile App in TouchTest® (Native or Hybrid)

 

Once Gradle (or Eclipse users) creates the Central, Mobile App object, you can locate an entry for the given mobile app in the Central > Mobile Apps list.

 

TIP: This mobile app object appears by name in the Choose Device Agent and Mobile App box whenever end-users start a mobile app recording. Selecting which mobile app to launch, on which test devices, is a crucial end-user step. You will need to be familiar with its uses in order to record and perform all of the subsequent test-building steps.

 

  • Verify that your Mobile App has been added by logging into TouchTest® and looking for its entry in the Central > Mobile Apps list. For example, in the screenshot below both DroidFish and Zirco Browser apps appear are listed.

 

 

  • Double-click the Mobile App to inspect its details. The Mobile App detail form appears. All of the fields shown were populated from the project, with the exception of Supported Device Type and Minimum OS Version. The DroidFish mobile app detail is shown below.

 

Attachments

    Outcomes