Shopify/android-testify
Add screenshots to your Android tests
> **Warning** > > 🚚 **We have moved!** 🚧 > > Effective August 1, 2022, all development will occur in our new repository: https://github.com/ndtp/android-testify/ > > Please consult the [Migration Guide](https://ndtp.github.io/android-testify/docs/migration) for information on how to move your project to the latest artifacts.
Version 0.1.3 of the Android Testify - Screenshot Instrumentation Tests plugin has been approved by JetBrains and is now publicly available at the following link: https://plugins.jetbrains.com/plugin/14687-android-testify--screenshot-instrumentation-tests/versions/stable/173970.
Initial release of testify-compose library
📦 1.1.0
- Library and plugin released without additional changes.
📦 Updated
- Intellij plugin now supports Android Studio Bumblebee | 2021.1.1 Canary 9
- Build 211.*
📦 Library
- https://github.com/Shopify/android-testify/issues/228, https://github.com/Shopify/android-testify/issues/215
- Account for uneven processing chunk sizes. As Testify processes, it divides the images into chunks for faster, parallel processing.
- https://github.com/Shopify/android-testify/issues/216
- You can now use `ScreenshotRule.setExactness()` in conjunction with `ScreenshotRule.defineExclusionRects()`. You can now define both an exclusion area and an exactness threshold.
- Method `ScreenshotRule.getExactness():Float?` added.
- Method `ScreenshotRule.setExactness(exactness: Float?): ScreenshotRule<T>` now accepts a nullable value.
- `TestifyFeatures.GenerateDiffs` now visualizes exclusion regions and the exactness tolerance.
- When enabled, GenerateDiffs will write a companion image for your screenshot test which can help you more easily
- + 9 more
📦 Gradle Plugin
- Several internal changes to support Gradle 7.
- Fix https://github.com/Shopify/android-testify/issues/225
- Apply annotations to task properties for up-to-date checks. Adds missing annotations on public properties in Tasks to assist with up-to-date checks. Missing annotations are now errors in Gradle 7.0+.
- Fix https://github.com/Shopify/android-testify/issues/234
📦 Library
- Renamed the `rootViewId` setter on `ScreenshotTestRule` for better Java interoperability. It has been renamed to `setRootViewIdResource`.
📦 Updated
- Intellij plugin now supports Android Studio Arctic Fox | 2020.3.1 Beta 2
- Build 203.*
📦 Library
- Fix "ParallelPixelProcessor.kt:90 - java.lang.IndexOutOfBoundsException: index=315250 out of bounds (limit=315250)"
- https://github.com/Shopify/android-testify/issues/215
- AGP from 4.2.0-beta6 to 4.2.0
📦 Sample
- Remove kotlin-android-extensions from Sample and replace with viewBinding
1.0.0-rc3 was promoted to stable 1.0.0 release without further changes 🎉
📦 Library
- ScreenshotUtility is now public
- ScreenshotBaselineNotDefinedException now reports the expected device key
- Public method getRootViewId() has been added to ScreenshotRule
✨ Added
- You can now invoke Testify commands from the class level.
- Menu items now have icons.
📋 Changed
- Reworded the menu items for clarity.
📦 Updated
- Upgraded gradle from 6.5.1 to 6.8.1
- Upgraded kotlin-reflect from 1.4.10 to 1.4.21
📦 Library
- Increase the timeout values on orientation change. Addresses various `Failed to apply requested rotation` and `Activity did not resume` errors when invoking `setOrientation`.
- Android Gradle Plugin to 4.1.0
- Gradle Wrapper to 6.5
📦 Gradle Plugin
- Access task names lazily via names property. We were previously accessing task names in a way which resulted in early configuration of tasks resulting in Gradle failing to sync on the latest versions of Gradle and Android Gradle Plugin when custom lint checks were used in a project. Likely related to https://issuetracker.google.com/issues/67482030#comment2.
- Use the `TaskContainer.names` which doesn't cause all tasks to be resolved immediately.
📦 Sample App
- Update Sample application to use a Pixel 3a API 30 baseline emulator.
📦 1.0.0-rc1
- Replace Travis CI with GitHub Actions. https://github.com/Shopify/android-testify/actions
📦 Library
- Fix https://github.com/Shopify/android-testify/issues/138
- Introduce the `setFocusTarget` method on `ScreenshotRule` which allows for keyboard focus to be placed on an explicit View.
- Fix https://github.com/Shopify/android-testify/issues/165
- Increase the timeout on the ActivityLifecycleMonitor to 5 seconds to allow for the rotation to complete.
- Deregister the lifecycle callback.
- Fix https://github.com/Shopify/android-testify/issues/166
- Replace the existing FuzzyCompare algorithm with CIEDE2000. Calculate the colour difference value between two colours in lab space.
- The CIELAB color space (also known as CIE L* a* b* or sometimes abbreviated as simply "Lab" color space) is a color space defined by the International Commission on Illumination (CIE) in 1976.
- + 4 more
📦 Plugin
- The gradle plugin has moved to `Plugins/Gradle`
📦 Library
- Add defineExclusionRects method to ScreenshotRule. You can now use defineExclusionRects to exclude regions from a bitmap comparison.
📦 Updates
- Android Gradle Plugin to 4.0.0
- AndroidX Junit to 1.1.1
- AndroidX Test Rules to 1.2.0
- Kotlin to 1.3.72
- Mockito to 3.3.3
📦 Plugin
- Added `autoImplementLibrary` member to the `testify` extension. Defaults to `true`.
- When set to `false`, prevents the Plugin from automatically adding a Library `androidTestImplementation` dependency to your project.
- This is useful for local debugging or if you require a different version of the library and plugin.
📦 Library
- Fixed issue #153 - Orientation change will now be reliably applied regardless of how many times you invoke `setOrientation` in a single test class.
Legacy version for POS
📦 Library
- Fixed issue #148. Can now correctly override both enabled and disabled features using an AndroidManifest meta-data tag.
📦 1.0.0-beta1 -- May 2, 2020
- Breaking changes introduced. Bumped Testify to 1.0.0-beta1
📦 Library
- :warning: Screenshot images now are written to subdirectories under the `screenshot` directory on device. Screenshot paths on device now include the full device key and such are properly defined to fully represent the device configuration used to generate the images.
- This can be a breaking change if you use custom scripting to pull/access screenshot images from the emulator.
- :warning: The emulator locale is now encoded into the device key by default. Previously, only the language was encoded in the key. You can disable this behavior using the `Locale` (`testify-experimental-locale`) feature.
- This change will require you to rename your baseline image directory to include the full locale path.
- [TestifyFeatures](https://github.com/Shopify/android-testify/blob/7d0833b2cfedf05d4084d048d165d5f6646a8cba/Library/src/main/java/com/shopify/testify/TestifyFeatures.kt)
- Enable or disable some features at runtime via manifest entry or in code.
- [ScreenshotRule.withExperimentalFeatureEnabled](https://github.com/Shopify/android-testify/blob/7d0833b2cfedf05d4084d048d165d5f6646a8cba/Library/src/main/java/com/shopify/testify/ScreenshotRule.kt#L211)
- Used in conjunction with `TestifyFeatures`, you can selectively enable an experimental feature on the test rule. Features are reset after `assertSame` is called.
- + 28 more
📦 Plugin:
- :warning: Breaking Change
- The `testify {}` gradle extension been restructured. Testify no longer requires the `testify` extension to be defined in your project.
- This is particularly valuable for Android library projects as Testify can now correctly infer most settings automatically.
- Most settings can now be inferred. Testify now supports multiple flavor dimensions and product flavors.
- `testContextId` has been deleted and is no longer needed.
- `applicationIdSuffix` has been deleted. Its value can now be inferred.
- `installTask` has been added. You can specify which task to run to install your APK. This is automatically inferred, but you may wish to override the default value.
- `installAndroidTestTask` has been added. You can specify which task to run to install the Android Instrumentation test package. This is automatically inferred, but you may wish to override the default value.
- + 12 more
📦 Sample App:
- Update compile SDK from 28 to 29
- Update target SDK from 28 to 29
- Extend MaterialComponents theme instead of AppCompat theme
- Re-record baseline using locale key
Initial public release 🎉
