测试

在 Android 中进行测试。

下表列出了 androidx.test 组中的所有工件。

制品 稳定版 候选版 Beta 版 Alpha 版
annotation 1.0.1 - - 1.1.0-alpha03
核心 1.5.0 - - 1.6.0-alpha05
espresso 3.5.1 - - 3.6.0-alpha03
浓缩咖啡机 - - - 1.0.0-alpha08
ext.junit 1.1.5 - - 1.2.0-alpha03
ext:junit-gtest - - - 1.0.0-alpha01
ext.truth 1.5.0 - - 1.6.0-alpha03
monitor 1.6.1 - - 1.7.0-alpha04
orchestrator 1.4.2 - - 1.5.0-alpha03
跑酷游戏 1.5.2 - - 1.6.0-alpha06
rules 1.5.0 - - 1.6.0-alpha03
services 1.4.2 - - 1.5.0-alpha03
此库的最后更新时间:2024 年 2 月 29 日

声明依赖项

如需添加 androidx.test 的依赖项,您必须将 Google Maven 制品库添加到项目中。如需了解详情,请参阅 Google 的 Maven 制品库

在应用或模块的 build.gradle 文件中添加所需工件的依赖项:

Groovy

dependencies {
    // To use the androidx.test.core APIs
    androidTestImplementation "androidx.test:core:1.5.0"
    // Kotlin extensions for androidx.test.core
    androidTestImplementation "androidx.test:core-ktx:1.5.0"

    // To use the androidx.test.espresso
    androidTestImplementation "androidx.test.espresso:espresso-core:3.5.1"

    // To use the JUnit Extension APIs
    androidTestImplementation "androidx.test.ext:junit:1.1.5"
    // Kotlin extensions for androidx.test.ext.junit
    androidTestImplementation "androidx.test.ext:junit-ktx:1.1.5"

    // To use the Truth Extension APIs
    androidTestImplementation "androidx.test.ext:truth:1.5.0"

    // To use the androidx.test.runner APIs
    androidTestImplementation "androidx.test:runner:1.5.2"

    // To use android test orchestrator
    androidTestUtil "androidx.test:orchestrator:1.4.2"

}

Kotlin

dependencies {
    // To use the androidx.test.core APIs
    androidTestImplementation("androidx.test:core:1.5.0")
    // Kotlin extensions for androidx.test.core
    androidTestImplementation("androidx.test:core-ktx:1.5.0")

    // To use the androidx.test.espresso
    androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")

    // To use the JUnit Extension APIs
    androidTestImplementation("androidx.test.ext:junit:1.1.5")
    // Kotlin extensions for androidx.test.ext.junit
    androidTestImplementation("androidx.test.ext:junit-ktx:1.1.5")

    // To use the Truth Extension APIs
    androidTestImplementation("androidx.test.ext:truth:1.5.0")

    // To use the androidx.test.runner APIs
    androidTestImplementation("androidx.test:runner:1.5.2")

    // To use android test orchestrator
    androidTestUtil("androidx.test:orchestrator:1.4.2")
}

如需详细了解依赖项,请参阅添加 build 依赖项

反馈

您的反馈将帮助我们改进 Jetpack。如果您发现了新问题,或对此库有任何改进建议,请告诉我们。创建新问题前,请先查看此库中的现有问题。您可以点击星标按钮,为现有问题投票。

创建新问题

如需了解详情,请参阅问题跟踪器文档

Annotation 1.1.0

Annotation 1.1.0-alpha03

2024 年 1 月 26 日

发布了 androidx.test:annotation:1.1.0-alpha03}

API 变更

  • 取消隐藏 ExperimentalTestApi

Annotation 1.1.0-alpha02

2023 年 11 月 29 日

发布了 androidx.test:annotation:1.1.0-alpha02}

API 变更

  • minSdkVersion 现为 19,targetSdkVersion 现为 34

新功能

Annotation 1.1.0-alpha01

2023 年 3 月 21 日

发布了 androidx.test:annotation:1.1.0-alpha01

依赖项变更

  • 更新为 kotlin stdlib 1.7.22
  • 主要版本工具链更新:现在已编译为 java8 字节码

Annotation 1.0.1

Annotation 1.0.1

2022 年 11 月 8 日

发布了 androidx.test:annotation:1.0.1

自 1.0.0 以来的变更包括:

依赖项变更

  • 更新为 kotlin stdlib 1.7.10

Annotation 1.0.1-rc01

2022 年 10 月 26 日

发布了 androidx.test:annotation:1.0.1-rc01

Annotation 1.0.1-beta01

2022 年 10 月 6 日

发布了 androidx.test:annotation:1.0.1-beta01

依赖项变更

  • 更新为 kotlin stdlib 1.7.10

Annotation 1.0.1-alpha01

2022 年 6 月 1 日

发布了 androidx.test:annotation:1.0.1-alpha01

