300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > android集成测试工具 android – 集成测试和Cucumber测试

android集成测试工具 android – 集成测试和Cucumber测试

时间:2020-07-22 07:57:22

相关推荐

android集成测试工具 android – 集成测试和Cucumber测试

要使用Gradle命令行工具启用Android Test Orchestrator,请完成以下步骤:

android {

defaultConfig {

...

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

// The following argument makes the Android Test Orchestrator run its

// "pm clear" command after each test invocation. This command ensures

// that the app's state is completely cleared between tests.

testInstrumentationRunnerArguments clearPackageData: 'true'

}

testOptions {

execution 'ANDROIDX_TEST_ORCHESTRATOR'

}

}

dependencies {

androidTestImplementation 'androidx.test:runner:1.1.0'

androidTestUtil 'androidx.test:orchestrator:1.1.0'

}

>执行以下命令运行Android Test Orchestrator

./gradlew connectedCheck

从Android Studio启用

Android Studio 3.0及更高版本支持Android Test Orchestrator.要在Android Studio中启用Android Test Orchestrator,请将Enable from Gradle中显示的语句添加到应用程序的build.gradle文件中.

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。