AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 1 | # Testing |
| 2 | |
| 3 | [TOC] |
| 4 | |
| 5 | AndroidX contains unit and integration tests that are run automatically when a |
| 6 | change is uploaded. It also contains a number of sample applications that are |
| 7 | useful for demonstrating how to use features as well as performing manual |
| 8 | testing. |
| 9 | |
| 10 | ## Adding tests {#adding} |
| 11 | |
| 12 | For an example of how to set up simple unit and integration tests in a new |
| 13 | module, see |
| 14 | [aosp/1189799](https://android-review.googlesource.com/c/platform/frameworks/support/+/1189799). |
| 15 | For an example of how to set up Espresso-powered integration tests, see the |
| 16 | `preference` library's |
AndroidX Core Team | 408c27b | 2020-12-15 15:57:00 +0000 | [diff] [blame] | 17 | [`build.gradle`](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:preference/preference/build.gradle) |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 18 | and |
AndroidX Core Team | 408c27b | 2020-12-15 15:57:00 +0000 | [diff] [blame] | 19 | [`EditTextPreferenceTest.java`](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:preference/preference/src/androidTest/java/androidx/preference/tests/EditTextPreferenceTest.java) |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 20 | files. |
| 21 | |
| 22 | The currently allowed test runners for on-device tests are |
| 23 | [`AndroidJUnitRunner`](https://developer.android.com/training/testing/junit-runner) |
| 24 | and |
| 25 | [`Parameterized`](https://junit.org/junit4/javadoc/4.12/org/junit/runners/Parameterized.html). |
| 26 | |
AndroidX Core Team | b5ba61d | 2021-06-08 09:20:36 -0700 | [diff] [blame] | 27 | NOTE All package/class/method combinations must be unique. Multiple copies of |
| 28 | the same class/method can be included e.g. under different directories, but must |
| 29 | be distinguishable by their packages. |
| 30 | |
AndroidX Core Team | 03b4da3 | 2021-03-10 23:20:41 +0000 | [diff] [blame] | 31 | NOTE For best practices on writing libraries in a way that makes it easy for end |
| 32 | users -- and library developers -- to write tests, see the |
AndroidX Core Team | 5fa6198 | 2023-01-13 10:43:41 -0500 | [diff] [blame] | 33 | [Testability](/company/teams/androidx/testability.md) guide. |
AndroidX Core Team | 03b4da3 | 2021-03-10 23:20:41 +0000 | [diff] [blame] | 34 | |
AndroidX Core Team | 5330eef | 2023-02-21 16:07:59 -0500 | [diff] [blame] | 35 | ### Adding a JVM based screenshot test |
| 36 | |
| 37 | For UI heavy libraries, it might make sense to add screenshot tests to verify |
| 38 | that everything still renders as expected. For that you need to write the test |
| 39 | ([example](https://r.android.com/2428035)) and add new goldens |
| 40 | ([example](https://r.android.com/2428721)). You can run these tests just like |
| 41 | any other JVM test using `test` Gradle task. |
| 42 | |
AndroidX Core Team | 21ccf65 | 2022-04-01 14:53:07 +0000 | [diff] [blame] | 43 | ### What gets tested, and when {#affected-module-detector} |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 44 | |
AndroidX Core Team | 3da6263 | 2022-10-03 11:29:25 -0700 | [diff] [blame] | 45 | With over 45000 tests executed on every CI run, it is necessary for us to run |
| 46 | only a subset of our instrumentation tests in presubmit. We use the |
AndroidX Core Team | 4cc85fa | 2021-11-23 15:58:34 +0000 | [diff] [blame] | 47 | [AffectedModuleDetector](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:buildSrc/private/src/main/kotlin/androidx/build/dependencyTracker/AffectedModuleDetector.kt) |
AndroidX Core Team | 3da6263 | 2022-10-03 11:29:25 -0700 | [diff] [blame] | 48 | to determine what projects have changed since the last merge. In turn, we only |
| 49 | generate apks and test configurations for those changed modules and their |
| 50 | dependencies. |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 51 | |
| 52 | When changes are made that can't be associated with a module, are in the root of |
| 53 | the checkout, or are within `buildSrc`, then all host tests and all device tests |
| 54 | annotated with `@SmallTest` or `@MediumTest` will be run for all modules. |
| 55 | |
| 56 | Presubmit tests represent only a subset of the devices on which our tests run. |
| 57 | The remaining devices are tested only in postsubmit. In postsubmit, all host and |
| 58 | device tests are run for all modules. |
| 59 | |
AndroidX Core Team | 21ccf65 | 2022-04-01 14:53:07 +0000 | [diff] [blame] | 60 | ### Test annotations {#annotations} |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 61 | |
AndroidX Core Team | 21ccf65 | 2022-04-01 14:53:07 +0000 | [diff] [blame] | 62 | #### Test size and runners {#test-size} |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 63 | |
| 64 | All device tests *should* be given a size annotation, which is one of: |
| 65 | |
| 66 | * [`@SmallTest`](https://developer.android.com/reference/androidx/test/filters/SmallTest) |
| 67 | * [`@MediumTest`](https://developer.android.com/reference/androidx/test/filters/MediumTest) |
| 68 | * [`@LargeTest`](https://developer.android.com/reference/androidx/test/filters/LargeTest) |
| 69 | |
alanv | 37fed3a2 | 2021-09-17 07:46:47 -0700 | [diff] [blame] | 70 | If a device test is *not* annotated with its size, it will be run as if it were |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 71 | `@LargeTest` by default. Host tests do not need to be annotated with their size, |
| 72 | as all host tests are run regardless of size. |
| 73 | |
| 74 | This annotation can occur at either the class level or individual test level. |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 75 | |
AndroidX Core Team | b5ba61d | 2021-06-08 09:20:36 -0700 | [diff] [blame] | 76 | Annotation | Max duration |
| 77 | ------------- | ------------ |
| 78 | `@SmallTest` | 200ms |
| 79 | `@MediumTest` | 1000ms |
| 80 | `@LargeTest` | 100000ms |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 81 | |
AndroidX Core Team | 21ccf65 | 2022-04-01 14:53:07 +0000 | [diff] [blame] | 82 | #### Disabling tests {#disabling-tests} |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 83 | |
| 84 | To disable a device-side test in presubmit testing only -- but still have it run |
| 85 | in postsubmit -- use the |
| 86 | [`@FlakyTest`](https://developer.android.com/reference/androidx/test/filters/FlakyTest) |
| 87 | annotation. There is currently no support for presubmit-only disabling of |
| 88 | host-side tests. |
| 89 | |
| 90 | If you need to stop a host- or device-side test from running entirely, use |
| 91 | JUnit's [`@Ignore`](http://junit.sourceforge.net/javadoc/org/junit/Ignore.html) |
| 92 | annotation. Do *not* use Android's `@Suppress` annotation, which only works with |
| 93 | Android test runners and will *not* work for host-side tests. |
| 94 | |
AndroidX Core Team | 21ccf65 | 2022-04-01 14:53:07 +0000 | [diff] [blame] | 95 | #### Filtering devices {#filtering-devices} |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 96 | |
| 97 | To restrict a test to a range of SDKs, use |
| 98 | [`@SdkSuppress`](https://developer.android.com/reference/androidx/test/filters/SdkSuppress) |
| 99 | which allows specifying a range with `minSdkVersion` and `maxSdkVersion`. This |
| 100 | annotation also supports targeting a specific pre-release SDK with the |
| 101 | `codeName` parameter. |
| 102 | |
| 103 | ```java |
| 104 | // Target SDKs 17 through 19, inclusive |
| 105 | @SdkSuppress(minSdkVersion = 17, maxSdkVersion = 19) |
| 106 | |
AndroidX Core Team | 21ccf65 | 2022-04-01 14:53:07 +0000 | [diff] [blame] | 107 | // Target pre-release SDK T only |
| 108 | @SdkSuppress(minSdkVersion = Build.VERSION_CODES.TIRAMISU, codeName = "Tiramisu") |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 109 | ``` |
| 110 | |
| 111 | You may also gate portions of test implementation code using `SDK_INT` or |
| 112 | [`BuildCompat.isAtLeast`](https://developer.android.com/reference/androidx/core/os/BuildCompat) |
AndroidX Core Team | 25bc933 | 2021-08-10 11:11:26 -0700 | [diff] [blame] | 113 | methods. s To restrict to only physical devices, use |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 114 | [`@RequiresDevice`](https://developer.android.com/reference/androidx/test/filters/RequiresDevice). |
| 115 | |
AndroidX Core Team | 5c914c4 | 2021-02-08 17:22:57 +0000 | [diff] [blame] | 116 | NOTE [Cuttlefish](https://source.android.com/setup/create/cuttlefish) is not |
| 117 | affected by this annotation, only e.g. Studio emulators. If Cuttlefish is |
| 118 | displaying behavior that differs from a physical device, they are considering |
| 119 | that a bug in Cuttlefish, so please file those bugs instead of only looking for |
| 120 | a workaround. |
| 121 | |
AndroidX Core Team | 21ccf65 | 2022-04-01 14:53:07 +0000 | [diff] [blame] | 122 | ### Animations in tests {#animations} |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 123 | |
| 124 | Animations are disabled for tests by default. This helps avoid flakes due to |
| 125 | timing and also makes tests faster. |
| 126 | |
| 127 | In rare cases, like testing the animations themselves, you may want to enable |
| 128 | animations for a particular test or test class. For those cases, you can use the |
AndroidX Core Team | 408c27b | 2020-12-15 15:57:00 +0000 | [diff] [blame] | 129 | [`AnimationDurationScaleRule`](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:testutils/testutils-runtime/src/main/java/androidx/testutils/AnimationDurationScaleRule.kt). |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 130 | |
AndroidX Core Team | 21ccf65 | 2022-04-01 14:53:07 +0000 | [diff] [blame] | 131 | ### Robolectric {#robolectric} |
alanv | f21d4ab | 2021-08-18 07:43:40 -0700 | [diff] [blame] | 132 | |
| 133 | Robolectric tests are supported in AndroidX; however, if you targeting a |
| 134 | pre-release version of the Android SDK then you may see an error like |
| 135 | |
| 136 | ``` |
alanv | 9102ecc | 2022-08-26 07:46:41 -0700 | [diff] [blame] | 137 | java.lang.IllegalArgumentException: Package targetSdkVersion=31 > maxSdkVersion=30 |
alanv | f21d4ab | 2021-08-18 07:43:40 -0700 | [diff] [blame] | 138 | at org.robolectric.plugins.DefaultSdkPicker.configuredSdks(DefaultSdkPicker.java:118) |
| 139 | at org.robolectric.plugins.DefaultSdkPicker.selectSdks(DefaultSdkPicker.java:69) |
| 140 | ``` |
| 141 | |
| 142 | You can force Robolectric to run using an earlier version of the platform SDK by |
| 143 | creating a `<project>/src/test/resources/robolectric.properties` file with the |
| 144 | following contents: |
| 145 | |
| 146 | ``` |
alanv | 9102ecc | 2022-08-26 07:46:41 -0700 | [diff] [blame] | 147 | # Robolectric currently doesn't support API 31, so we have to explicitly specify 30 as the target |
alanv | f21d4ab | 2021-08-18 07:43:40 -0700 | [diff] [blame] | 148 | # sdk for now. Remove when no longer necessary. |
alanv | 9102ecc | 2022-08-26 07:46:41 -0700 | [diff] [blame] | 149 | sdk=30 |
alanv | f21d4ab | 2021-08-18 07:43:40 -0700 | [diff] [blame] | 150 | ``` |
| 151 | |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 152 | ## Using the emulator {#emulator} |
| 153 | |
| 154 | You can use the emulator or a real device to run tests. If you wish to use the |
| 155 | emulator, you will need to access the AVD Manager (and your downloaded emulator |
| 156 | images) using a separate "normal" instance of Android Studio. "Normal" means a |
| 157 | non-Canary build of Studio that you would use for regular app development -- the |
| 158 | important part being that it points to the Android SDK where your downloaded |
| 159 | emulator images reside. You will need to open a project to get the Tools menu -- |
| 160 | do NOT open the AndroidX project in the "normal" instance of Android Studio; |
| 161 | instead, open a normal app or create a blank project using the app wizard. |
| 162 | |
AndroidX Core Team | 4cc85fa | 2021-11-23 15:58:34 +0000 | [diff] [blame] | 163 | NOTE You can reuse the emulator and system images from a "normal" installation |
| 164 | of Android Studio by linking the `emulator` and `system_images` directories to a |
AndroidX Core Team | 21ccf65 | 2022-04-01 14:53:07 +0000 | [diff] [blame] | 165 | standard Android SDK path and restarting Android Studio. **This is set up |
| 166 | automatically by `studiow` on Google-managed devices with a standard Android SDK |
| 167 | path.** In other cases, it may be set up manually with something like: `cd |
AndroidX Core Team | 4cc85fa | 2021-11-23 15:58:34 +0000 | [diff] [blame] | 168 | prebuilts/fullsdk-darwin ln -s ~/Library/Android/sdk/emulator emulator ln -s |
AndroidX Core Team | 21ccf65 | 2022-04-01 14:53:07 +0000 | [diff] [blame] | 169 | ~/Library/Android/sdk/system-images system-images` (substituting `fullsdk-linux` |
| 170 | and your local SDK path as appropriate) |
AndroidX Core Team | 4cc85fa | 2021-11-23 15:58:34 +0000 | [diff] [blame] | 171 | |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 172 | ## Debugging with platform SDK sources {#sources} |
| 173 | |
| 174 | The platform SDK sources that are checked into the development branch may not |
| 175 | match up with the build of Android present on the emulator or your physical |
| 176 | device. As a result, the line numbers reported by the debugger may not match up |
| 177 | the actual code being run. |
| 178 | |
| 179 | If you have a copy of the sources for the build against which you are debugging, |
| 180 | you can manually specify your platform SDK source path: |
| 181 | |
| 182 | 1. Click on a module (e.g. `appcompat`) in the `Project` view |
| 183 | 1. Press `Ctrl-Shift-A` and type "Module Settings", then run the action |
| 184 | 1. In the `Project Structure` dialog, navigate to `SDKs > Android API 29 |
| 185 | Platform > Sourcepath` |
| 186 | 1. Use the `-` button to remove any paths that are present, then use the `+` |
| 187 | button to add the desired source path, ex. `<android checkout |
| 188 | root>/frameworks/base` if you are debugging against a locally-built system |
| 189 | image |
| 190 | |
| 191 | NOTE The `Project Structure` dialog reachable via `File > Project Structure` is |
| 192 | **not** the same as the `Project Structure` dialog that will allow you to |
| 193 | specify the SDK source path. You must use the "Module Settings" action as |
| 194 | directed above. |
| 195 | |
| 196 | ## Running unit and integration tests {#running} |
| 197 | |
| 198 | From Android Studio, right-click can be used to run most test targets, including |
| 199 | source files, classes within a file, or individual test methods but **not** |
| 200 | entire modules. To run a supported test target, right-click on the test target |
| 201 | and then click `Run <name of test target>`. |
| 202 | |
| 203 | To run tests for an entire module such as `appcompat`, use `Run -> Edit |
| 204 | configurations...` and use the `+` button to create a new `Android Instrumented |
| 205 | Tests` configuration. Specify the module to be tested, give it a reasonable name |
| 206 | (not "All Tests") and click `OK`, then use the `Run` menu to run the |
| 207 | configuration. |
| 208 | |
| 209 |  |
| 210 | |
| 211 | NOTE If you receive the error `JUnit version 3.8 or later expected` this means |
| 212 | that Android Studio generated an Android JUnit configuration when you actually |
| 213 | needed an Android Instrumented Tests configuration. Open the `Run -> Edit |
| 214 | configurations...` dialog and delete the configuration from Android JUnit, then |
| 215 | manually add a configuration in Android Instrumented Tests. |
| 216 | |
| 217 | ### From the command line {#running-from-shell} |
| 218 | |
| 219 | Following a successful build, tests may be run against a particular AndroidX |
| 220 | module using `gradlew`. |
| 221 | |
AndroidX Core Team | 408c27b | 2020-12-15 15:57:00 +0000 | [diff] [blame] | 222 | To run all unit or integration tests in a specific project, run the following |
| 223 | from `framework/support`: |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 224 | |
| 225 | ```shell |
AndroidX Core Team | 408c27b | 2020-12-15 15:57:00 +0000 | [diff] [blame] | 226 | # Run instrumentation tests on a connected device |
AndroidX Core Team | 8c9a1c0 | 2023-03-08 14:16:36 -0800 | [diff] [blame] | 227 | ./gradlew <project-name>:connectedAndroidTest --info |
| 228 | |
| 229 | # Run instrumentation tests in Firebase Test Lab (remote) |
| 230 | ./gradlew <project-name>:ftlnexus4api21 |
| 231 | ./gradlew <project-name>:ftlpixel2api26 |
| 232 | ./gradlew <project-name>:ftlpixel2api28 |
| 233 | ./gradlew <project-name>:ftlpixel2api30 |
| 234 | ./gradlew <project-name>:ftlpixel2api33 |
AndroidX Core Team | 408c27b | 2020-12-15 15:57:00 +0000 | [diff] [blame] | 235 | |
| 236 | # Run local unit tests |
AndroidX Core Team | 8c9a1c0 | 2023-03-08 14:16:36 -0800 | [diff] [blame] | 237 | ./gradlew <project-name>:test |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 238 | ``` |
| 239 | |
AndroidX Core Team | 8c9a1c0 | 2023-03-08 14:16:36 -0800 | [diff] [blame] | 240 | substituting the Gradle project name (ex. `:core:core`). |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 241 | |
AndroidX Core Team | 8c9a1c0 | 2023-03-08 14:16:36 -0800 | [diff] [blame] | 242 | To run a specific instrumentation test in a given project, run |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 243 | |
| 244 | ```shell |
AndroidX Core Team | 8c9a1c0 | 2023-03-08 14:16:36 -0800 | [diff] [blame] | 245 | # Run instrumentation tests on a connected device |
| 246 | ./gradlew <project-name>:connectedAndroidTest --info \ |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 247 | -Pandroid.testInstrumentationRunnerArguments.class=<fully-qualified-class>[\#testName] |
AndroidX Core Team | 8c9a1c0 | 2023-03-08 14:16:36 -0800 | [diff] [blame] | 248 | |
| 249 | # Run instrumentation tests on in Firebase Test Lab (remote) |
| 250 | ./gradlew <project-name>:ftlpixel2api30 --className=<fully-qualified-class> |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 251 | ``` |
| 252 | |
| 253 | substituting the Gradle project name (ex. `viewpager`) and fully-qualified class |
| 254 | name (ex. `androidx.viewpager.widget.ViewPagerTest`) of your test file, |
| 255 | optionally followed by `\#testName` if you want to execute a single test in that |
AndroidX Core Team | 8c9a1c0 | 2023-03-08 14:16:36 -0800 | [diff] [blame] | 256 | file |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 257 | |
AndroidX Core Team | 8c9a1c0 | 2023-03-08 14:16:36 -0800 | [diff] [blame] | 258 | If you want to run a specific unit test, you can do it using |
AndroidX Core Team | a200cb8 | 2023-03-28 15:23:28 -0700 | [diff] [blame] | 259 | [`--tests` filtering](https://docs.gradle.org/current/userguide/java_testing.html#test_filtering): |
| 260 | |
AndroidX Core Team | 8c9a1c0 | 2023-03-08 14:16:36 -0800 | [diff] [blame] | 261 | ```shell |
AndroidX Core Team | 8c9a1c0 | 2023-03-08 14:16:36 -0800 | [diff] [blame] | 262 | # Run a test for an Android library on a connected device |
AndroidX Core Team | 8c9a1c0 | 2023-03-08 14:16:36 -0800 | [diff] [blame] | 263 | ./gradlew <project-name>:test --tests androidx.core.view.DisplayCompatTest |
| 264 | |
| 265 | # Run a test for a JVM library |
AndroidX Core Team | 8c9a1c0 | 2023-03-08 14:16:36 -0800 | [diff] [blame] | 266 | ./gradlew <project-name>:testDebugUnitTest --tests |
AndroidX Core Team | a200cb8 | 2023-03-28 15:23:28 -0700 | [diff] [blame] | 267 | androidx.core.view.DisplayCompatTest |
| 268 | ``` |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 269 | |
| 270 | ## Test apps {#testapps} |
| 271 | |
| 272 | Library developers are strongly encouraged to write test apps that exercise |
| 273 | their library's public API surface. Test apps serve multiple purposes: |
| 274 | |
| 275 | * Integration testing and validation of API testability, when paired with |
| 276 | tests |
| 277 | * Validation of API usability and developer experience, when paired with a use |
| 278 | case or critical user journey |
| 279 | * Sample documentation, when embedded into API reference docs using the |
AndroidX Core Team | 5fa6198 | 2023-01-13 10:43:41 -0500 | [diff] [blame] | 280 | [`@sample` and `@Sampled` annotations](/company/teams/androidx/api_guidelines/index.md#sample-usage) |
AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame] | 281 | |
| 282 | ### Legacy test apps {#testapps-legacy} |
| 283 | |
| 284 | We have a set of legacy sample Android applications in projects suffixed with |
| 285 | `-demos`. These applications do not have tests and should not be used as test |
| 286 | apps for new APIs, but they may be useful for manual regression testing. |
| 287 | |
| 288 | 1. Click `Run/Debug Configuration` on the top of the window. |
| 289 | 1. Select the app you want to run. |
| 290 | 1. Click 'Run' button. |
| 291 | |
| 292 |  |
| 293 | |
| 294 | ## Benchmarking {#benchmarking} |
| 295 | |
| 296 | AndroidX supports benchmarking - locally with Studio/Gradle, and continuously in |
| 297 | post-submit. For more information on how to create and run benchmarks, see |
AndroidX Core Team | 5fa6198 | 2023-01-13 10:43:41 -0500 | [diff] [blame] | 298 | [Benchmarking](/company/teams/androidx/benchmarking.md). |