bug 修复

  • 恢复为 javac 11,以防止 IncompatibleClassChangeErrors [#1351]

Annotation 1.0.0

Annotation 1.0.0

2021 年 12 月 13 日

发布了 androidx.test:annotation:1.0.0

新增了工件,目前仅供内部 androidx.test 使用。

Annotation 1.0.0-rc01

2021 年 11 月 18 日

发布了 androidx.test:annotation:1.0.0-rc01

Annotation 1.0.0-beta01

2021 年 11 月 8 日

发布了 androidx.test:annotation:1.0.0-beta01

Annotation 1.0.0-alpha02

2021 年 10 月 4 日

发布了 androidx.test:annotation:1.0.0-alpha02

Annotation 1.0.0-alpha01

2021 年 9 月 28 日

发布了 androidx.test:annotation:1.0.0-alpha01

API 变更

  • 新增了 ExperimentalTestApi 和 InternalTestApi 注解

Core 1.6.0

Core Core-ktx 1.6.0-alpha05

2024 年 1 月 26 日

发布了 androidx.test:core:1.6.0-alpha05androidx.test:core-ktx:1.6.0-alpha05

bug 修复

  • 更新活动场景参考文档以修复缺失的链接
  • 取消对低于 19 的 Android SDK 的所有支持。最低版本为 API 19 (Android Kit Kat 4.4)
  • 清理参考文档 - 记录之前缺少的参数、修正链接等

Core Core-ktx 1.6.0-alpha04

2023 年 12 月 5 日

发布了 androidx.test:core:1.6.0-alpha04androidx.test:core-ktx:1.6.0-alpha04

bug 修复

  • 当 targetSdk >= 34 时,系统会自动选择启用 activity 启动,以允许后台 activity 启动

Core Core-ktx 1.6.0-alpha03

2023 年 11 月 29 日

发布了 androidx.test:core:1.6.0-alpha03androidx.test:core-ktx:1.6.0-alpha03

bug 修复

  • 修复了当 targetSdk = 34 时的 ActivityScenario.launchActivityWithResult

API 变更

  • targetSdkVersion 现为 34

新功能

Core Core-ktx 1.6.0-alpha02

2023 年 9 月 18 日

发布了 androidx.test:core:1.6.0-alpha02androidx.test:core-ktx:1.6.0-alpha02

功能 * 更新了 ViewCapture 以接受可选的 Rect,使其可用于 Compose。

bug 修复

  • 修复了在 ActivityScenario#recreate 期间 Activity#isChangeConfigurations 错误地为 false 的问题
  • 将 UiAutomation#takeScreenshot 调用移出主线程。
  • 修复了 API 大于或等于 26 的对话框内视图的 captureToBitmap 问题。

依赖项变更 * minSdkVersion 现为 19

Core Core-ktx 1.6.0-alpha01

2023 年 3 月 21 日

发布了 androidx.test:core:1.6.0-alpha01androidx.test:core-ktx:1.6.0-alpha01

功能 * 向 ViewCapture.captureToBitmap 添加了对 robolectric 的初步支持

bug 修复

  • 修复了 DecorView 的 captureToBitmap 问题
  • 尝试通过重试 takeScreenshot 提高 DeviceCapture 的可靠性

依赖项变更

  • 更新为 kotlin stdlib 1.7.22
  • 主要版本工具链更新:现在已编译为 java8 字节码
  • 更新了 androidx.test:monitor:1.70-alpha01

Core 1.5.0

Core Core-ktx 1.5.0

2022 年 11 月 8 日

发布了 androidx.test:core:1.5.0androidx.test:core-ktx:1.5.0

自 1.4.0 以来的变更包括:

新功能

  • 记录 ActivityScenario 启动和关闭操作的 Android 轨迹 Span。
  • 针对屏幕截图添加了新的实验性 API:这些 API 会自动根据平台 API 级别选择用于截取屏幕截图的最高保真度,并支持自动测试设备 (ATD) 模拟器映像。
    • View.captureToBitmap 扩展函数
    • Window.captureRegionToBitmap 扩展函数
    • takeScreenshot()
  • 添加了实验性 Bitmap.writeToTestStorage API

API 变更

  • 添加了 ActivityScenario#launchActivityForResult API 并修改了 ActivityScenario#launch,以停止使用 Bootstrap Activity API。 此变更应该会提高 ActivityScenario#launch 的性能和稳定性。 ActivityScenario#getResult 现在会强制要求只能与 ActivityScenario#launchActivityForResult 搭配使用

bug 修复

  • 修复了以 Android 33 为目标平台并在其上运行时的 ActivityScenario#launch 问题
  • 使用 elapsedRealtime 而非 currentTimeMillis 来跟踪 ActivityScenario 超时。
  • 修复了 ActivityScenario 在自插桩测试中从包含软件包名称的 intent 启动 activity 时存在的问题。
  • 通过在内部 activity 中使用纯白色背景并停用过渡动画,降低了 ActivityScenario 开销

依赖项变更

  • 更新为
    • kotlin stdlib 1.7.10
    • androidx.lifecycle:lifecycle-common:2.3.1
    • androidx.annotation:annotation:1.2.0
  • 添加了
    • androidx.test.services:storage:1.4.2
    • com.google.guava:listenablefuture:1.0
    • androidx.concurrent:concurrent-futures:1.1.0

Core Core-ktx 1.5.0-rc01

2022 年 10 月 26 日

发布了 androidx.test:core:1.5.0-rc01androidx.test:core-ktx:1.5.0-rc01

Core Core-ktx 1.5.0-beta01

2022 年 10 月 6 日

发布了 androidx.test:core:1.5.0-beta01androidx.test:core-ktx:1.5.0-beta01

API 变更

  • 使新 API 带有 NonNull/Nullable 注解

Core Core-ktx 1.5.0-alpha02

2022 年 8 月 22 日

发布了 androidx.test:core:1.5.0-alpha02androidx.test:core-ktx:1.5.0-alpha02

API 变更

  • 修改了 ActivityScenario#launch,以停止使用 Bootstrap Activity API。 此变更应该会提高 ActivityScenario#launch 的性能和稳定性。 ActivityScenario#getResult 现在会强制要求只能与 ActivityScenario#launchActivityForResult 搭配使用

bug 修复

  • 修复了以 Android T 为目标平台并在其上运行时的 ActivityScenario#launch 问题
  • 使用 elapsedRealtime 而非 currentTimeMillis 来跟踪 ActivityScenario 超时。

依赖项变更

  • 更新为 kotlin stdlib 1.7.10

Core Core-ktx 1.5.0-alpha01

2022 年 6 月 21 日

发布了 androidx.test:core:1.5.0-alpha01androidx.test:core-ktx:1.5.0-alpha01

API 变更

  • 添加了 ActivityScenario#launchActivityForResult API。在检索 activity 结果时此 API 将取代 ActivityScenario#launch。

Core 1.4.1

Core Core-ktx 1.4.1-alpha07

2022 年 6 月 1 日

发布了 androidx.test:core:1.4.1-alpha07androidx.test:core-ktx:1.4.1-alpha07

bug 修复

  • 恢复为 javac 11,以防止 IncompatibleClassChangeErrors [#1351]

依赖项变更

  • 更新为 kotlin stdlib 1.6.21

Core Core-ktx 1.4.1-alpha06

2022 年 4 月 28 日

发布了 androidx.test:core:1.4.1-alpha06androidx.test:core-ktx:1.4.1-alpha06

bug 修复 *修复了 ActivityScenario 在自插桩测试中从包含软件包名称的 intent 启动 activity 时存在的问题。

Core Core-ktx 1.4.1-alpha05

2022 年 3 月 21 日

发布了 androidx.test:core:1.4.1-alpha05androidx.test:core-ktx:1.4.1-alpha05

Core Core-ktx 1.4.1-alpha04

2022 年 2 月 11 日

发布了 androidx.test:core:1.4.1-alpha04androidx.test:core-ktx:1.4.1-alpha04

新功能

  • 记录 ActivityScenario 启动和关闭操作的 Android 轨迹 Span。

依赖项变更

  • 添加了 androidx.tracing 依赖项
  • 更新为 kotlin stdlib 1.6.10

Core Core-ktx 1.4.1-alpha03

2021 年 10 月 4 日

发布了 androidx.test:core:1.4.1-alpha03androidx.test:core-ktx:1.4.1-alpha03

bug 修复

  • 修复了 View.captureToBitmap 和 Window.captureRegionToBitmap 扩展函数的可见性问题
  • 为 Bitmap.writeToTestStorage 及屏幕截图方法添加了更明确的异常处理

Core Core-ktx 1.4.1-alpha02

2021 年 9 月 28 日

发布了 androidx.test:core:1.4.1-alpha02androidx.test:core-ktx:1.4.1-alpha02

新功能

  • 针对屏幕截图添加了新的实验性 API:
    • View.captureToBitmap 扩展函数
    • Window.captureRegionToBitmap 扩展函数
    • takeScreenshot()
  • 添加了实验性 Bitmap.writeToTestStorage API

依赖项变更

  • 将依赖项添加到
    • kotlin stdlib 1.5.31
    • androidx.test.services:storage:1.4.1-alpha02
    • com.google.guava:listenablefuture:1.0
    • androidx.concurrent:concurrent-futures:1.1.0
  • 将依赖项版本更新为
    • androidx.lifecycle:lifecycle-common:2.3.1
    • androidx.annotation:annotation:1.2.0

Core Core-ktx 1.4.1-alpha01

2021 年 8 月 23 日

发布了 androidx.test:core:1.4.1-alpha01androidx.test:core-ktx:1.4.1-alpha01

bug 修复

  • 通过在内部 activity 中使用纯白色背景并停用过渡动画,降低了 ActivityScenario 开销

依赖项变更

  • -ktx:显式依赖于 kotlin stdlib 1.4.30

Espresso 3.6.0

Espresso 3.6.0-alpha03

2024 年 1 月 26 日

发布了以下工件:

  • androidx.test.espresso:espresso-accessibility:3.6.0-alpha03
  • androidx.test.espresso:espresso-core:3.6.0-alpha03
  • androidx.test.espresso:espresso-contrib:3.6.0-alpha03
  • androidx.test.espresso:espresso-idling-resource:3.6.0-alpha03
  • androidx.test.espresso:espresso-intents:3.6.0-alpha03
  • androidx.test.espresso:espresso-remote:3.6.0-alpha03
  • androidx.test.espresso:espresso-web:3.6.0-alpha03
  • androidx.test.espresso.idling:idling-concurrent:3.6.0-alpha03
  • androidx.test.espresso.idling:idling-net:3.6.0-alpha03

bug 修复

  • 修复了 AdapterDataLoaderAction 错误消息中的拼写错误
  • 从 espresso 中移除了 Kotlin 收集 Java 中的 stdlib 调用
  • 清理参考文档 - 记录之前缺少的参数、修正链接等
  • 从 Java 代码中移除 Kotlin StringKt 调用
  • 取消对低于 19 的 Android SDK 的所有支持。最低版本为 API 19 (Android Kit Kat 4.4)
  • 在非远程模式下运行时,停止将空任务发布到后台线程
  • 更好地处理在 DefaultFailureHandler 的层次结构捕获和屏幕截图过程中可能发生的异常。

API 变更

  • 将生成的 IInteractionExecutionStatus 类标记为 RestrictTo LIBRARY_GROUP
  • 从 RuntimePermissionStubber 中移除了 ExperimentalTestApi

Espresso 3.6.0-alpha02

2023 年 11 月 29 日

发布了以下工件:

  • androidx.test.espresso:espresso-accessibility:3.6.0-alpha02
  • androidx.test.espresso:espresso-core:3.6.0-alpha02
  • androidx.test.espresso:espresso-contrib:3.6.0-alpha02
  • androidx.test.espresso:espresso-idling-resource:3.6.0-alpha02
  • androidx.test.espresso:espresso-intents:3.6.0-alpha02
  • androidx.test.espresso:espresso-remote:3.6.0-alpha02
  • androidx.test.espresso:espresso-web:3.6.0-alpha02
  • androidx.test.espresso.idling:idling-concurrent:3.6.0-alpha02
  • androidx.test.espresso.idling:idling-net:3.6.0-alpha02

bug 修复

  • 修复了 IsPlatformPopup 的说明以匹配该行为。
  • 修复了已废弃的 getMovement 实现,其使用了错误坐标。
  • 将指向 junit.org javadoc 的损坏链接替换为 @link。

API 变更

  • 添加新的 IsActivatedMatcher,以验证它是否已激活。
  • 使 Espresso.onIdle() 在主线程上工作,以允许从主线程中排空主线程。
  • minSdkVersion 现为 19,targetSdkVersion 现为 34
  • 添加了 scrollTo 变体,以允许滚动到 90% 以上的显示观看次数

新功能

Espresso 3.6.0-alpha01

2023 年 3 月 21 日

发布了以下工件:

  • androidx.test.espresso:espresso-accessibility:3.6.0-alpha01
  • androidx.test.espresso:espresso-core:3.6.0-alpha01
  • androidx.test.espresso:espresso-contrib:3.6.0-alpha01
  • androidx.test.espresso:espresso-idling-resource:3.6.0-alpha01
  • androidx.test.espresso:espresso-intents:3.6.0-alpha01
  • androidx.test.espresso:espresso-remote:3.6.0-alpha01
  • androidx.test.espresso:espresso-web:3.6.0-alpha01
  • androidx.test.espresso.idling:idling-concurrent:3.6.0-alpha01
  • androidx.test.espresso.idling:idling-net:3.6.0-alpha01

API 变更

  • 废弃了 EspressoOptional,取而代之的是 @Nullable。
  • 允许自定义 Espresso 的默认失败处理程序,以停用失败时的屏幕截图

依赖项变更

  • 更新了 androidx.test:monitor:1.7.0-alpha01、androidx.test:core:1.6.0-alpha01 和 androidx.test:runner:1.6.0-alpha01
  • 更新为 kotlin stdlib 1.7.22
  • 主要版本工具链更新:
    • 类现在编译为 java8 字节码
    • javac 编译器已切换到 OpenJDK 11。这应该可以解决 IncompatibleClassChangeErrors (https://github.com/android/android-test/issues/1642)
    • 不再通过 Kotlin stdlib 使用内部 guava,从而缩减二进制文件的大小
    • 发布 AAR 不再受到保护

Espresso 3.5.0

Espresso 3.5.1

2023 年 1 月 3 日

发布了以下工件:

  • androidx.test.espresso:espresso-accessibility:3.5.1
  • androidx.test.espresso:espresso-core:3.5.1
  • androidx.test.espresso:espresso-contrib:3.5.1
  • androidx.test.espresso:espresso-idling-resource:3.5.1
  • androidx.test.espresso:espresso-intents:3.5.1
  • androidx.test.espresso:espresso-remote:3.5.1
  • androidx.test.espresso:espresso-web:3.5.1
  • androidx.test.espresso.idling:idling-concurrent:3.5.1
  • androidx.test.espresso.idling:idling-net:3.5.1

bug 修复

  • 参考文档清理:更正了参数名称,并从 IdlingThreadPoolExecutor 和 UriIdlingResource 中移除了过时的“beta”语句

依赖项变更

  • 更新了 androidx.test:monitor:1.6.1,以支持在没有测试存储的情况下保存 Espresso 测试失败的屏幕截图

Espresso 3.5.0

2022 年 11 月 8 日

发布了以下工件:

  • androidx.test.espresso:espresso-accessibility:3.5.0
  • androidx.test.espresso:espresso-core:3.5.0
  • androidx.test.espresso:espresso-contrib:3.5.0
  • androidx.test.espresso:espresso-idling-resource:3.5.0
  • androidx.test.espresso:espresso-intents:3.5.0
  • androidx.test.espresso:espresso-remote:3.5.0
  • androidx.test.espresso:espresso-web:3.5.0
  • androidx.test.espresso.idling:idling-concurrent:3.5.0
  • androidx.test.espresso.idling:idling-net:3.5.0

新功能

  • 记录 Espresso 操作的 Android 轨迹 Span
  • Espresso 的 DefaultFailureHandler 现在会将测试失败的屏幕截图保存到 TestStorage
  • 添加了实验性 ViewInteraction.captureToBitmap 扩展函数
  • 将视图层次结构保存到故障文件中

API 变更

  • 将 ViewMatchers hasTextColor 和 hasBackground 升级为稳定版 API
  • 添加了 IntentsRule
  • 为 IntentMatchers.hasExtraWithKey() 和 BundleMatchers.hasKey() 添加了反转匹配器
  • 添加了一个可滚动至 RecyclerView 中最后一个位置的 ViewAction。
  • 添加了 IntentMatcher.hasExtra API

bug 修复

  • 保留 up 事件上的工具类型
  • 使 IdlingRegistry 更线程安全。
  • 支持 scrollTo() 的其他视图
  • 针对 Robolectric 上的每次 Espresso 互动,移除了不必要的 interruptEspressoTasks 警告日志。
  • 消除了在 Robolectric 下运行时 CloseKeyboardAction 中出现的超时问题
  • 使用一致的 InputDevice 来源进行输入手势注入
  • 支持在 Espresso intent 中模拟 ActivityNotFoundException。
  • 当异常消息太大时,将其中的视图层次结构截断。
  • 显示模糊匹配视图的数量和列表。
  • 可验证是否在界面线程上调用了 onView.check/perform()

依赖项变更

  • 更新为
    • kotlin stdlib 1.7.10
    • jsr305:2.0.2
    • tagsoup:1.2.1
    • androidx.annotation:1.2.0
  • contrib:
    • 已更新为 drawer 1.1.1、recycler view 1.2.1 和 material 1.4.0

Espresso 3.5.0-rc01

2022 年 10 月 26 日

发布了以下工件:

  • androidx.test.espresso:espresso-accessibility:3.5.0-rc01
  • androidx.test.espresso:espresso-core:3.5.0-rc01
  • androidx.test.espresso:espresso-contrib:3.5.0-rc01
  • androidx.test.espresso:espresso-idling-resource:3.5.0-rc01
  • androidx.test.espresso:espresso-intents:3.5.0-rc01
  • androidx.test.espresso:espresso-remote:3.5.0-rc01
  • androidx.test.espresso:espresso-web:3.5.0-rc01
  • androidx.test.espresso.idling:idling-concurrent:3.5.0-rc01
  • androidx.test.espresso.idling:idling-net:3.5.0-rc01

Espresso 3.5.0-beta02

2022 年 10 月 21 日

发布了以下工件:

  • androidx.test.espresso:espresso-accessibility:3.5.0-beta02
  • androidx.test.espresso:espresso-core:3.5.0-beta02
  • androidx.test.espresso:espresso-contrib:3.5.0-beta02
  • androidx.test.espresso:espresso-idling-resource:3.5.0-beta02
  • androidx.test.espresso:espresso-intents:3.5.0-beta02
  • androidx.test.espresso:espresso-remote:3.5.0-beta02
  • androidx.test.espresso:espresso-web:3.5.0-beta02
  • androidx.test.espresso.idling:idling-concurrent:3.5.0-beta02
  • androidx.test.espresso.idling:idling-net:3.5.0-beta02

API 变更

  • 将 ViewMatchers hasTextColor 和 hasBackground 升级为稳定版 API

bug 修复

  • 修复了 scrollTo 中的 recyclerview ClassNotFoundExceptions

依赖项变更

Espresso 3.5.0-beta01

2022 年 10 月 6 日

发布了以下工件:

  • androidx.test.espresso:espresso-accessibility:3.5.0-beta01
  • androidx.test.espresso:espresso-core:3.5.0-beta01
  • androidx.test.espresso:espresso-contrib:3.5.0-beta01
  • androidx.test.espresso:espresso-idling-resource:3.5.0-beta01
  • androidx.test.espresso:espresso-intents:3.5.0-beta01
  • androidx.test.espresso:espresso-remote:3.5.0-beta01
  • androidx.test.espresso:espresso-web:3.5.0-beta01
  • androidx.test.espresso.idling:idling-concurrent:3.5.0-beta01
  • androidx.test.espresso.idling:idling-net:3.5.0-beta01

API 变更

  • 使自 3.4.0 以来引入的新 API 带有 NonNull/Nullable 注解
  • 添加了 IntentsRule API

bug 修复

  • 使 IdlingRegistry 更线程安全。
  • 支持 scrollTo() 的其他视图

依赖项变更

  • 更新为 kotlin stdlib 1.7.10
  • 更新为 jsr305:2.0.2
  • 更新为 tagoup:1.2.1

Espresso 3.5.0-alpha07

2022 年 6 月 1 日

发布了以下工件:

  • androidx.test.espresso:espresso-accessibility:3.5.0-alpha07
  • androidx.test.espresso:espresso-core:3.5.0-alpha07
  • androidx.test.espresso:espresso-contrib:3.5.0-alpha07
  • androidx.test.espresso:espresso-idling-resource:3.5.0-alpha07
  • androidx.test.espresso:espresso-intents:3.5.0-alpha07
  • androidx.test.espresso:espresso-remote:3.5.0-alpha07
  • androidx.test.espresso:espresso-web:3.5.0-alpha07
  • androidx.test.espresso.idling:idling-concurrent:3.5.0-alpha07
  • androidx.test.espresso.idling:idling-net:3.5.0-alpha07

bug 修复

  • 恢复为 javac 11,以防止 IncompatibleClassChangeErrors [#1351]

依赖项变更

  • 更新为 kotlin stdlib 1.6.21

Espresso 3.5.0-alpha06

2022 年 4 月 28 日

发布了以下工件:

  • androidx.test.espresso:espresso-accessibility:3.5.0-alpha06
  • androidx.test.espresso:espresso-core:3.5.0-alpha06
  • androidx.test.espresso:espresso-contrib:3.5.0-alpha06
  • androidx.test.espresso:espresso-idling-resource:3.5.0-alpha06
  • androidx.test.espresso:espresso-intents:3.5.0-alpha06
  • androidx.test.espresso:espresso-remote:3.5.0-alpha06
  • androidx.test.espresso:espresso-web:3.5.0-alpha06
  • androidx.test.espresso.idling:idling-concurrent:3.5.0-alpha06
  • androidx.test.espresso.idling:idling-net:3.5.0-alpha06

bug 修复

  • 针对 Robolectric 上的每次 Espresso 互动,移除了不必要的 interruptEspressoTasks 警告日志。

Espresso 3.5.0-alpha05

2022 年 3 月 21 日

发布了以下工件:

  • androidx.test.espresso:espresso-accessibility:3.5.0-alpha05
  • androidx.test.espresso:espresso-core:3.5.0-alpha05
  • androidx.test.espresso:espresso-contrib:3.5.0-alpha05
  • androidx.test.espresso:espresso-idling-resource:3.5.0-alpha05
  • androidx.test.espresso:espresso-intents:3.5.0-alpha05
  • androidx.test.espresso:espresso-remote:3.5.0-alpha05
  • androidx.test.espresso:espresso-web:3.5.0-alpha05
  • androidx.test.espresso.idling:idling-concurrent:3.5.0-alpha05
  • androidx.test.espresso.idling:idling-net:3.5.0-alpha05

bug 修复

  • 消除了在 Robolectric 下运行时 CloseKeyboardAction 中出现的超时问题

Espresso 3.5.0-alpha04

2022 年 2 月 11 日

发布了以下工件:

  • androidx.test.espresso:espresso-accessibility:3.5.0-alpha04
  • androidx.test.espresso:espresso-core:3.5.0-alpha04
  • androidx.test.espresso:espresso-contrib:3.5.0-alpha04
  • androidx.test.espresso:espresso-idling-resource:3.5.0-alpha04
  • androidx.test.espresso:espresso-intents:3.5.0-alpha04
  • androidx.test.espresso:espresso-remote:3.5.0-alpha04
  • androidx.test.espresso:espresso-web:3.5.0-alpha04
  • androidx.test.espresso.idling:idling-concurrent:3.5.0-alpha04
  • androidx.test.espresso.idling:idling-net:3.5.0-alpha04

API 变更

  • 为 IntentMatchers.hasExtraWithKey() 和 BundleMatchers.hasKey() 添加了反转匹配器
  • 添加了一个可滚动至 RecyclerView 中最后一个位置的 ViewAction。

新功能

  • 记录 Espresso 操作的 Android 轨迹 Span

bug 修复

  • 使用一致的 InputDevice 来源进行输入手势注入
  • 支持在 Espresso intent 中模拟 ActivityNotFoundException。
  • 当异常消息太大时,将其中的视图层次结构截断。
  • 显示模糊匹配视图的数量和列表。

依赖项变更

  • 更新为 kotlin stdlib 1.6.10

Espresso 3.5.0-alpha03

2021 年 10 月 4 日

发布了以下工件:

  • androidx.test.espresso:espresso-accessibility:3.5.0-alpha03
  • androidx.test.espresso:espresso-core:3.5.0-alpha03
  • androidx.test.espresso:espresso-contrib:3.5.0-alpha03
  • androidx.test.espresso:espresso-idling-resource:3.5.0-alpha03
  • androidx.test.espresso:espresso-intents:3.5.0-alpha03
  • androidx.test.espresso:espresso-remote:3.5.0-alpha03
  • androidx.test.espresso:espresso-web:3.5.0-alpha03
  • androidx.test.espresso.idling:idling-concurrent:3.5.0-alpha03
  • androidx.test.espresso.idling:idling-net:3.5.0-alpha03

新功能

  • Espresso 的 DefaultFailureHandler 现在会将测试失败的屏幕截图保存到 TestStorage

bug 修复

  • 修复了 ViewInteraction.captureToBitmap 的可见性和功能问题
  • 可验证是否在界面线程上调用了 onView.check/perform()

Espresso 3.5.0-alpha02

2021 年 9 月 28 日

发布了以下工件:

  • androidx.test.espresso:espresso-accessibility:3.5.0-alpha02
  • androidx.test.espresso:espresso-core:3.5.0-alpha02
  • androidx.test.espresso:espresso-contrib:3.5.0-alpha02
  • androidx.test.espresso:espresso-idling-resource:3.5.0-alpha02
  • androidx.test.espresso:espresso-intents:3.5.0-alpha02
  • androidx.test.espresso:espresso-remote:3.5.0-alpha02
  • androidx.test.espresso:espresso-web:3.5.0-alpha02
  • androidx.test.espresso.idling:idling-concurrent:3.5.0-alpha02
  • androidx.test.espresso.idling:idling-net:3.5.0-alpha02

新功能

  • 添加了实验性 ViewInteraction.captureToBitmap 扩展函数

依赖项变更

  • 全部:
    • 已更新为 androidx.annotation:1.2.0
  • core:
    • 已更新为 kotlin stdlib 1.5.31
  • contrib:
    • 已更新为 drawer 1.1.1、recycler view 1.2.1 和 materual 1.4.0

Espresso 3.5.0-alpha01

2021 年 8 月 23 日

发布了以下工件:

  • androidx.test.espresso:espresso-accessibility:3.5.0-alpha01
  • androidx.test.espresso:espresso-core:3.5.0-alpha01
  • androidx.test.espresso:espresso-contrib:3.5.0-alpha01
  • androidx.test.espresso:espresso-idling-resource:3.5.0-alpha01
  • androidx.test.espresso:espresso-intents:3.5.0-alpha01
  • androidx.test.espresso:espresso-remote:3.5.0-alpha01
  • androidx.test.espresso:espresso-web:3.5.0-alpha01
  • androidx.test.espresso.idling:idling-concurrent:3.5.0-alpha01
  • androidx.test.espresso.idling:idling-net:3.5.0-alpha01

新功能

  • 将视图层次结构保存到故障文件中

API 变更

  • 添加了 IntentMatcher.hasExtra API

依赖项变更

  • core:依赖于 kotlin stdlib 1.4.30

Espresso 设备 1.0.0

Espresso 设备 1.0.0-alpha08

2024 年 1 月 26 日

发布了 androidx.test.espresso:espresso-device:1.0.0-alpha08

bug 修复

  • 改进了进程没有 INTERNET 权限时的错误消息功能
  • 在 Espresso 设备文档中的可点击链接创建异常类引用

API 变更 * 从 androidx.test.filter.CustomFilter 中移除了 ExperimentalTestApi

Espresso 设备 1.0.0-alpha07

2023 年 11 月 29 日

发布了 androidx.test.espresso:espresso-device:1.0.0-alpha07

API 变更

  • 支持在实体设备上设置设备模式

新功能

Espresso 设备 1.0.0-alpha06

2023 年 9 月 18 日

发布了以下工件:

  • androidx.test.espresso:espresso-device:1.0.0-alpha06

API 变更 * 支持在打开的实体设备上设置屏幕方向 * 移除了 ActionContext 接口

依赖项变更 * minSdkVersion 现为 19

Espresso 设备 1.0.0-alpha05

2023 年 5 月 4 日

发布了以下工件:

  • androidx.test.espresso:espresso-device:1.0.0-alpha05

API 变更

  • 添加了适用于旋转和折叠模拟器的实验性 API

JUnit 扩展 1.2.0

ext.junit 1.2.0-alpha03

2024 年 1 月 26 日

发布了 androidx.test.ext:junit:1.2.0-alpha03androidx.test.ext:junit-ktx:1.2.0-alpha03

bug 修复

  • 清理参考文档 - 记录之前缺少的参数、修正链接等

ext.junit 1.2.0-alpha02

2023 年 11 月 29 日

发布了 androidx.test.ext:junit:1.2.0-alpha02androidx.test.ext:junit-ktx:1.2.0-alpha02

API 变更

  • 添加了 AppComponentFactoryRule
  • minSdkVersion 现为 19,targetSdkVersion 现为 34

新功能

ext.junit 1.2.0-alpha01

2023 年 3 月 21 日

发布了 androidx.test.ext:junit:1.2.0-alpha01androidx.test.ext:junit-ktx:1.2.0-alpha01

API 变更

  • 创建 DeleteFilesRule:用于在测试用例执行之间移除文件的 API

依赖项变更

  • 更新了 androidx.test:monitor:1.7.0-alpha01、androidx.test:core:1.6.0-alpha01、androidx.test.services:storage:1.5.0-alpha01
  • 更新为 kotlin stdlib 1.7.22
  • 主要版本工具链更新:
    • 类现在编译为 java8 字节码
    • javac 编译器已切换到 OpenJDK 11。

JUnit Extensions 1.1.5

ext.junit 1.1.5

2023 年 1 月 3 日

发布了 androidx.test.ext:junit:1.1.5androidx.test.ext:junit-ktx:1.1.5

bug 修复

  • 修复了 ActivityScenarioRule 的参考文档格式设置

JUnit Extensions 1.1.4

ext.junit 1.1.4

2022 年 11 月 8 日

发布了 androidx.test.ext:junit:1.1.4androidx.test.ext:junit-ktx:1.1.4

自 1.1.3 以来的变更包括:

依赖项变更

  • 更新为 kotlin stdlib 1.7.10
  • 更新为 org.junit:junit:4.13.2

ext.junit 1.1.4-rc01

2022 年 10 月 26 日

发布了 androidx.test.ext:junit:1.1.4-rc01androidx.test.ext:junit-ktx:1.1.4-rc01

ext.junit 1.1.4-beta01

2022 年 10 月 6 日

发布了 androidx.test.ext:junit:1.1.4-beta01androidx.test.ext:junit-ktx:1.1.4-beta01

依赖项变更

  • 更新为 kotlin stdlib 1.7.10

ext.junit 1.1.4-alpha07

2022 年 6 月 1 日

发布了 androidx.test.ext:junit:1.1.4-alpha07androidx.test.ext:junit-ktx:1.1.4-alpha07

bug 修复

  • 恢复为 javac 11,以防止 IncompatibleClassChangeErrors [#1351]

依赖项变更

  • 更新为 kotlin stdlib 1.6.21

ext.junit 1.1.4-alpha06

2022 年 4 月 28 日

发布了 androidx.test.ext:junit:1.1.4-alpha06androidx.test.ext:junit-ktx:1.1.4-alpha06

bug 修复

  • AndroidJUnit4 javadoc 进行了细微修复。

ext.junit 1.1.4-alpha05

2022 年 3 月 21 日

发布了 androidx.test.ext:junit:1.1.4-alpha05androidx.test.ext:junit-ktx:1.1.4-alpha05

ext.junit 1.1.4-alpha04

2022 年 2 月 11 日

发布了 androidx.test.ext:junit:1.1.4-alpha04androidx.test.ext:junit-ktx:1.1.4-alpha04

** 依赖项变更

  • 更新为 kotlin stdlib 1.6.10

ext.junit 1.1.4-alpha03

2021 年 10 月 4 日

发布了 androidx.test.ext:junit:1.1.4-alpha03androidx.test.ext:junit-ktx:1.1.4-alpha03

ext.junit 1.1.4-alpha02

2021 年 9 月 28 日

发布了 androidx.test.ext:junit:1.1.4-alpha02androidx.test.ext:junit-ktx:1.1.4-alpha02

依赖项变更

  • 更新为
    • kotlin stdlib 1.5.31
    • org.junit:junit:4.13.2

ext.junit 1.1.4-alpha01

2021 年 8 月 23 日

发布了 androidx.test.ext:junit:1.1.4-alpha01androidx.test.ext:junit-ktx:1.1.4-alpha01

依赖项变更

  • -ktx:显式依赖于 kotlin stdlib 1.4.30

Junit-Gtest 1.0

Junit-Gtest 1.0.0-alpha01

2022 年 3 月 23 日

发布了 androidx.test.ext:junit-gtest:1.0.0-alpha01版本 1.0.0-alpha01 中包含这些提交内容

第一个版本中的功能

  • JUnit Gtest 是一个新库,包含一个用于在连接的设备上运行 Gtest 套件的 JUnit 运行程序。

Truth 扩展 1.6.0

ext.true 1.6.0-alpha03

2024 年 1 月 26 日

发布了 androidx.test.ext:truth:1.6.0-alpha03

bug 修复

  • 取消对低于 19 的 Android SDK 的所有支持。最低版本为 API 19 (Android Kit Kat 4.4)

新功能

  • 已添加PersistableBundleSubject

ext.true 1.6.0-alpha02

2023 年 11 月 29 日

发布了 androidx.test.ext:truth:1.6.0-alpha02

API 变更

  • minSdkVersion 现为 19,targetSdk 现为 34

新功能

ext.true 1.6.0-alpha01

2023 年 3 月 21 日

发布了 androidx.test.ext:truth:1.6.0-alpha01

依赖项变更

  • 更新至 androidx.test:core:1.6.0-alpha01
  • 更新为 kotlin stdlib 1.7.22
  • 主要版本工具链更新:
    • 类现在编译为 java8 字节码
    • javac 编译器已切换到 OpenJDK 11。

Truth Extensions 1.5.0

ext.truth 1.5.0

2022 年 11 月 8 日

发布了 androidx.test.ext:truth:1.5.0

自 1.4.0 以来的变更包括:

API 变更

  • 添加了 BundleSubject#stringArray
  • 添加了 ParcelableSubject.marshallsEquallyTo()
  • 添加了 BundleSubject#doubleFloat

bug 修复

  • 针对 null intent,使 intent 匹配器显式失败

依赖项变更

  • 更新为
    • com.google.guava:guava:30.1.1-android
    • com.google.truth:truth:1.1.3

ext.truth 1.5.0-rc01

2022 年 10 月 26 日

发布了 androidx.test.ext:truth:1.5.0-rc01

ext.truth 1.5.0-beta02

2022 年 10 月 21 日

发布了 androidx.test.ext:truth:1.5.0-beta02

API 变更

  • 将 IntentCorrespondences#all 升级为稳定版 API。

ext.truth 1.5.0-beta01

2022 年 10 月 6 日

发布了 androidx.test.ext:truth:1.5.0-beta01

API 变更

  • 使自 1.4.0 以来引入的新 API 带有 NonNull/Nullable 注解
  • 添加了 BundleSubject#stringArray

ext.truth 1.5.0-alpha07

2022 年 6 月 1 日

发布了 androidx.test.ext:truth:1.5.0-alpha07

bug 修复

  • 恢复为 javac 11,以防止 IncompatibleClassChangeErrors [#1351]

ext.truth 1.5.0-alpha06

2022 年 4 月 28 日

发布了 androidx.test.ext:truth:1.5.0-alpha06

ext.truth 1.5.0-alpha05

2022 年 3 月 21 日

发布了 androidx.test.ext:truth:1.5.0-alpha05

bug 修复

  • 针对 null intent,使 intent 匹配器显式失败

ext.truth 1.5.0-alpha04

2022 年 2 月 11 日

发布了 androidx.test.ext:truth:1.5.0-alpha04

ext.truth 1.5.0-alpha03

2021 年 10 月 4 日

发布了 androidx.test.ext:truth:1.5.0-alpha03

ext.truth 1.5.0-alpha02

2021 年 9 月 28 日

发布了 androidx.test.ext:truth:1.5.0-alpha02

API 变更

  • 添加了 ParcelableSubject.marshallsEquallyTo()

依赖项变更

  • 更新为
    • com.google.guava:guava:30.1.1-android
    • com.google.truth:truth:1.1.3

ext.truth 1.5.0-alpha01

2021 年 8 月 23 日

发布了 androidx.test.ext:truth:1.5.0-alpha01

API 变更

  • 添加了 BundleSubject#doubleFloat

监控 1.7.0

监控 1.7.0-alpha04

2024 年 1 月 26 日

发布了 androidx.test:monitor:1.7.0-alpha04

bug 修复

  • 修复了 IntentMonitorImpl 回调中的同步问题
  • 取消对低于 19 的 Android SDK 的所有支持。最低版本为 API 19 (Android Kit Kat 4.4)

API 变更 * 将 androidx.test.platform.tracing 移回内部 API

监控 1.7.0-alpha03

2023 年 11 月 29 日

发布了 androidx.test:monitor:1.7.0-alpha03

API 变更

  • targetSdkVersion 现为 34

新功能

监控 1.7.0-alpha02

2023 年 9 月 18 日

发布了 androidx.test:monitor:1.7.0-alpha02

API 变更 * 添加了 AppComponentFactory 规则

功能 * 在空闲资源超时时转储线程状态

bug 修复 * 修复了 API 级别不低于 26 的对话框内视图的 captureToBitmap 问题。

依赖项变更 * minSdkVersion 现为 19

监控 1.7.0-alpha01

2023 年 3 月 21 日

发布了 androidx.test:monitor:1.7.0-alpha01

依赖项变更

  • 更新为 kotlin stdlib 1.7.22
  • 主要版本工具链更新:现在已编译为 java8 字节码

监控 1.6.0

monitor 1.6.1

2023 年 1 月 3 日

发布了 androidx.test:monitor:1.6.1

bug 修复

  • 修复了 PlatformTestStorage 的默认实现。这将使 Espresso 能够在未配置 androidx.test.services 时保存测试失败的屏幕截图
  • 清理参考文档

monitor 1.6.0

2022 年 11 月 8 日

发布了 androidx.test:monitor:1.6.0

自 1.5.0 以来的变更包括:

API 变更

  • 更改了内部 API 以支持 ActivityScenario#launchActivityForResult
  • 添加了用于支持不同跟踪库的内部 API。

bug 修复

  • 移除了“仍处于 CREATED 到 STOPPED 状态的 activity”日志垃圾

依赖项变更

  • 添加了 androidx.tracing 依赖项

monitor 1.6.0-rc01

2022 年 10 月 26 日

发布了 androidx.test:monitor:1.6.0-rc01

monitor 1.6.0-beta01

2022 年 10 月 6 日

发布了 androidx.test:monitor:1.6.0-beta01

monitor 1.6.0-alpha05

2022 年 8 月 22 日

发布了 androidx.test:monitor:1.6.0-alpha05

API 变更

  • 更改了内部 API 以支持 ActivityScenario#launchActivityForResult

Monitor aka Platform 1.6.0

monitor 1.6.0-alpha04

2022 年 6 月 1 日

发布了 androidx.test:monitor:1.6.0-alpha04

bug 修复

  • 恢复为 javac 11,以防止 IncompatibleClassChangeErrors [#1351]

monitor 1.6.0-alpha03

2022 年 4 月 28 日

发布了 androidx.test:monitor:1.6.0-alpha03

bug 修复

  • 移除了“仍处于 CREATED 到 STOPPED 状态的 activity”日志垃圾

monitor 1.6.0-alpha02

2022 年 3 月 21 日

发布了 androidx.test:monitor:1.6.0-alpha02

bug 修复

  • 降低了 HardwareRendererCompat 日志记录的严重程度。
  • 确保在 Instrumentation#finish 之前调用 Trace.endSection。

monitor 1.6.0-alpha01

2022 年 2 月 11 日

发布了 androidx.test:monitor:1.6.0-alpha01

API 变更

  • 添加了用于支持不同跟踪库的内部插件 API。

依赖项变更

  • 添加了 androidx.tracing 依赖项

Monitor aka Platform 1.5.0

monitor 1.5.0

2021 年 12 月 13 日

发布了 androidx.test:monitor:1.5.0

自上一个 1.4.0 稳定版以来的变更包括:

API 变更

  • 添加了 HardwareRendererCompat
  • 添加了 PlatformTestStorage
  • 废弃了 androidx.test.annotation.Beta

monitor 1.5.0-rc01

2021 年 11 月 18 日

发布了 androidx.test:monitor:1.5.0-rc01

monitor 1.5.0-beta01

2021 年 11 月 8 日

发布了 androidx.test:monitor:1.5.0-beta01

monitor 1.5.0-alpha03

2021 年 10 月 4 日

发布了 androidx.test:monitor:1.5.0-alpha03

monitor 1.5.0-alpha02

2021 年 9 月 28 日

发布了 androidx.test:monitor:1.5.0-alpha02

API 变更

  • 移除了 HardwareRendererCompat#enableDrawingIfNecessary
  • 从 HardwareRendererCompat 中移除了 ExperimentalTestApi
  • 废弃了 androidx.test.annotation.Beta

monitor 1.5.0-alpha01

2021 年 8 月 23 日

发布了 androidx.test:monitor:1.5.0-alpha01

API 变更

  • 添加了 HardwareRendererCompat
  • 添加了 PlatformTestStorage

Orchestrator 1.5.0

Orchestrator 1.5.0-alpha03

2024 年 2 月 29 日

发布了 androidx.test:orchestrator:1.5.0-alpha03

新功能

  • 引入了插桩参数代理,让用户能够将插桩参数代理给被测 APK(例如:--no-hidden-api-checks)。

Orchestrator 1.5.0-alpha02

2023 年 11 月 29 日

发布了 androidx.test:orchestrator:1.5.0-alpha02

API 变更

  • minSdkVersion 现为 19

bug 修复

  • 修复了测试名称过长时发生崩溃的问题

新功能

Orchestrator 1.5.0-alpha01

2023 年 3 月 21 日

发布了 androidx.test:orchestrator:1.5.0-alpha01

依赖项变更

  • 主要版本工具链更新。APK 现在使用其他密钥进行签名,您需要卸载之前的所有 Orchestrator(“adb uninstall androidx.test.orchestrator”)

Orchestrator 1.4.2

orchestrator 1.4.2

2022 年 11 月 8 日

发布了 androidx.test:orchestrator:1.4.2

orchestrator 1.4.2-rc01

2022 年 10 月 26 日

发布了 androidx.test:orchestrator:1.4.2-rc01

orchestrator 1.4.2-beta01

2022 年 10 月 6 日

发布了 androidx.test:orchestrator:1.4.2-beta01

orchestrator 1.4.2-alpha04

2022 年 6 月 1 日

发布了 androidx.test:orchestrator:1.4.2-alpha04

bug 修复

  • 恢复为 javac 11,以防止 IncompatibleClassChangeErrors [#1351]

orchestrator 1.4.2-alpha03

2022 年 4 月 28 日

发布了 androidx.test:orchestrator:1.4.2-alpha03

orchestrator 1.4.2-alpha02

2022 年 3 月 21 日

发布了 androidx.test:orchestrator:1.4.2-alpha02

orchestrator 1.4.2-alpha01

2022 年 2 月 11 日

发布了 androidx.test:orchestrator:1.4.2-alpha01

Orchestrator 1.4.1

orchestrator 1.4.1

2021 年 12 月 13 日

发布了 androidx.test:orchestrator:1.4.1

自上一个 1.4.0 稳定版以来的显著变更包括:

bug 修复

  • 删除了过时的 OrchestrationXmlTestRunListener,这在一定程度上是为了防止在 Android 11+ 上收到错误消息
  • 添加了对 Android API 31 的支持

orchestrator 1.4.1-rc01

2021 年 11 月 18 日

发布了 androidx.test:orchestrator:1.4.1-rc01

orchestrator 1.4.1-beta01

2021 年 11 月 8 日

发布了 androidx.test:orchestrator:1.4.1-beta01

orchestrator 1.4.1-alpha03

2021 年 10 月 4 日

发布了 androidx.test:orchestrator:1.4.1-alpha03

orchestrator 1.4.1-alpha02

2021 年 9 月 28 日

发布了 androidx.test:orchestrator:1.4.1-alpha02

orchestrator 1.4.1-alpha01

2021 年 8 月 23 日

发布了 androidx.test:orchestrator:1.4.1-alpha01

bug 修复

  • 删除了过时的 OrchestrationXmlTestRunListener,这在一定程度上是为了防止在 Android 11+ 上收到错误消息

Runner 1.6.0

runner 1.6.0-alpha06

2024 年 1 月 26 日

发布了 androidx.test:runner:1.6.0-alpha06

bug 修复

  • 尝试在 RequireDevice 文档中阐明限制和废弃原因
  • 取消对低于 19 的 Android SDK 的所有支持。最低版本为 API 19 (Android Kit Kat 4.4)
  • 修复了对同一类/方法使用“-e 类”和“-e notClass”应执行相同结果的问题(不运行测试)

API 变更

  • 将 androidx.test.services.** 标记为 RestrictTo LIBRARY_GROUP
  • 从 CustomFilter 中移除了 ExperimentalTestApi - 已将其设为公开
  • 从 PackagePrefixClasspathSuite 中移除了 ExperimentalTestApi - 公开
  • 将 PermissionRequester 标记为 RestrictTo LIBRARY_GROUP,而非 ExperimentalTestApi

runner 1.6.0-alpha05

2023 年 11 月 29 日

发布了 androidx.test:runner:1.6.0-alpha05

bug 修复

  • 如果插桩抛出 RuntimeException,TestDiscoveryEventServiceConnection.send() 会正确使测试失败,而不是挂起。
  • 停止解析每个 AndroidJUnit4 测试类的所有参数。这应该可以解决如 #1948 中所示的初始化错误。

API 变更

  • minSdkVersion 现为 19

新功能

runner 1.6.0-alpha04

2023 年 8 月 21 日

发布了 androidx.test:runner:1.6.0-alpha04

bug 修复

  • 强制初始化 InstrumentRunListener,以防止在对系统服务器进程进行插桩时出现 NPE。

依赖项变更

  • 升级到 androidx.annotation:1.7.0-beta01

runner 1.6.0-alpha03

2023 年 6 月 27 日

发布了 androidx.test:runner:1.6.0-alpha03

bug 修复

  • 尝试避免输出超出 binder 事务限制的测试结果摘要。

runner 1.6.0-alpha02

2023 年 4 月 25 日

发布了 androidx.test:runner:1.6.0-alpha02

bug 修复

  • 最多等待 2 秒,让 activity 完成器运行,以防止其在测试期间完成 activity

runner 1.6.0-alpha01

2023 年 3 月 21 日

发布了 androidx.test:runner:1.6.0-alpha01

bug 修复

  • 改进了因自定义类加载器导致 junit 类不匹配时的错误报告
  • 修复了 @Ignore-d 类在 logOnly 模式下的报告问题
  • 将 InstrumentationResultPrinter 的实例移至 MultiDex 加载后
  • 先注册 TestStorage,再在 RunnerArgs 解析中使用它
  • 按照提供给 TestRequestBuilder 的顺序执行测试类。

依赖项变更

  • 更新为 androidx.test:monitor:1.7.0-alpha01
  • 主要版本工具链更新:
    • 类现在编译为 java8 字节码
    • javac 编译器已切换到 OpenJDK 11。

Runner 1.5.0

runner 1.5.2

2023 年 1 月 3 日

发布了 androidx.test:runner:1.5.2

bug 修复

  • 清理参考文档

runner 1.5.1

2022 年 11 月 9 日

发布了 androidx.test:runner:1.5.1

bug 修复

  • 截断了 TraceRunListener 中的轨迹名称,以防因过长的测试名称而导致崩溃

runner 1.5.0

2022 年 11 月 8 日

发布了 androidx.test:runner:1.5.0

自 1.4.0 以来的变更包括:

新功能

  • 记录测试生命周期事件的 Android 轨迹 Span

API 变更

  • 将长期 @Beta/@ExperimentalTestApi androidx.test.runner.screenshot 标示为稳定版但已废弃的 API(改为使用新的 androidx.test.core/espresso screenshot API)
  • 废弃了“-e timeout”运行时参数,改为使用 JUnit 的超时规则。
  • 添加了 AbstractFilter 类。
  • 添加了 AndroidClasspathSuite 和实验性 PackagePrefixClasspathSuite
  • 以空操作形式废弃了 Google Analytics(分析)

bug 修复

  • 在 -e testFile 中添加了对从 TestStorage 读取数据的支持
  • 处理了设置 InstrumentResultPrinter 之前应用崩溃的情况。
  • 立即在 orchestrator 插桩监听器中报告进程崩溃问题。
  • 支持包含英文逗号和哈希的参数化测试名称。
  • 改进了 Orchestrator 中测试发现阶段的错误处理方式
  • 增强了在异常情况(应用崩溃等)下处理错误的能力

依赖项变更

  • 更新为
    • org.junit:junit:4.13.2

runner 1.5.0-rc01

2022 年 10 月 26 日

发布了 androidx.test:runner:1.5.0-rc01

runner 1.5.0-beta02

2022 年 10 月 21 日

发布了 androidx.test:runner:1.5.0-beta02

API 变更

  • 将长期 @Beta/@ExperimentalTestApi androidx.test.runner.screenshot 标示为稳定版但已废弃的 API

bug 修复

  • 在 -e testFile 中添加了对从 TestStorage 读取数据的支持

runner 1.5.0-beta01

2022 年 10 月 6 日

发布了 androidx.test:runner:1.5.0-beta01

API 变更

  • 废弃了“-e timeout”运行时参数,改为使用 JUnit 的超时规则。
  • 添加了 AbstractFilter 类。

bug 修复

  • 修复了较长测试名称的跟踪错误
  • 处理了设置 InstrumentResultPrinter 之前应用崩溃的情况。

runner 1.5.0-alpha04

2022 年 6 月 1 日

发布了 androidx.test:runner:1.5.0-alpha04

bug 修复

  • 恢复为 javac 11,以防止 IncompatibleClassChangeErrors [#1351]

runner 1.5.0-alpha03

2022 年 4 月 28 日

发布了 androidx.test:runner:1.5.0-alpha03

bug 修复

  • 立即在 orchestrator 插桩监听器中报告进程崩溃问题。

runner 1.5.0-alpha02

2022 年 3 月 21 日

发布了 androidx.test:runner:1.5.0-alpha02

bug 修复

  • 确保在 Instrumentation#finish 之前调用 Trace.endSection。

runner 1.5.0-alpha01

2022 年 2 月 11 日

发布了 androidx.test:runner:1.5.0-alpha01

API 变更

  • 添加了 AndroidClasspathSuite 和 PackagePrefixClasspathSuite

新功能

  • 记录测试生命周期事件的 Android 轨迹 Span

bug 修复

  • 支持包含英文逗号和哈希的参数化测试名称。
  • 改进了 Orchestrator 中测试发现阶段的错误处理方式

Runner 1.4.1

runner 1.4.1-alpha03

2021 年 10 月 4 日

发布了 androidx.test:runner:1.4.1-alpha03

bug 修复

  • 可在测试执行器抛出错误时报告异常。

runner 1.4.1-alpha02

2021 年 9 月 28 日

发布了 androidx.test:runner:1.4.1-alpha02

API 变更

  • 已将 androidx.test.annotaton.Beta 引用替换为 ExperimentalTestApi

bug 修复

  • 以空操作形式废弃了 Google Analytics(分析)

依赖项变更

  • 更新为
    • org.junit:junit:4.13.2

runner 1.4.1-alpha01

2021 年 8 月 23 日

发布了 androidx.test:runner:1.4.1-alpha01

bug 修复

  • 增强了在异常情况(应用崩溃等)下处理错误的能力

规则 1.6.0

rules 1.6.0-alpha03

2024 年 1 月 26 日

发布了 androidx.test:rules:1.6.0-alpha03

bug 修复

  • 取消对低于 19 的 Android SDK 的所有支持。最低版本为 API 19 (Android Kit Kat 4.4)

API 变更

  • 建议使用 UiAutomation#grantRuntimePermissions 而非 GrantPermissionRule

rules 1.6.0-alpha02

2023 年 11 月 29 日

发布了 androidx.test:rules:1.6.0-alpha02

bug 修复

  • 将指向 junit.org javadoc 的损坏链接替换为 @link。

API 变更

  • minSdkVersion 现为 19,targetSdkVersion 现为 34

新功能

rules 1.6.0-alpha01

2023 年 3 月 21 日

发布了 androidx.test:rules:1.6.0-alpha01

依赖项变更

  • 更新为 androidx.test:runner:1.6.0-alpha01
  • 更新为 kotlin stdlib 1.7.22
  • 主要版本工具链更新:
    • 类现在编译为 java8 字节码
    • javac 编译器已切换到 OpenJDK 11。

Rules 1.5.0

rules 1.5.0

2022 年 11 月 8 日

发布了 androidx.test:rules:1.5.0

自 1.4.0 以来的变更包括:

API 变更

  • 将长期 @Beta/@ExperimentalTestApi GrantPermissionRule 和 ServiceTestRule 升级为稳定版 API
  • 将长期 @Beta/@ExperimentalTestApi AtraceLogger 和 ProviderTestRule 升级为稳定版但已废弃的 API

依赖项变更

  • 更新为
    • org.junit:junit:4.13.2

Rules 1.5.0

rules 1.5.0-rc01

2022 年 10 月 26 日

发布了 androidx.test:rules:1.5.0-rc01

rules 1.5.0-beta01

2022 年 10 月 21 日

发布了 androidx.test:rules:1.5.0-beta01

API 变更

  • 将长期 @Beta/@ExperimentalTestApi GrantPermissionRule 和 ServiceTestRule 升级为稳定版 API
  • 将长期 @Beta/@ExperimentalTestApi AtraceLogger 和 ProviderTestRule 升级为稳定版但已废弃的 API

Rules 1.4.1

rules 1.4.1-beta01

2022 年 10 月 6 日

发布了 androidx.test:rules:1.4.1-beta01

rules 1.4.1-alpha07

2022 年 6 月 1 日

发布了 androidx.test:rules:1.4.1-alpha07

bug 修复

  • 恢复为 javac 11,以防止 IncompatibleClassChangeErrors [#1351]

rules 1.4.1-alpha06

2022 年 4 月 28 日

发布了 androidx.test:rules:1.4.1-alpha06

rules 1.4.1-alpha05

2022 年 3 月 21 日

发布了 androidx.test:rules:1.4.1-alpha05

rules 1.4.1-alpha04

2022 年 2 月 11 日

发布了 androidx.test:rules:1.4.1-alpha04

rules 1.4.1-alpha03

2021 年 10 月 4 日

发布了 androidx.test:rules:1.4.1-alpha03

rules 1.4.1-alpha02

2021 年 9 月 28 日

发布了 androidx.test:rules:1.4.1-alpha02

API 变更

  • 已将 androidx.test.annotaton.Beta 引用替换为 ExperimentalTestApi

依赖项变更

  • 更新为
    • org.junit:junit:4.13.2

rules 1.4.1-alpha01

2021 年 8 月 23 日

发布了 androidx.test:rules:1.4.1-alpha01

没有显著变更

服务 1.5.0

服务 1.5.0-alpha03

2024 年 1 月 26 日

发布了 androidx.test.services:test-services:1.5.0-alpha03 androidx.test.services:storage:1.5.0-alpha03

bug 修复

  • 现在,当文件打开进行写入时,除非明确打开文件以供附加,否则 TestStorage 会截断文件。这可以防止之前写入文件的字节在文件末尾保留。
  • 取消对低于 19 的 Android SDK 的所有支持。最低版本为 API 19 (Android Kit Kat 4.4)

服务 1.5.0-alpha02

2023 年 11 月 29 日

发布了 androidx.test.services:test-services:1.5.0-alpha02 androidx.test.services:storage:1.5.0-alpha02

bug 修复

  • 尝试避免输出超出 binder 事务限制的测试结果摘要

API 变更

  • minSdkVersion 现为 19,targetSdkVersion 现为 34

新功能

服务 1.5.0-alpha01

2023 年 3 月 21 日

发布了 androidx.test.services:test-services:1.5.0-alpha01 androidx.test.services:storage:1.5.0-alpha01

依赖项变更

  • 更新为 androidx.test:monitor:1.7.0-alpha01
  • 主要版本工具链更新:
    • 类现在编译为 java8 字节码
    • javac 编译器已切换到 OpenJDK 11。
    • APK 现在使用其他密钥进行签名,您需要卸载之前的所有 Orchestrator(“adb uninstall androidx.test.services”)

Services 1.4.2

services 1.4.2

2022 年 11 月 8 日

发布了 androidx.test.services:test-services:1.4.2 androidx.test.services:storage:1.4.2

services 1.4.2-rc01

2022 年 10 月 26 日

发布了 androidx.test.services:test-services:1.4.2-rc01 androidx.test.services:storage:1.4.2-rc01

services 1.4.2-beta01

2022 年 10 月 6 日

发布了 androidx.test.services:test-services:1.4.2-beta01 androidx.test.services:storage:1.4.2-beta01

services 1.4.2-alpha04

2022 年 6 月 1 日

发布了 androidx.test.services:test-services:1.4.2-alpha04 androidx.test.services:storage:1.4.2-alpha04

bug 修复

  • 恢复为 javac 11,以防止 IncompatibleClassChangeErrors [#1351]

services 1.4.2-alpha03

2022 年 4 月 28 日

发布了 androidx.test.services:test-services:1.4.2-alpha03 androidx.test.services:storage:1.4.2-alpha03

services 1.4.2-alpha02

2022 年 3 月 21 日

发布了 androidx.test.services:test-services:1.4.2-alpha02 androidx.test.services:storage:1.4.2-alpha02

services 1.4.2-alpha01

2022 年 2 月 11 日

发布了 androidx.test.services:test-services:1.4.2-alpha01 androidx.test.services:storage:1.4.2-alpha01

Services 1.4.1

services 1.4.1

2021 年 12 月 13 日

发布了 androidx.test.services:test-services:1.4.1 androidx.test.services:storage:1.4.1

自上一个 1.4.0 稳定版以来的显著变更包括:

** bug 修复 **

  • 通过针对 ToolConnection 使用真实 UID,修复了 Android API 31 上的执行问题 [#1042]

services 1.4.1-rc01

2021 年 11 月 18 日

发布了 androidx.test.services:test-services:1.4.1-rc01 androidx.test.services:storage:1.4.1-rc01

services 1.4.1-beta01

2021 年 11 月 8 日

发布了 androidx.test.services:test-services:1.4.1-beta01 androidx.test.services:storage:1.4.1-beta01

services 1.4.1-alpha03

2021 年 10 月 4 日

发布了 androidx.test.services:test-services:1.4.1-alpha03 androidx.test.services:storage:1.4.1-alpha03

services 1.4.1-alpha02

2021 年 9 月 28 日

发布了 androidx.test.services:test-services:1.4.1-alpha02 androidx.test.services:storage:1.4.1-alpha02

services 1.4.1-alpha01

2021 年 8 月 23 日

发布了 androidx.test.services:test-services:1.4.1-alpha01 androidx.test.services:storage:1.4.1-alpha01

** bug 修复 **

  • 通过针对 ToolConnection 使用真实 UID,修复了 Android S Beta4 上的执行问题 [#1042]

版本 1.4.0

版本 1.4.0

2021 年 6 月 30 日

这是 AndroidX Test 1.4.0 + Espresso 3.4.0 的稳定版。它对下列库进行了更新:

  • Core 1.4.0
  • Espresso 3.4.0
  • Intents 3.4.0
  • JUnit 1.1.3
  • Monitor 1.4.0
  • Orchestrator 1.4.0
  • Runner 1.4.0
  • Rules 1.4.0
  • Truth 1.4.0
  • Test Services 1.4.0

自 1.4.0-rc01 以来没有任何变化。以下是自 1.3.0 版以来所做更改的摘要:

新功能

  • 为负面条件添加了 Espresso ViewMatcher API
  • 允许从 Espresso IdlingRegistry 取消注册 Looper
  • 支持通过 java.util.ServiceLoader 指定 junit RunListener
  • 引入了能更好地进行错误消息传递的 Espresso BoundedDiagnosingMatcher 基类 API,并将该 API 应用于各种 Espresso 匹配器
  • 支持在类级别使用 UIThreadTest
  • 向 ext.truth 的 LocationSubject 添加了若干个实用程序方法
  • 添加了 SparseBooleanArraySubject Truth Subject,以对 SparseBooleanArray 做出断言

bug 修复

  • 改进了对测试失败时的大型堆栈轨迹的处理 [#729 和 #269]
    • 移除了测试运行程序框架相关的堆栈帧
    • 将堆栈轨迹截断到上限 64KB,以避免 Binder 限制事务错误
  • 为低于 21 的 Android API 上的 multidex instrumentation apk 添加了对类路径扫描 Test Discovery 的支持。
  • Espresso:改进了不存在 activity 时的错误消息传递
  • 改进了 Instrumentation#runOnMainSync 异常错误处理方式
  • 完善了 -e timeout_msec 和 AndroidJUnit4 的文档。
  • 将 ActivityOptions 发送到 BootstrapActivity [#685]
  • 通过让 ViewMatchers#assertThat 能够使用 Matcher.describeMismatch,改进了其错误消息传递
  • 修复了使用 Espresso-Remote 时出现的缺少脱糖 ThrowableExtension 错误 [issuetracker.google.com/170228109]
  • 通过添加 androidx.test.espresso.web.bridge 类,修复了 Android API 小于 19 时 Espresso-Web 出现的相关问题
  • 在 InstrumentationActivityInvoker 中取消注册 ActivityResultWaiter(如果尚未对其取消注册)
  • 运行程序:将 TestEventClient 的“not primary instr”日志消息降为警告,因为它是多进程测试中的预期条件
  • Espresso:更新了 HasSiblingMatcher,以便只检查同级(非自身)
  • 修复了 espresso.idling.resource 的工件名称 [#809]
  • 公开了 setMasterPolicyTimeoutWhenDebuggerAttached 功能 [#814]
  • 移除了过于冗长的 ActivityLifecycleMonitorImpl 回调日志记录。

依赖项变更

  • 更新了 espresso.accessibility 和 espresso.contrib 以依赖于与 AndroidX 兼容的 com.google.android.apps.common.testing.accessibility.framework:accessibility-test-framework:3.1。因此,此版本需要具有 java8 源/目标兼容性。 [#492]

已知问题

  • 若要在 API 30 及更高版本中使用 Orchestrator,必须使用 Studio/AGP 4.2 或更高版本

版本 1.4.0-rc01

2021 年 6 月 21 日

这是 AndroidX Test 1.4.0/Espresso 3.4.0 的候选版本。API 稳定。它对下列库进行了更新:

  • Core 1.4.0-rc01
  • Espresso 3.4.0-rc01
  • Intents 3.4.0-rc01
  • JUnit 1.1.3-rc01
  • Monitor 1.4.0-rc01
  • Orchestrator 1.4.0-rc01
  • Runner 1.4.0-rc01
  • Rules 1.4.0-rc01
  • Truth 1.4.0-rc01
  • Test Services 1.4.0-rc01

除了版本号之外,该候选版本等同于 1.4.0-beta02/3.4.0-beta02 版本。

版本 1.4.0-beta02

2021 年 6 月 7 日

这是 AndroidX Test 1.4.0 的一个测试版本。API 应该不会发生变化。 它对下列库进行了更新:

  • Core 1.4.0-beta02
  • Espresso 3.4.0-beta02
  • Intents 3.4.0-beta02
  • JUnit 1.1.3-beta02
  • Monitor 1.4.0-beta02
  • Orchestrator 1.4.0-beta02
  • Runner 1.4.0-beta02
  • Rules 1.4.0-beta02
  • Truth 1.4.0-beta02
  • Test Services 1.4.0-beta02

以下是自 1.4.0-beta01 版以来所做更改的摘要:

bug 修复

  • 切换回经典脱糖流程以解决 Beta 版 1 中存在的向后兼容性问题和核心库脱糖问题 [问题修复 968]

版本 1.4.0-beta01

2021 年 5 月 17 日

这是 AndroidX Test 1.4.0 的 Beta 版。 API 应该不会发生变化。 它对下列库进行了更新:

  • Core 1.4.0-beta01
  • Espresso 3.4.0-beta01
  • Intents 3.4.0-beta01
  • JUnit 1.1.3-beta01
  • Monitor 1.4.0-beta01
  • Orchestrator 1.4.0-beta01
  • Runner 1.4.0-beta01
  • Rules 1.4.0-beta01
  • Truth 1.4.0-beta01
  • Test Services 1.4.0-beta01

以下是自 1.4.0-alpha06 版以来所做更改的摘要:

全新 API 清理

  • 移除了 InstrumentationProvider
  • 恢复了对 BoundedMatcher 的使用
  • 恢复了 CursorMatcher,以便从 BoundedMatcher 继承

版本 1.4.0-alpha06

2021 年 4 月 29 日

这是 AndroidX Test 1.4.0 的 Alpha 版。新的 API 可能会发生变化。它对下列库进行了更新:

  • Core 1.4.0-alpha06
  • Espresso 3.4.0-alpha06
  • Intents 3.4.0-alpha06
  • JUnit 1.1.3-alpha06
  • Monitor 1.4.0-alpha06
  • Orchestrator 1.4.0-alpha06
  • Runner 1.4.0-alpha06
  • Rules 1.4.0-alpha06
  • Truth 1.4.0-alpha06
  • Test Services 1.4.0-alpha06

以下是自 1.4.0-alpha05 版以来所做更改的摘要:

bug 修复

  • 通过从清单中移除 forceQueryable,支持在低于 29 版的 SDK 上进行编译 [#917]

版本 1.4.0-alpha05

2021 年 3 月 15 日

这是 AndroidX Test 1.4.0 的 Alpha 版。新的 API 可能会发生变化。它对下列库进行了更新:

  • Core 1.4.0-alpha05
  • Espresso 3.4.0-alpha05
  • Intents 3.4.0-alpha05
  • JUnit 1.1.3-alpha05
  • Monitor 1.4.0-alpha05
  • Orchestrator 1.4.0-alpha05
  • Runner 1.4.0-alpha05
  • Rules 1.4.0-alpha05
  • Truth 1.4.0-alpha05
  • Test Services 1.4.0-alpha05

以下是自 1.4.0-alpha04 版以来所做更改的摘要:

API 变更

  • [Truth] 添加了 SparseBooleanArraySubject Truth Subject,以对 SparseBooleanArray 做出断言。

bug 修复

  • 将 QUERY_ALL_PACKAGES 权限添加到了 Android Test Orchestrator 和 Android Test Services APK 中,以便在 Android API R+ 上正常运行。
  • 为低于 21 的 Android API 上的 multidex instrumentation apk 添加了对类路径扫描 Test Discovery 的支持。

版本 1.4.0-alpha04

2021 年 2 月 8 日

这是 AndroidX Test 1.4.0 的 Alpha 版。新的 API 可能会发生变化。它对下列库进行了更新:

  • Core 1.4.0-alpha04
  • Espresso 3.4.0-alpha04
  • Intents 3.4.0-alpha04
  • JUnit 1.1.3-alpha04
  • Monitor 1.4.0-alpha04
  • Orchestrator 1.4.0-alpha04
  • Runner 1.4.0-alpha04
  • Rules 1.4.0-alpha04
  • Truth 1.4.0-alpha04
  • Test Services 1.4.0-alpha04

以下是自 1.3.1-alpha03 版以来所做变更的摘要:

新功能

  • [Espresso] 改进了各种 Espresso 断言的错误消息
  • [Truth] 向 LocationSubject 添加了若干个实用程序方法

API 变更

  • 添加了 InstrumentationRegistry.registerInstrumentationProvider

bug 修复

  • 移除了过于冗长的 ActivityLifecycleMonitorImpl 回调日志记录。

依赖项变更

版本 1.3.1

版本 1.3.1-alpha03

2021 年 1 月 11 日

这是 AndroidX Test 1.3.1 的 Alpha 版。新的 API 可能会发生变化。它对下列库进行了更新:

  • Core 1.3.1-alpha03
  • Espresso 3.4.0-alpha03
  • Intents 3.4.0-alpha03
  • JUnit 1.1.3-alpha03
  • Monitor 1.3.1-alpha03
  • Orchestrator 1.3.1-alpha03
  • Runner 1.3.1-alpha03
  • Rules 1.3.1-alpha03
  • Truth 1.3.1-alpha03
  • Test Services 1.3.1-alpha03

以下是自 1.3.1-alpha02 版以来所做更改的摘要:

新功能

  • 支持在类级别使用 UIThreadTest

bug 修复

  • 在 InstrumentationActivityInvoker 中取消注册 ActivityResultWaiter(如果尚未对其取消注册)
  • 运行程序:将 TestEventClient 的“not primary instr”日志消息降为警告,因为它是多进程测试中的预期条件
  • Espresso:更新了 HasSiblingMatcher,以便只检查同级(非自身)。
  • 修复了 espresso.idling.resource 的工件名称 [#809]
  • 公开了 setMasterPolicyTimeoutWhenDebuggerAttached 功能 [#814]

依赖项变更

  • 更新了 espresso.accessibility 和 espresso.contrib 以依赖于与 AndroidX 兼容的 com.google.android.apps.common.testing.accessibility.framework:accessibility-test-framework:3.1。因此,此版本需要具有 java8 源/目标兼容性。 [#492]

版本 1.3.1-alpha02

2020 年 10 月 20 日

这是 AndroidX Test 1.3.1 的 Alpha 版。新的 API 可能会发生变化。它对下列库进行了更新:

  • Core 1.3.1-alpha02
  • Espresso 3.4.0-alpha02
  • Intents 3.4.0-alpha02
  • JUnit 1.1.3-alpha02
  • Monitor 1.3.1-alpha02
  • Orchestrator 1.3.1-alpha02
  • Runner 1.3.1-alpha02
  • Rules 1.3.1-alpha02
  • Truth 1.3.1-alpha02
  • Test Services 1.3.1-alpha02

以下是自 1.3.1-alpha01 版以来所做更改的摘要:

新功能

  • 抢先了解一下新的 Espresso BoundedDiagnosingMatcher 基类 API,该 API 可提供更好的错误消息传递方式。

bug 修复

  • 修复了 API 30 上的 Orchestrator clearPackageData [#743]

版本 1.3.1-alpha01

2020 年 10 月 15 日

这是 AndroidX Test 1.3.1 的 Alpha 版。新的 API 可能会发生变化。它对下列库进行了更新:

  • Core 1.3.1-alpha01
  • Espresso 3.4.0-alpha01
  • Intents 3.4.0-alpha01
  • JUnit 1.1.3-alpha01
  • Monitor 1.3.1-alpha01
  • Orchestrator 1.3.1-alpha01
  • Runner 1.3.1-alpha01
  • Rules 1.3.1-alpha01
  • Truth 1.3.1-alpha01
  • Test Services 1.3.1-alpha01

以下是自 1.3.0 版以来所做更改的摘要:

新功能

  • 为负面条件添加了 Espresso ViewMatcher API
  • 允许从 Espresso IdlingRegistry 取消注册 Looper
  • 支持通过 java.util.ServiceLoader 指定 junit RunListener

bug 修复

  • 改进了对测试失败时的大型堆栈轨迹的处理 [#729 和 #269]
    • 移除了测试运行程序框架相关的堆栈帧
    • 将堆栈轨迹截断到上限 64KB,以避免 Binder 限制事务错误
  • Espresso:改进了不存在 activity 时的错误消息传递
  • 改进了 Instrumentation#runOnMainSync 异常错误处理方式
  • 为 Orchestrator 和 Services 添加了软件包可见性条目,以修复使用 targetSdk 30 时出现的 Orchestator 问题 [#743]
  • 完善了 -e timeout_msec 和 AndroidJUnit4 的文档。
  • 将 ActivityOptions 发送到 BootstrapActivity [#685]
  • 通过让 ViewMatchers#assertThat 能够使用 Matcher.describeMismatch,改进了其错误消息传递
  • 修复了使用 Espresso-Remote 时出现的缺少脱糖 ThrowableExtension 错误 [issuetracker.google.com/170228109]
  • 通过添加 androidx.test.espresso.web.bridge 类,修复了 Android API 小于 19 时 Espresso-Web 出现的相关问题

版本 1.3.0

版本 1.3.0

2020 年 8 月 25 日

这是 AndroidX Test 1.3.0 的稳定版。 它对下列库进行了更新:

  • Core 1.3.0
  • Espresso 3.3.0
  • Intents 3.3.0
  • JUnit 1.1.2
  • Monitor 1.3.0
  • Orchestrator 1.3.0
  • Runner 1.3.0
  • Rules 1.3.0
  • Truth 1.3.0
  • Test Services 1.3.0

自 1.3.0-rc03 以来没有任何变化。以下是自 1.2.0 版以来所做更改的摘要:

新功能

  • 支持通过 SdkSuppress#codeName 按预发布 SDK 进行过滤
  • 针对位置添加了 Truth 扩展库
  • 为软件包字符串和可解析数组添加 Truth 断言。
  • 在 ActivityScenario 中支持 ActivityOptions
  • 使 activity 生命周期转换超时可配置
  • 处理通过隐式 intent 启动的 activity。(问题修复 496)
  • 添加了 BundleMatchers.isEmpty() 和 isEmptyOrNull() 方法
  • 允许不使用 Intents.init 的 Intents.release
  • 添加了 ViewMatchers.isFocused()

API 变更

  • 废弃了 ActivityTestRule,改为使用 ActivityScenario/ActivityScenarioRule
  • 允许 ServiceTestRule 的子类自定义超时

bug 修复

  • 修复了过滤参数化方法的问题
    • 还修复了使用 Orchestrator 运行参数化测试的问题 [#215,https://issuetracker.google.com/119838413]
  • 修复了在 API 29 上运行时“出现运行时权限对话框”的问题
  • 为 ActivityScenario 中使用的空 activity 跳过启动动画和结束动画。(问题修复 411)
  • 处理通过隐式 intent 启动的 activity。(问题修复 496)
  • 使 Kotlin 软件包名称具有唯一性,并在使用 AGP 4.1 构建时修复日志垃圾 [#680]
  • 仅当 AndroidJUnit4 运行程序位于类路径时,才委派给 RobolectricTestRunner
  • Espresso contrib:在需要使用 RecyclerView.findViewHolderForPosition 方法的地方使用替换项代替
  • 修复了在启用 AccessibilityChecks 的情况下进行测试时的 NoSuchMethodError (#376)
  • 修复了 Espresso 因处理消息处于忙碌状态(而非闲置资源)时的错误消息
  • ViewMatchers.isDisplayingAtLeast() 适用于反比例视图。
  • 增强了 WithIdMatcher 的错误消息传递
  • 移除了 waitForAtLeastOneActivityToBeResumed 中的虚假等待。
  • 为 ACTION_UP 设置正确的元状态
  • 解决了缺少 androidx_test_espresso_contrib_drawer_layout_tag 字段的问题 [#671]
  • 改善了 AndroidJUnitRunner 中的类路径扫描错误处理:忽略所有未找到的类和链接错误(问题修复439)
  • 通过 RunnerArgs 创建 RunListeners 之前,初始化 InstrumentationRegistry

依赖项变更

  • Truth:更新至 com.google.truth:truth:1.0 和 com.google.guava:guava:27.0.1-android

版本 1.3.0-rc03

2020 年 8 月 5 日

这是 AndroidX Test 1.3.0 的第三个候选版本。它对下列库进行了更新:

  • Core 1.3.0-rc03
  • Espresso 3.3.0-rc03
    • 移除了以前的 RC 版和 Beta 版 build 中错误纳入的一些尚未做好发布准备的 API
  • Intents 3.3.0-rc03
    • 移除了以前的 RC 版和 Beta 版 build 中错误纳入的一些尚未做好发布准备的 API
  • JUnit 1.1.2-rc03
  • Monitor 1.3.0-rc03
  • Orchestrator 1.3.0-rc03
  • Runner 1.3.0-rc03
  • Rules 1.3.0-rc03
  • Truth 1.3.0-rc03
  • Test Services 1.3.0-rc03

版本 1.3.0-rc02

2020 年 7 月 28 日

这是 AndroidX Test 1.3.0 的第二个候选版本。它对下列库进行了更新:

  • Core 1.3.0-rc02
    • 使 Kotlin 软件包名称具有唯一性,并在使用 AGP 4.1 构建时修复日志垃圾 [#680]
  • Espresso 3.3.0-rc02
    • 解决了缺少 androidx_test_espresso_contrib_drawer_layout_tag 字段的问题 [#671]
  • Intents 3.3.0-rc02
  • JUnit 1.1.2-rc02
  • Monitor 1.3.0-rc02
  • Orchestrator 1.3.0-rc02
  • Runner 1.3.0-rc02
  • Rules 1.3.0-rc02
    • 添加了有关 ActivityTestRule->ActivityScenario 的转换提示
  • Truth 1.3.0-rc02
  • Test Services 1.3.0-rc02

版本 1.3.0-rc01

2020 年 5 月 28 日

这是 AndroidX Test 1.3.0 的一个候选版本。 它对下列库进行了更新:

  • Core 1.3.0-rc01
  • Espresso 3.3.0-rc01
    • 使软件包名称具有唯一性,并在使用 AGP 4.1 构建时修复日志垃圾内容 [#573]
  • Intents 3.3.0-rc01
  • JUnit 1.1.2-rc01
  • Monitor 1.3.0-rc01
    • 使软件包名称具有唯一性,并在使用 AGP 4.1 构建时修复日志垃圾内容 [#573]
  • Orchestrator 1.3.0-rc01
  • Runner 1.3.0-beta01
    • 使软件包名称具有唯一性,并在使用 AGP 4.1 构建时修复日志垃圾内容 [#573]
  • Rules 1.3.0-rc01
    • 使软件包名称具有唯一性,并在使用 AGP 4.1 构建时修复日志垃圾内容 [#573]
  • Truth 1.3.0-rc01
  • Test Services 1.3.0-rc01

版本 1.3.0-beta02

2020 年 5 月 20 日

这是 AndroidX Test 1.3.0 的一个测试版本。新 API 不太可能会更改。 它对下列库进行了更新:

  • Core 1.3.0-beta02
  • Espresso 3.3.0-beta02
  • Intents 3.3.0-beta02
  • JUnit 1.1.2-beta02
  • Monitor 1.3.0-beta02
  • Orchestrator 1.3.0-beta02
  • Runner 1.3.0-beta01
    • 使用 Orchestrator 修复了运行的参数化测试 [#215, https://issuetracker.google.com/119838413]
  • Rules 1.3.0-beta02
  • Truth 1.3.0-beta02
  • Test Services 1.3.0-beta02
    • 修复了在 API 29 上运行时“出现运行时权限对话框”的问题

版本 1.3.0-beta01

2020 年 4 月 20 日

这是 AndroidX Test 1.3.0 的一个测试版本。新 API 不太可能会更改。 它对下列库进行了更新:

  • Core 1.3.0-beta01
  • Espresso 3.3.0-beta01
    • 添加了 ViewMatchers.isFocused()
    • 增强了 WithIdMatcher 的错误消息传递
  • Intents 3.3.0-beta01
    • 允许不使用 Intents.init 的 Intents.release
  • JUnit 1.1.2-beta01
  • Monitor 1.3.0-beta01
  • Orchestrator 1.3.0-beta01
  • Runner 1.3.0-beta01
    • RobolectricTestRunner 在类路径上时仅委托给 RobolectricTestRunner
    • 支持通过 SdkSuppress#codeName 按预发布 SDK 进行过滤
  • Rules 1.3.0-beta01
    • 废弃了 ActivityTestRule
  • Truth 1.3.0-beta01
    • 使 LocationSubject 替换 isEqualTo
  • Test Services 1.3.0-beta01

版本 1.3.0-alpha05

2020 年 3 月 17 日

这是 AndroidX Test 1.3.0 的 Alpha 版。新的 API 可能会发生变化。它对下列库进行了更新:

  • Core 1.3.0-alpha05
    • 为 ActivityScenario 中使用的空 activity 跳过启动动画和结束动画。(问题修复 411)
    • 处理通过隐式 intent 启动的 activity。(问题修复 496)
  • Espresso 3.3.0-alpha05
    • ViewMatchers.isDisplayingAtLeast() 适用于反比例视图。
    • 移除了 waitForAtLeastOneActivityToBeResumed 中的虚假等待。
    • 为 ACTION_UP 设置正确的元状态
  • Intents 3.3.0-alpha05
  • JUnit 1.1.2-alpha05
  • Monitor 1.3.0-alpha05
  • Orchestrator 1.3.0-alpha05
  • Runner 1.3.0-alpha05
    • 扫描测试的类路径时忽略所有 LinkageError 异常。(问题修复 439)
    • 通过 RunnerArgs 创建 RunListeners 之前,初始化 InstrumentationRegistry
  • Rules 1.3.0-alpha05
  • Truth 1.3.0-alpha05
  • Test Services 1.3.0-alpha05

版本 1.3.0-alpha04

2020 年 2 月 20 日

这是 AndroidX Test 1.3.0 的 Alpha 版。新的 API 可能会发生变化。它对下列库进行了更新:

  • Core 1.3.0-alpha04
  • Espresso 3.3.0-alpha04
    • 修复了 Espresso 因处理消息处于忙碌状态(而非闲置资源)时的错误消息
  • Intents 3.3.0-alpha04
  • JUnit 1.1.2-alpha04
  • Monitor 1.3.0-alpha04
  • Orchestrator 1.3.0-alpha04
  • Runner 1.3.0-alpha04
    • 修复了如果出现 StrictMode 违规问题,AndroidJUnitRunner 报告测试失败的问题
    • 添加了其他信息,以便 JUnit4 测试类格式有误时更轻松地进行诊断
  • Rules 1.3.0-alpha04
  • Truth 1.3.0-alpha04
  • Test Services 1.3.0-alpha04
    • 在测试服务中添加测试存储服务

以下是版本 1.3.0-alpha04 中包含的提交内容的完整列表。

版本 1.3.0-alpha03

2019 年 12 月 3 日

这是 AndroidX Test 1.3.0 的 Alpha 版。新的 API 可能会发生变化。它对下列库进行了更新:

  • Core 1.3.0-alpha03
    • 在 ActivityScenario 中支持 ActivityOptions
  • Espresso 3.3.0-alpha03
    • 修复了在启用 AccessibilityChecks 的情况下进行测试时的 NoSuchMethodError (#376)
  • Intents 3.3.0-alpha03
  • JUnit 1.1.2-alpha03
  • Monitor 1.3.0-alpha03
  • Orchestrator 1.3.0-alpha03
  • Runner 1.3.0-alpha03
    • 在对测试执行类路径扫描时忽略 NoClassDefFoundErrors
    • 针对未处理的异常添加了更好的错误处理方式
    • 允许通过运行程序参数选择停用“waitForActivitiesToComplete”
  • Rules 1.3.0-alpha03
  • Truth 1.3.0-alpha03
    • 更新了附加地址信息,以便更好地处理 null 值。
    • 将 stringArrayList 和 parcelableArrayList 方法添加到 BundleSubject

版本 1.2.1

版本 1.2.1-alpha02

2019 年 7 月 15 日

这是 AndroidX Test 1.2.1 的 Alpha 版。新的 API 可能会发生变化。它对下列库进行了更新:

  • Core 1.2.1-alpha02
    • 使 activity 生命周期转换超时可配置
  • Espresso 3.3.0-alpha02
  • Intents 3.3.0-alpha02
    • 添加了 BundleMatchers.isEmpty() 和 isEmptyOrNull() 方法
  • JUnit 1.1.2-alpha02
  • Monitor 1.3.0-alpha02
  • Orchestrator 1.3.0-alpha02
  • Runner 1.3.0-alpha02
  • Rules 1.3.0-alpha02
  • Truth 1.3.0-alpha02
    • 更新至 com.google.truth:truth:1.0 和 com.google.guava:guava:27.0.1-android

版本 1.2.1-alpha01

2019 年 6 月 17 日

这是 AndroidX Test 1.2.1 的 Alpha 版。新的 API 可能会发生变化。它对下列库进行了更新:

  • Core 1.2.1-alpha01
    • 添加了针对“MethodParameter 属性中的参数计数无效”构建警告的工具链修复方案
  • Espresso 3.3.0-alpha01
    • contrib:在需要使用 RecyclerView.findViewHolderForPosition 方法的地方用其替换项代替
  • Intents 3.3.0-alpha01
  • JUnit 1.1.2-alpha01
  • Monitor 1.3.0-alpha01
  • Orchestrator 1.3.0-alpha01
  • Runner 1.3.0-alpha01
  • Rules 1.3.0-alpha01
    • 允许 ServiceTestRule 的子类自定义超时
  • Truth 1.3.0-alpha01
    • 针对位置添加了 Truth 扩展库

版本 1.2.0

版本 1.2.0

2019 年 5 月 29 日

这是 AndroidX Test 1.2.0 的稳定版。 它对下列库进行了更新:

  • Core 1.2.0
  • Espresso 3.2.0
  • Intents 3.2.0
  • JUnit 1.1.1
  • Monitor 1.2.0
  • Orchestrator 1.2.0
  • Runner 1.2.0
  • Rules 1.2.0
  • Truth 1.2.0

版本 1.2.0-beta01

2019 年 5 月 6 日

这是 AndroidX Test 1.2.0 的 Beta 版。 它对下列库进行了更新:

  • Core 1.2.0-beta01
    • 更妥善地处理在一个测试中使用多个 ActivityScenario 的情况
  • Espresso 3.2.0-beta01
  • Intents 3.2.0-beta01
  • JUnit 1.1.1-beta01
  • Monitor 1.2.0-beta01
    • Instrumentation.runOnMainSync() 会将异常回传至发起调用的线程
  • Orchestrator 1.2.0-beta01
  • Runner 1.2.0-beta01
  • Rules 1.2.0-beta01
  • Truth 1.2.0-beta01

版本 1.2.0-alpha05

2019 年 4 月 30 日

这是 AndroidX Test 1.2.0 的 Alpha 版。新的 API 可能会发生变化。它对下列库进行了更新:

  • Core 1.2.0-alpha05
    • 使 ActivityScenario#onActivity 可从主线程进行调用
  • Espresso 3.2.0-alpha05
    • 进一步减少了 openActionBarOverflowOrOptionsMenu 的不稳定行为
  • Intents 3.2.0-alpha05
  • JUnit 1.1.1-alpha05
  • Monitor 1.2.0-alpha05
  • Orchestrator 1.2.0-alpha05
  • Runner 1.2.0-alpha05
  • Rules 1.2.0-alpha05
  • Truth 1.2.0-alpha05
    • 更新至上游 Google Truth 0.44

版本 1.2.0-alpha04

2019 年 4 月 18 日

这是 AndroidX Test 1.2.0 的 Alpha 版。新的 API 可能会发生变化。它对下列库进行了更新:

  • Core 1.2.0-alpha04
  • Espresso 3.2.0-alpha04
    • 稳定了 openActionBarOverflowOrOptionsMenu
    • 在 androidx.test 中添加了钩子机制,以模拟本地测试环境的窗口焦点发生更改的情况
  • Intents 3.2.0-alpha04
  • JUnit 1.1.1-alpha04
  • Monitor 1.2.0-alpha04
  • Orchestrator 1.2.0-alpha04
  • Runner 1.2.0-alpha04
    • 如果不存在旧版 android.test 类,则使用 androidx.test
  • Rules 1.2.0-alpha04
  • Truth 1.2.0-alpha04

版本 1.2.0-alpha03

2019 年 4 月 7 日

这是 AndroidX Test 1.2.0 的 Alpha 版。新的 API 可能会发生变化。它对下列库进行了更新:

  • Core 1.2.0-alpha03
    • 将 getState() API 添加到 ActivityScenario
  • Espresso 3.2.0-alpha03
    • 将 WithTagKeyMatcher 转换为接受 Matcher<?>,而不是 Matcher
    • 更新了指向 Espresso 设置文档的链接
    • 修复了在不同的语言区域下运行时的调试日志记录
  • Intents 3.2.0-alpha03
  • JUnit 1.1.1-alpha03
  • Monitor 1.2.0-alpha03
    • 再一次尝试清除了异常处理程序,以防止 Robolectric 中出现内存泄漏。
  • Orchestrator 1.2.0-alpha03
  • Runner 1.2.0-alpha03
    • 添加了 tests_regex AJUR 选项,以运行与给定正则表达式匹配的测试。
  • Rules 1.2.0-alpha03
  • Truth 1.2.0-alpha03
    • 公开了 ParcelableSubject API
    • 添加了 BundleSubject#longInt
    • 添加了 IntentSubject#hasComponent

版本 1.1.1

版本 1.1.1-alpha02

2019 年 3 月 7 日

这是 AndroidX Test 1.1.1 的 Alpha 版。新的 API 可能会发生变化。它对下列库进行了更新:

  • Espresso 3.2.0-alpha02
  • Intents 3.2.0-alpha02
    • 添加了 IntentMatchers#filterEquals
    • 修复了 Intents#intended() 中的 activity 生命周期时间 bug。现在,它会在检查 activity 状态之前使主 Looper 处于空闲状态。
  • Runner 1.1.2-alpha02
    • 允许指定软件包和类过滤器。
  • Truth 1.2.0-alpha02
  • JUnit 1.1.1-alpha02
  • Core 1.1.1-alpha02
    • 在无法解析 activity 时抛出 RuntimeException。
  • Monitor 1.1.2-alpha02
    • 清除了对未捕获的异常处理程序的引用,以防止 Robolectric 中出现内存泄漏。
  • Rules 1.1.2-alpha02
  • Orchestrator 1.1.2-alpha02

版本 1.1.1-alpha01

2019 年 1 月 30 日

这是 AndroidX Test 1.1.1 的 Alpha 版。新的 API 可能会发生变化。它对下列库进行了更新:

  • Espresso 3.1.2-alpha01
    • 添加了方法 AccessibilityChecks.disable()。
  • Intents 3.1.2-alpha01
    • 添加了 IntentMatchers#hasDataString
    • 修复了 Intents#intended() 中的 activity 生命周期时间 bug。现在,它会在检查 activity 状态之前使主 Looper 处于空闲状态。
  • Runner 1.1.2-alpha01
    • AndroidJUnitRunner 现在在 -e 注解选项中接受以英文逗号分隔的类列表,以便仅运行具有所有给定注解的测试
  • Truth 1.1.1-alpha01
    • 将 filtersEquallyTo() 添加到了 IntentSubject,以便使用 Intent.filterEquals() 比较 intent。
  • JUnit 1.1.1-alpha01
  • Core 1.1.1-alpha01
  • Monitor 1.1.2-alpha01
  • Rules 1.1.2-alpha01
  • Orchestrator 1.1.2-alpha01

版本 1.1.0

版本 1.1.0

2018 年 12 月 13 日

这是 AndroidX Test 1.1.0 的稳定版。 它对下列库进行了更新:

  • Espresso 3.1.1
  • Runner 1.1.1
  • Rules 1.1.1
  • Monitor 1.1.
  • AndroidTestOrchestrator 1.1.1
  • Core 1.1.0
  • Truth 1.1.0
  • JUnit 1.1.0

  • Core 1.1.0

    • 使 ActivityScenario 支持会启动另一 activity 的 activity

版本 1.1.0-beta01

2018 年 12 月 6 日

这是 AndroidX Test 1.1.0 的 beta01 版。 它对下列库进行了更新:

  • Core 1.1.0-beta01
    • 新增了 core-ktx kotlin 扩展工件!它包括适用于 Kotlin 的 ActivityScenario.launchActivity API
    • 新增了 ActivityScenario API,用于使用自定义 Intent 启动 Activity
    • 新增了 ActivityScenario API,用于接收 Activity 结果
    • 使 ActivityScenario 可关闭
  • Espresso3.1.1-beta01
    • 修改了 withResourceNameMatcher 和 HumanReadables,使其与 API 28 兼容。
    • 更新了 ReplaceTextAction 的说明以包括 stringToBeSet
    • 在 Robolectric Paused Looper 模式下支持 Espresso。
  • JUnit 1.1.0-beta01
    • 新增了 ActivityScenarioRule API,用于在设置测试时自动启动 activity,并在测试拆解后关闭 activity
    • 新增了 junit-ktx kotlin 扩展工件!它包括适用于 Kotlin 的 ActivityScenarioRule API
  • Runner 1.1.1-beta01
    • 使 -e 软件包和 -e testFile 在接收软件包时行为保持一致
  • Truth 1.1.0-beta01
    • 添加了 bool、parcelable 和 parcelableAsType BundleSubject API
  • Rules 1.1.1-beta01
  • Monitor 1.1.1-beta01
  • AndroidTestOrchestrator 1.1.1-beta01

版本 1.0.0

版本 1.0.0

2018 年 10 月 24 日

  • 所有库
    • 将 minSdkVersion 设置为 14,并将 targetSdkVersion 设置为 28
  • Espresso 3.1.0
    • 修复了 withContentDescription,以使用非字符串类型
    • 添加了对在 Robolectric 上使用 Espresso 的支持
    • 问题 73044169:启用 textAllCaps 后,无法使用 Espresso ViewMatchers.withText
    • 添加了对注入一系列动作事件的支持
  • Intent
    • 添加了测试版 API 以检索 Intent 列表,旨在与新增的 Truth 断言配合使用
  • Runner 1.1.0
    • 添加了对免安装应用的支持
    • 废弃了 androidx.test.runner.AndroidJUnit4 并改为使用 ndroidx.test.ext.junit.runners.AndroidJUnit4
  • Monitor 1.1.0
    • 废弃了 androidx.test.InstrumentationRegistry 并改为使用 androidx.test.platform.app.InstrumentationRegistry 和 androidx.test.core.app.ApplicationProvider
  • AndroidTestOrchestrator 1.1.0
    • 在同时传入“coverage”和“coverageFilePath”参数时,仅启用 Orchestrator coverage 处理过程。
    • 仅在设置了-debug 时等待调试程序,而非等待列出 ATO 测试用例。新增了 orchestratorDebug 标记,用于调试 Orchestrator 本身
  • Core 1.0.0
    • 新增了工件!它包括新的 API,支持同时在本地和设备端对以下项进行测试:
      • 检索上下文:ApplicationProvider
      • 控制 activity 生命周期:ActivityScenario(Beta 版)
      • MotionEvent、PackageInfo 的生成工具
      • Parceable 实用程序类
  • Truth 1.0.0
    • 新增了工件!它包括 Notification、Intent、Bundle、Parcelable 和 MotionEvent 的自定义 Truth 主题
  • JUnit 1.0.0
    • 新增了工件!它包括 JUnit 运行程序类 androidx.test.ext.junit.runners.AndroidJUnit4,该类支持本地和设备端测试。