• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

bitbar/android-gradle-plugin: How to use Gradle plugin with devices on cloud

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

bitbar/android-gradle-plugin

开源软件地址(OpenSource Url):

https://github.com/bitbar/android-gradle-plugin

开源编程语言(OpenSource Language):

Java 74.6%

开源软件介绍(OpenSource Introduction):

Gradle plugin to deploys apks to Testdroid's online devices

A typical project build.gradle will look like this:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.0'
        classpath 'com.testdroid:gradle:2.100.0'
    }
}

apply plugin: 'android'
apply plugin: 'testdroid'

android {
    //...
}

testdroid {
    username '[email protected]'
    password 'testdroid'
    deviceGroup 'My Devices'
    mode "FULL_RUN"        
    frameworkId 252
}

With above configuration your application and instrumentation package are uploaded into Testdroid and test run is launched using device from group 'My Devices'

To launch test run from command line use testdroidUpload task:

./gradlew testdroidUpload

You can fully control your testrun using the same configurations options which are available via Testdroid web UI.

Below is listed all the supported configurations parameters:

testdroid {
    username  "demo@localhost" //required by default or authorization "OAUTH2"
    password "password" //required by default or authorization "OAUTH2"

    authorization "OAUTH2" //optional "APIKEY"|"OAUTH2"(default)

    apiKey "d409cad93079b6c6cd55b79e927b17i5" //required if authorization "APIKEY"

    deviceGroup "test group"

    cloudUrl = 'https://cloud.bitbar.com'  //optional - default live
    projectName "Project 1"  //optional - default: create a new project
    mode "FULL_RUN" //FULL_RUN / APP_CRAWLER
    frameworkId // customer test framework id
    testRunName "Custom test run name" //optional - default: build variant name

    deviceLanguageCode "en_US"    //optional - locale <ISO 63>_<ISO 3166> default: en_US

    hookUrl "http://localhost:9080"   //optional - call back URL after test run has finished default: empty

    scheduler "PARALLEL" // optional - PARALLEL or SERIAL default: PARALLEL

    testScreenshotDir = "/sdcard/abc"  //optional - custom screenshot folder  default: /sdcard/test-screenshots

    useSystemProxySettings true //optional - Use system proxy settings  default: true
    
    timeout 3600 //optional - test timeout, respected only for Customer with Plan
    
    virusScanTimeout 300000 // optional - timeout for waiting on virus scan (in ms)
    
    // AppCrawler configuration - set application credentials
    appCrawlerConfig{
        applicationPassword = "appPassword2"
        applicationUserName = "appUsername2"
    }

    // optional - Custom settings for test execution
    fullRunConfig {
        instrumentationRunner =  "com.android.testRunner" //use android.support.test.runner.AndroidJUnitRunner for Espresso2 tests
        withAnnotation = "com.my.annotation"
        withOutAnnotation = "com.my.not.annotation"
        limitationType = "CLASS"
        limitationValue = "foo.bar"
        instrumentationAPKPath = "/tmp/mytesti.apk" //optional - custom instrumentation apk path
    }
    
}



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap